Bug 590172 - strace -p leaves processes stopped after detaching
Summary: strace -p leaves processes stopped after detaching
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: strace
Version: 5.5
Hardware: i386
OS: Linux
Target Milestone: rc
: ---
Assignee: Jeff Law
QA Contact: qe-baseos-tools-bugs
Depends On:
TreeView+ depends on / blocked
Reported: 2010-05-07 21:38 UTC by Dan Astoorian
Modified: 2012-01-25 17:44 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2012-01-25 17:44:58 UTC
Target Upstream Version:

Attachments (Terms of Use)

Description Dan Astoorian 2010-05-07 21:38:22 UTC
Description of problem:
Attaching strace to an existing process via "strace -p <pid>" reports "strace: ptrace(PTRACE_CONT,1,133): Input/output error" and leaves the traced process in a stopped state when strace is killed.

Version-Release number of selected component (if applicable):
(running under kernel-PAE-2.6.18-194.el5)

How reproducible:

Steps to Reproduce:
1. Create a process (e.g., "sleep 600"), and note its process id
2. From a separate shell, run "strace -p <pid>"
3. Type CTRL-C to kill the strace process.
Actual results:
strace reports "strace: ptrace(PTRACE_CONT,1,133): Input/output error"; the "sleep" process stops with SIGSTOP, and must (e.g.) be put back into the foreground with "fg".

Expected results:
No error message should appear, and the "sleep" process should continue to run.

Additional info:
I do not believe this problem was present before we updated from Red Hat Enterprise Linux 5.4 to 5.5.  Using the executable from strace-4.5.18-5.el5_4.1.i386.rpm does not exhibit the problem, so it would appear that this problem arrived with the fix for RHBA-2010:0174.

This bug is rather dangerous, as it may result in system processes being left in a stopped state when adminstrators are troubleshooting problems.

Comment 1 Frank Sorenson 2010-06-14 15:51:20 UTC
This is probably a duplicate of bugzilla 580211 (https://bugzilla.redhat.com/show_bug.cgi?id=580211 viewable only by RH), and is the 5.5 version of bugzilla #594616 (https://bugzilla.redhat.com/show_bug.cgi?id=594616).

It's fixed in RHBA-2010:0453 (http://rhn.redhat.com/errata/RHBA-2010-0453.html)

Comment 2 Jeff Law 2012-01-25 17:44:58 UTC
This was fixed by an errata in 2010.

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