Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 588521 - strace leaves bash stopped
Summary: strace leaves bash stopped
Keywords:
Status: CLOSED DUPLICATE
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: strace
Version: 4.8
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Andreas Schwab
QA Contact: qe-baseos-tools
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-05-03 21:08 UTC by Jeff Bastian
Modified: 2011-05-13 13:00 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-05-06 13:12:10 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Jeff Bastian 2010-05-03 21:08:13 UTC
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.