Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
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
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: rawhide
Hardware: x86_64
OS: Linux
medium
high
Target Milestone: ---
Assignee: Roland McGrath
QA Contact: Brian Brock
URL:
Whiteboard:
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:
Environment:
Last Closed: 2007-09-04 20:37:49 UTC


Attachments (Terms of Use)
Testcase. (deleted)
2007-04-06 17:47 UTC, Jan Kratochvil
no flags Details
cleaned up version of the test case (deleted)
2007-04-06 21:36 UTC, Roland McGrath
no flags Details


Links
System ID Priority Status Summary Last Updated
Sourceware 4330 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):
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 17:47:04 UTC
Created attachment 151891 [details]
Testcase.

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.