Created attachment 317081 [details] reproducer +++ This bug was initially created as a clone of Bug #455060 +++ When the parent process sends a PTRACE_KILL to the child that has been stopped by SIGTRAP (initiated by PTRACE_TRACEME), the child is not killed, rather than starts running freely. This kernel bug is present on FC7, RH 5, 5u1, and 5u2, using x86, x86-64, or Power processors. On the other hand this problem is not present on e.g. SUSE 10.1, 10.2, and RH 4u5. This implies to us that the working systems have kernel equal to or less than 2.6.16. the failing systems have kernel equal to or newer than 2.6.18. This problem reproduces with e.g. both gcc and PGI compilers. The reproducer here uses gcc 4.3.0. The reproducer package consists of two program's: the 'user' code simplestat_g.out, and the master 'Debugger' code (test_TV.c). First the master code forks a child and the child then sets PTRACE_TRACEME. The child then starts running exec(./simplestat_g.out). The master waits at wait(), and immediately sends PTRACE_KILL to the child. As result, the child should exit, and never actually execute and let loose simplestat_g.out. We suspect that this might be a race condition in the kernel, possibly a race condition between setting a SIGKILL signal against the child process and letting it run so it gets killed. This kernel problem prevents TotalView Debugger from debugging any '-static' compiled programs on these platforms. We consider this bug as a critical bug in the kernel and hope that it would be fixed as a very high priority. For more details, please see the reproducer codes, particularly test_TV.c. XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX Reproduce: # User's prog, w/ (or w/o) -static, e.g. here statically linked /home/compilers/gnu/gcc/4.3.0/x86_64-linux/bin/gcc -g -static -o simplestat_g.out simple.c -lm # Mini Debugger prog, executing simplestat_g and trying to PTRACE_KILL it /home/compilers/gnu/gcc/4.3.0/x86_64-linux/bin/gcc -o a.out test_TV.c ./a.out XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX Sample output: FAILING execution, RH 5u1, x86-64: rhel51-x8664:/home/seppo/Bugs/Bug_11153 > ./a.out CHILD: PTRACE_TRACEME at 0 :: return code 0 PARENT: WAIT status 1407 from PID 28777 PARENT: status -> CHILD stopped, by signal 5 PARENT: Sent PTRACE_KILL to 28777 :: return code 0 FINISHED rhel51-x8664:/home/seppo/Bugs/Bug_11153 > counter 0 counter 1 counter 2 counter 3 counter 4 counter 5 counter 6 counter 7 counter 8 counter 9 rhel51-x8664:/home/seppo/Bugs/Bug_11153 > rhel51-x8664:/home/seppo/Bugs/Bug_11153 > uname -a Linux rhel51-x8664.totalviewtech.com 2.6.18-53.el5 #1 SMP Wed Oct 10 16:34:19 EDT 2007 x86_64 x86_64 x86_64 GNU/Linux rhel51-x8664:/home/seppo/Bugs/Bug_11153 > SUCCESFULL execution, SUSE 10 SP1, x86-64: gari:/home/seppo/Bugs/Bug_11153 > ./a.out CHILD: PTRACE_TRACEME at 0 :: return code 0 PARENT: WAIT status 1407 from PID 29369 PARENT: status -> CHILD stopped, by signal 5 PARENT: Sent PTRACE_KILL to 29369 :: return code 0 FINISHED gari:/home/seppo/Bugs/Bug_11153 > uname -a Linux gari 2.6.16.13-4-smp #1 SMP Wed May 3 04:53:23 UTC 2006 x86_64 x86_64 x86_64 GNU/Linux gari:/home/seppo/Bugs/Bug_11153 > ---
Is there a compelling reason why the key comment to this bug is private? Does this bug apply to Fedora rawhide?
shouldn't be private... overlooked this. yes, it's apply to rawhide since it has Roland's utrace patch.
I don't think the current rawhide kernel has this problem. Can you verify?
has been fixed in 2.6.27-13.fc10.x86_64 now, works just fine. :)