Bug 588521 - strace leaves bash stopped
strace leaves bash stopped
Status: CLOSED DUPLICATE of bug 585358
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: strace (Show other bugs)
4.8
All Linux
medium Severity medium
: rc
: ---
Assigned To: Andreas Schwab
qe-baseos-tools
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-05-03 17:08 EDT by Jeff Bastian
Modified: 2011-05-13 09:00 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-05-06 09:12:10 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jeff Bastian 2010-05-03 17:08:13 EDT
Description of problem:
strace on bash can leave the bash process in a stopped state when strace is killed with CTRL-C.

Version-Release number of selected component (if applicable):
bash-3.0-21.el4_8.2.x86_64
gdb-6.3.0.0-1.162.el4.x86_64
strace-4.5.16-1.el4_8.9.x86_64

How reproducible:
every time

Steps to Reproduce:
1. compile simple program to debug
$ cat test.c
#include<stdio.h>
#include<stdlib.h>

int main(void)
{
    while(1) {
        printf("looping...\n");
        sleep(1);
    }
    return 0;
}

$ gcc -g test.c


2. open two terminals and run the commands shown below to leave gdb in a stopped state

terminal 1                   terminal 2
==========                   ==========
$ echo $$
18408
                             $ strace -v -f -T -tt -p 18408
$ gdb ./a.out
                             CTRL-C to kill strace
[GDB IS STOPPED]
                             $ ps -o pid,comm,stat -p 18408,`pidof gdb`
                               PID COMMAND          STAT
                             18408 bash             Ss
                             18606 gdb              T+
                             $ kill -CONT 18606
[GDB CONTINUES]


3. open two terminals and run the commands below to leave bash in a stopped state

terminal 1                   terminal 2
==========                   ==========
$ echo $$
18222
                             $ strace -v -f -T -tt -p 18222
$ gdb ./a.out
(gdb) quit
                             CTRL-C to kill strace
[BASH IS STOPPED]
                             $ ps -o pid,comm,stat -p 18222
                               PID COMMAND          STAT
                             18222 bash             Ts+
                             $ kill -CONT 18222
[BASH CONTINUES]
 

Actual results:
bash and/or gdb are left in a stopped state when strace is killed with CTRL-C

Expected results:
bash and/or gdb continue running normally

Additional info:

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