Bug 240841

Summary: If "strace -p" is broken by Ctrl-C before it prints any syscall, the traced proces receives SIGSTOP
Product: [Fedora] Fedora Reporter: Jan Kratochvil <jan.kratochvil>
Component: straceAssignee: Jan Kratochvil <jan.kratochvil>
Status: CLOSED NOTABUG QA Contact: Brian Brock <bbrock>
Severity: low Docs Contact:
Priority: medium    
Version: rawhideCC: jan.kratochvil
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-05-23 13:58:32 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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.