Bug 590172

Summary: strace -p leaves processes stopped after detaching
Product: Red Hat Enterprise Linux 5 Reporter: Dan Astoorian <djast>
Component: straceAssignee: Jeff Law <law>
Status: CLOSED ERRATA QA Contact: qe-baseos-tools-bugs
Severity: urgent Docs Contact:
Priority: low    
Version: 5.5CC: frank, law, wnefal+redhatbugzilla
Target Milestone: rc   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-01-25 17:44:58 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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):
strace-4.5.18-5.el5_4.4
(running under kernel-PAE-2.6.18-194.el5)

How reproducible:
Always

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.