Description of problem:
Found a regression against kernel.org in RH kernels utrace based implementation
Version-Release number of selected component (if applicable):
(on FC6 system)
Steps to Reproduce:
1. gcc -o stopkills stopkills.c -Wall -ggdb3
./stopkills: PTRACE_DETACH: No such process
(nothing; exit code 0)
ptrace (PTRACE_CONT, child_pid, NULL, (void *) SIGSTOP);
ptrace (PTRACE_DETACH, child_pid, NULL, NULL);
PTRACE_DETACH fails by ESRCH on the utrace kernels.
Created attachment 151891 [details]
The name of the test case and the description of the bug are confusing.
The actual problem is that after PTRACE_CONT,SIGSTOP the child is in job control
stop (TASK_STOPPED), not ptrace stop (TASK_TRACED). The regression is that
ptrace should work on a child in job control stop as well, whereas currently the
utrace kernel returns ESRCH as it does when the child is not stopped.
Created attachment 151898 [details]
cleaned up version of the test case
This is modified not to depend on timing.
This was fixed a while back.