Bug 235521 - utrace: ptrace operations should work on child in job control stop
utrace: ptrace operations should work on child in job control stop
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: kernel (Show other bugs)
rawhide
x86_64 Linux
medium Severity high
: ---
: ---
Assigned To: Roland McGrath
Brian Brock
: Regression
Depends On:
Blocks: 233852 235545
  Show dependency treegraph
 
Reported: 2007-04-06 13:46 EDT by Jan Kratochvil
Modified: 2007-11-30 17:12 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-09-04 16:37:49 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Testcase. (4.26 KB, text/plain)
2007-04-06 13:47 EDT, Jan Kratochvil
no flags Details
cleaned up version of the test case (4.13 KB, text/x-csrc)
2007-04-06 17:36 EDT, Roland McGrath
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
Sourceware 4330 None None None Never

  None (edit)
Description Jan Kratochvil 2007-04-06 13:46:49 EDT
Description of problem:
Found a regression against kernel.org in RH kernels utrace based implementation
of ptrace(2).

Version-Release number of selected component (if applicable):
kernel-2.6.20-1.3045.fc7.x86_64
(on FC6 system)

How reproducible:
Always.

Steps to Reproduce:
1. gcc -o stopkills stopkills.c -Wall -ggdb3
2. ./stopkills

Actual results:
./stopkills: PTRACE_DETACH: No such process

Expected results:
(nothing; exit code 0)

Additional info:
ptrace (PTRACE_CONT, child_pid, NULL, (void *) SIGSTOP);
ptrace (PTRACE_DETACH, child_pid, NULL, NULL);
PTRACE_DETACH fails by ESRCH on the utrace kernels.
Comment 1 Jan Kratochvil 2007-04-06 13:47:04 EDT
Created attachment 151891 [details]
Testcase.
Comment 2 Roland McGrath 2007-04-06 16:58:48 EDT
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.
Comment 3 Roland McGrath 2007-04-06 17:36:11 EDT
Created attachment 151898 [details]
cleaned up version of the test case

This is modified not to depend on timing.
Comment 4 Roland McGrath 2007-09-04 16:37:49 EDT
This was fixed a while back.

Note You need to log in before you can comment on or make changes to this bug.