Bug 240841 - If "strace -p" is broken by Ctrl-C before it prints any syscall, the traced proces receives SIGSTOP
Summary: If "strace -p" is broken by Ctrl-C before it prints any syscall, the traced p...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: strace
Version: rawhide
Hardware: All
OS: Linux
medium
low
Target Milestone: ---
Assignee: Jan Kratochvil
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-05-22 09:38 UTC by Jan Kratochvil
Modified: 2007-11-30 22:12 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2007-05-23 13:58:32 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Jan Kratochvil 2007-05-22 09:38:12 UTC
+++ This bug was initially created as a clone of Bug #175398 +++

-- Additional comment from skasal on 2006-04-28 15:46 EST --
Updates about how to reproduce the bug (my previous comment #6 was not
completely true):
1. Run "mke2fs /dev/sda2" or "mke2fs -F HUGE" in one terminal.
2. In another terminal, attach to the process with
      strace -p `/sbin/pidof /sbin/mke2fs`
   at the moment when the mke2fs process has just written
      "Writing superblocks and filesystem accounting information:"
3. Hit Ctrl-C to break the strace.

The strace has to be broken before it displays any traced syscall, ie. before
the mke2fs process prints "done" to finish the above line of output.

My guess it that this is the core of the problem: if the strace is broken before
any system call is traced, then it sends a SIGSTOP to the traced process.

A note:
If the mke2fs is too quick, it helps to use a block device (if you have a spare
partition), or to umount and mount the partition which contains the file HUGE.

-- Additional comment from jan.kratochvil on 2007-05-22 05:35 EST --
Created an attachment (id=155153)
Catch SIGSTOP for each PTRACE_ATTACH.

Comment 1 Jan Kratochvil 2007-05-23 13:58:32 UTC
Bug to be created again.



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