strace -f not following child process
Denys Vlasenko
dvlasenk at redhat.com
Mon Jul 8 08:00:10 UTC 2013
On 07/05/2013 01:18 PM, Florian Kelbert wrote:
> Hi all,
>
> while trying to strace nginx (http://nginx.org/), using strace -f, I
> realized that strace fails to trace a forked child process.
Which version of strace and kernel do you have?
Can you show the same event with -d option added to strace
command line? (the debug output goes to stderr, not -o LOGFILE).
> As you can see in the trace below, process 13644 forks a new child
> 13645. 13644 and 13643 then exit and the new process 13645 does not get
> traced. As far as I have understood the strace source code, the reason
> may be that all parent processes exit before 16345 has executed any
> single system call.
May be, but it is unlikely, seeing your trace. 13643 did quite a number
of syscalls after clone.
> Am I doing something wrong?
Hard to say, as you didn't show your strace command line.
More information about the Strace-devel
mailing list