Bug 235521 - utrace: ptrace operations should work on child in job control stop
Summary: utrace: ptrace operations should work on child in job control stop
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: rawhide
Hardware: x86_64
OS: Linux
Target Milestone: ---
Assignee: Roland McGrath
QA Contact: Brian Brock
Depends On:
Blocks: 233852 235545
TreeView+ depends on / blocked
Reported: 2007-04-06 17:46 UTC by Jan Kratochvil
Modified: 2007-11-30 22:12 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2007-09-04 20:37:49 UTC
Type: ---

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

System ID Private Priority Status Summary Last Updated
Sourceware 4330 0 None None None Never

Description Jan Kratochvil 2007-04-06 17:46:49 UTC
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):
(on FC6 system)

How reproducible:

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 17:47:04 UTC
Created attachment 151891 [details]

Comment 2 Roland McGrath 2007-04-06 20:58:48 UTC
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 21:36:11 UTC
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 20:37:49 UTC
This was fixed a while back.

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