Red Hat Bugzilla – Bug 240841
If "strace -p" is broken by Ctrl-C before it prints any syscall, the traced proces receives SIGSTOP
Last modified: 2007-11-30 17:12:05 EST
+++ This bug was initially created as a clone of Bug #175398 +++
-- Additional comment from firstname.lastname@example.org on 2006-04-28 15:46 EST --
Updates about how to reproduce the bug (my previous comment #6 was not
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.
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 email@example.com on 2007-05-22 05:35 EST --
Created an attachment (id=155153)
Catch SIGSTOP for each PTRACE_ATTACH.
Bug to be created again.