Re: strace -f hangs forever with process who creates child process
On Aug 25 11:18, Qian Hong wrote: Hi Corinna, On Tue, Aug 25, 2015 at 12:50 AM, Corinna Vinschen corinna-cyg...@cygwin.com wrote: Please try the latest developer snapshot from https://cygwin.com/snapshots/ It should fix the issue. Thanks very much for the fix. I've retested on both Win7 and Wine (Wine Staging 1.7.50), and I can confirm now `strace -f` works fine on both platform. No longer hangs, also child process is not traced. Thanks for testing! Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat pgp9mhLggThmP.pgp Description: PGP signature
RE: strace -f hangs forever with process who creates child process
From: Qian Hong I just found `strace -f` hangs forever for me. $ uname -a CYGWIN_NT-6.1 fracting-PC 2.2.1(0.289/5/3) 2015-08-15 11:00 i686 Cygwin) $ cat parent.sh ./child.sh $ cat child.sh echo haha $ strace -f -o out.txt bash -c parent.sh #hangs forever. FWIW, this also seems to hang for me, but can't confirm that it hangs forever, as I didn't wait that long. Ctrl/C-ing out works, but that takes several seconds to take effect. And then I can't delete out.txt: $ rm -f out.txt rm: cannot remove ‘out.txt’: Device or resource busy $ Commands 'ps' and 'who' don't indicate any other processes, but Task Manager shows another bash process. After killing that process I am then able to delete out.txt. --Ken Nellis
Re: strace -f hangs forever with process who creates child process
On 08/24/2015 09:05 AM, Nellis, Kenneth wrote: From: Qian Hong I just found `strace -f` hangs forever for me. $ uname -a CYGWIN_NT-6.1 fracting-PC 2.2.1(0.289/5/3) 2015-08-15 11:00 i686 Cygwin) $ cat parent.sh ./child.sh $ cat child.sh echo haha $ strace -f -o out.txt bash -c parent.sh #hangs forever. FWIW, this also seems to hang for me, but can't confirm that it hangs forever, as I didn't wait that long. Ctrl/C-ing out works, but that takes several seconds to take effect. And then I can't delete out.txt: $ rm -f out.txt I also can confirm this on the same cygwin release but for x86_64: uname -a CYGWIN_NT-6.1 rwells-x220 2.2.1(0.289/5/3) 2015-08-20 11:42 x86_64 Cygwin -- Roger Wells, P.E. leidos 221 Third St Newport, RI 02840 401-847-4210 (voice) 401-849-1585 (fax) roger.k.we...@leidos.com -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Re: strace -f hangs forever with process who creates child process
On Aug 24 09:37, Roger Wells wrote: On 08/24/2015 09:05 AM, Nellis, Kenneth wrote: From: Qian Hong I just found `strace -f` hangs forever for me. $ uname -a CYGWIN_NT-6.1 fracting-PC 2.2.1(0.289/5/3) 2015-08-15 11:00 i686 Cygwin) $ cat parent.sh ./child.sh $ cat child.sh echo haha $ strace -f -o out.txt bash -c parent.sh #hangs forever. FWIW, this also seems to hang for me, but can't confirm that it hangs forever, as I didn't wait that long. Ctrl/C-ing out works, but that takes several seconds to take effect. And then I can't delete out.txt: $ rm -f out.txt I also can confirm this on the same cygwin release but for x86_64: No more metoos required, thank you. It's a generic problem when trying to trace forking/spawning parents without also tracing their children. Having said that, I don't know what the cause is, but I guess that nobody did it for a while. Also, don't do that for now ;) Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat pgplcjlq3UoCV.pgp Description: PGP signature
Re: strace -f hangs forever with process who creates child process
On Aug 24 16:03, Corinna Vinschen wrote: On Aug 24 09:37, Roger Wells wrote: On 08/24/2015 09:05 AM, Nellis, Kenneth wrote: From: Qian Hong I just found `strace -f` hangs forever for me. $ uname -a CYGWIN_NT-6.1 fracting-PC 2.2.1(0.289/5/3) 2015-08-15 11:00 i686 Cygwin) $ cat parent.sh ./child.sh $ cat child.sh echo haha $ strace -f -o out.txt bash -c parent.sh #hangs forever. FWIW, this also seems to hang for me, but can't confirm that it hangs forever, as I didn't wait that long. Ctrl/C-ing out works, but that takes several seconds to take effect. And then I can't delete out.txt: $ rm -f out.txt I also can confirm this on the same cygwin release but for x86_64: No more metoos required, thank you. It's a generic problem when trying to trace forking/spawning parents without also tracing their children. Having said that, I don't know what the cause is, but I guess that nobody did it for a while. Also, don't do that for now ;) Please try the latest developer snapshot from https://cygwin.com/snapshots/ It should fix the issue. Thanks, Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat pgplRuemhMPeB.pgp Description: PGP signature
strace -f hangs forever with process who creates child process
Dear list, I just found `strace -f` hangs forever for me. $ uname -a CYGWIN_NT-6.1 fracting-PC 2.2.1(0.289/5/3) 2015-08-15 11:00 i686 Cygwin) $ cat parent.sh ./child.sh $ cat child.sh echo haha $ strace -f -o out.txt bash -c parent.sh #hangs forever. I have a few C source test case here, which were originally for a Wine bug, but could reproduce this Cygwin bug: https://bugs.wine-staging.com/show_bug.cgi?id=525#c2 To reproduce: (Ignore the Wine bug report itself, just copy the source. The Wine bug itself is fixed now, with analysis which indicates something is wrong with IsDebuggerPresent(). I refer the bug here since it might help to triage our Cygwin issue if there is something related) gcc spawn-parent.c -o spawn-parent.exe gcc spawn-child.c -o spawn-child.exe gcc dummy.c -o dummy.exe Without strace, the above programs works fine: $ ./spawn-parent.exe from SPAWN parent! from SPAWN dummy! haha this is dummy However, when tracing with `strace -f`, spawn-child.exe hangs: $ strace -f -o /tmp/spawn.nested.strace.txt ./spawn-parent.exe #hangs I read the strace document of Cygwin[1], it said: -f, --trace-children trace child processes (toggle - default true) [1] https://cygwin.com/cygwin-ug-net/strace.html According to my test, `strace` without `-f` works fine, which trace child process, as the document says. Is it a known bug that toggle off child process doesn't work? Or did i miss anything else? (Note, current strace works with my needs, I don't need to toggle off child process tracing at all, just make sure there is not a bug here) Thanks! -- Regards, Qian Hong - http://www.winehq.org -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Re: strace -f hangs forever with process who creates child process
Hi Corinna, On Tue, Aug 25, 2015 at 12:50 AM, Corinna Vinschen corinna-cyg...@cygwin.com wrote: Please try the latest developer snapshot from https://cygwin.com/snapshots/ It should fix the issue. Thanks very much for the fix. I've retested on both Win7 and Wine (Wine Staging 1.7.50), and I can confirm now `strace -f` works fine on both platform. No longer hangs, also child process is not traced. Thanks! -- Regards, Qian Hong - http://www.winehq.org -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple