Red Hat Bugzilla – Bug 590172
strace -p leaves processes stopped after detaching
Last modified: 2012-01-25 12:44:58 EST
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)
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.
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".
No error message should appear, and the "sleep" process should continue to run.
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.
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)
This was fixed by an errata in 2010.