Bug 240841 - If "strace -p" is broken by Ctrl-C before it prints any syscall, the traced proces receives SIGSTOP
If "strace -p" is broken by Ctrl-C before it prints any syscall, the traced p...
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: strace (Show other bugs)
rawhide
All Linux
medium Severity low
: ---
: ---
Assigned To: Jan Kratochvil
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-05-22 05:38 EDT by Jan Kratochvil
Modified: 2007-11-30 17:12 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-05-23 09:58:32 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 Jan Kratochvil 2007-05-22 05:38:12 EDT
+++ This bug was initially created as a clone of Bug #175398 +++

-- Additional comment from skasal@redhat.com 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@redhat.com 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 09:58:32 EDT
Bug to be created again.

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