Description of problem: Version-Release number of selected component (if applicable): 2.6.14-1.1773_FC5smp, 2.6.15-1.1826.2.4_FC5 How reproducible: 100% Steps to Reproduce: 1. gcc -o threadexec -g threadexec.c -lpthread 2. ./threadexec /bin/echo hi => see it work 3. strace -f -o log ./threadexec /bin/echo hi => see it fail Actual results: In the traced run, the process dies by SIGKILL immediately after execing /bin/echo. Expected results: After the exec, /bin/echo should run normally (and be traced). Additional info:
Created attachment 122915 [details] threaded execer program for test case
Verified this bug is in the current upstream kernel.
I believe I had found the code which trigger this testcase failure. But I don't the why yet. It is triggered by the following code in kernel/ptrace.c: + if (child->signal->flags & SIGNAL_GROUP_EXIT) { + sigaddset(&child->pending.signal, SIGKILL); + signal_wake_up(child, 1); + } This is checked into 2.6.15 by Andrea Arcangeli to fix a gdb deadlock problem he didn't elaborate on. Here is the link: http://marc.theaimsgroup.com/?l=linux-kernel&m=112833915827432&w=2. After reversing this patch, the above case works ok on both x86 and ppc64.
BTW, could I use the above testcase in the public mail-list? I believe it is. But I am not sure. So I just want to ask. :-)
Everything about this bug is public. The attached test program is GPL'd code already publically available from the Frysk project. Thanks for looking into this. Andrea's change is one among many recent kernel changes on my backlog to review and about which I have been dubious but not yet had the time to investigate fully and follow up to get them changed. Unfortunately I have still had my time monopolized by other things and that backlog is growing and not shrinking.
Can the above code be removed for the FC-5 kernel?
I sent an email to Andrea and cc the linux-kernel mail-list about this problem. Here is the link: http://marc.theaimsgroup.com/?l=linux-kernel&m=114178963330524&w=2 Just FYI.
2.6.16.6 has fixed this upstream. FC-5's next rebase should get it.
2.6.17-1.2174_FC5 tests fine, closing