Bug 64303

Summary: process is stopped after detaching
Product: [Retired] Red Hat Raw Hide Reporter: Kjetil T. Homme <kjetilho>
Component: straceAssignee: Jakub Jelinek <jakub>
Status: CLOSED RAWHIDE QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 1.0CC: bbaetz, ejb, jwm, radu
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2002-09-03 05:28:49 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:
Bug Depends On:    
Bug Blocks: 67217    

Description Kjetil T. Homme 2002-05-01 23:40:31 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9) Gecko/20020430

Description of problem:
if you attach to a running process, and terminate strace with ^C, the running
process will remain in a stopped state.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
in window 1: sleep 20
in window 2: strace -p $(pgrep sleep)
             press ^C
wait 20 seconds.  the sleep is still running.
in window 2: kill -CONT $(pgrep sleep)
the sleep terminates immediately.

	

Expected Results:  strace should send a SIGCONT or whatever after detaching (I
don't know how it works in detail :)

Additional info:

Comment 1 Bill Nottingham 2002-06-21 21:15:14 UTC
*** Bug 66191 has been marked as a duplicate of this bug. ***

Comment 2 Roland McGrath 2002-08-20 23:06:22 UTC
*** Bug 71166 has been marked as a duplicate of this bug. ***

Comment 3 Bill Nottingham 2002-09-03 05:27:02 UTC
Rhis should be better with strace-4.4-8.

Comment 4 Bill Nottingham 2002-09-03 05:28:42 UTC
*** Bug 73298 has been marked as a duplicate of this bug. ***

Comment 5 Jay Turner 2002-09-03 13:44:45 UTC
Fix confirmed with strace-4.4-8.

Comment 6 Radu Greab 2002-12-02 00:55:23 UTC
strace-4.4-8 fails for me eventually if I keep repeating the test below. This is
happening on a RedHat 7.3 box, kernel-smp-2.4.18-18.7.x, dual Intel Pentium 3.

Process 1153 is xinetd.
# grep ^State /proc/1153/status
State:  S (sleeping)
# ./BUILD/strace-4.4/strace -v -p 1153
select(7, [3 5 6], NULL, NULL, NULL <unfinished ...>
# grep ^State /proc/1153/status
State:  S (sleeping)
# ./BUILD/strace-4.4/strace -v -p 1153
select(7, [3 5 6], NULL, NULL, NULL <unfinished ...>
# grep ^State /proc/1153/status
State:  T (stopped)
# ./BUILD/strace-4.4/strace -v -p 1153
--- SIGSTOP (Stopped (signal)) ---
select(7, [3 5 6], NULL, NULL, NULL <unfinished ...>
# grep ^State /proc/1153/status
State:  S (sleeping)


strace-4.4-9.1 worked for me, but only after I applied to detach() the changes
from patch21, strace-x86_64.patch. It seems that those changes are not quite
architecture specific, but they fix the problem on i386 too.