Bug 590172 - strace -p leaves processes stopped after detaching
strace -p leaves processes stopped after detaching
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: strace (Show other bugs)
i386 Linux
low Severity urgent
: rc
: ---
Assigned To: Jeff Law
Depends On:
  Show dependency treegraph
Reported: 2010-05-07 17:38 EDT by Dan Astoorian
Modified: 2012-01-25 12:44 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-01-25 12:44:58 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Dan Astoorian 2010-05-07 17:38:22 EDT
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 11:51:20 EDT
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 12:44:58 EST
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.