This is the mail archive of the
mailing list for the Cygwin project.
strace -f hangs forever with process who creates child process
- From: Qian Hong <fracting at gmail dot com>
- To: cygwin <cygwin at cygwin dot com>
- Date: Mon, 24 Aug 2015 15:01:47 +0800
- Subject: strace -f hangs forever with process who creates child process
- Authentication-results: sourceware.org; auth=none
- Reply-to: fracting at gmail dot com
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
$ cat child.sh
$ 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:
(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:
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, it said:
-f, --trace-children trace child processes (toggle - default true)
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)
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple