On 09.07.2013 19:30, Denys Vlasenko wrote:
> On 07/09/2013 09:17 AM, Florian Kelbert wrote:
>>
>>
>> On 08.07.2013 10:00, Denys Vlasenko wrote:
>>> 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?
>>
>> I compiled strace 4.8 from the sources using ./configure && make; using 
>> Ubuntu 13.04, kernel 3.8.0-25
>>
>>>
>>> Can you show the same event with -d option added to strace
>>> command line? (the debug output goes to stderr, not -o LOGFILE).
>>>
>>
>> ./strace -f -d ~/nginx/sbin/nginx
>>
>> http://pastebin.com/ZwHXHrWa
>>
>> Process 7428 is born in line 518 and survives the subsequent exit_group() by 
>> process 7427, as the output of ps shows:
>
> The log shows that exit_group(0) is indeed called immediately after clone(),
> making "strace exited too early to see the child" theory feasible.
>
> Can you test this theory by replacing
>
>       while (nprocs != 0)
>
> with
>
>       while (1)
>
> in strace.c in function trace()?
>
> The exit from trace loop will then happen when we receive ECHILD.
> In my testing it worked.
>

Worked.


------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
Strace-devel mailing list
Strace-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/strace-devel

Reply via email to