Bug 461552 - [utrace] strace -f => PANIC: attached pid # exited
[utrace] strace -f => PANIC: attached pid # exited
Product: Fedora
Classification: Fedora
Component: kernel (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Roland McGrath
Fedora Extras Quality Assurance
: 467214 (view as bug list)
Depends On:
  Show dependency treegraph
Reported: 2008-09-08 21:18 EDT by Matt McCutchen
Modified: 2008-10-28 10:22 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-10-23 22:43:01 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Testcase (3.40 KB, text/plain)
2008-09-16 11:04 EDT, Denys Vlasenko
no flags Details

  None (edit)
Description Matt McCutchen 2008-09-08 21:18:20 EDT
Description of problem:
"strace -f" fails to trace child processes.

Version-Release number of selected component (if applicable):

How reproducible:
Every time

Steps to Reproduce:
1. strace -f -o strace.out bash -c '(sleep 1)'

(The parentheses are needed to get bash to start a subprocess.  I used a sleep in order to rule out a race where the child exits before strace can attempt to trace it.)

Actual results:
strace does not trace the child "sleep" process, and it outputs "PANIC: attached pid # exited" (where # represents the PID of the child) when the one-second sleep ends.

Expected results:
strace traces the "sleep" process.

Additional info:
The problem does not occur with kernel-  That is why I put this bug in the kernel component.
Comment 1 Matt McCutchen 2008-09-08 23:09:49 EDT
The problem does not occur with vanilla kernel 82a28c794f27aac17d7a3ebd7f14d731a11a5532 .
Comment 2 Chuck Ebbert 2008-09-11 01:17:53 EDT
Possibly a utrace bug.
Comment 3 Sam Varshavchik 2008-09-13 09:14:25 EDT
I can duplicate this problem. This kernel is now in stable.
Comment 4 Denys Vlasenko 2008-09-15 10:22:10 EDT
Upstream kernel is not affected. More precisely:

2.6.27-rc4 is ok (this is the upstream I tested against) is ok
2.6.27-0.322.rc6 is bad
2.6.27-0.324.rc6.git1 is bad

I am testing some more kernels at the moment, will add info as it becomes available.
Comment 5 Denys Vlasenko 2008-09-16 07:50:28 EDT
Tested x86_64 kernel RPMs from koji, results:

2.6.27-0.144.rc0.git2 is ok
2.6.27-0.166.rc0.git8 is ok

intervening kernels had build problems in koji, next successfully built one:

2.6.27-0.173.rc0.git11 is bad:
 prints "PANIC: attached pid NNNN exited" and strace exits
2.6.27-0.180.rc0.git11 is bad, same symptoms
2.6.27-0.186.rc0.git15 is bad, same symptoms
2.6.27-0.191.rc0.git16 is bad, same symptoms

and sometime later symptoms change:

2.6.27-0.322.rc6 is bad:
 prints "PANIC: attached pid NNNN exited" and strace hangs, I KILLed it
2.6.27-0.324.rc6.git1 is bad, same symptoms as 2.6.27-0.322.rc6

Also tested newer upstream (yesterday's Linus tree) 2.6.27-rc6 and it is ok.
Comment 6 Denys Vlasenko 2008-09-16 11:04:21 EDT
Created attachment 316855 [details]

The bug is that clone(... CLONE_PTRACE ...) doesn't stop with SIGSTOP anymore. This affects strace because it patches clone() syscalls with this flag in order to get a trap just after a clone() in the child, not sometime after it.
Comment 7 Roland McGrath 2008-09-29 18:03:03 EDT
Verified clone-ptrace works on vanilla upstream du jour and fails on my utrace development branch.  I'm looking into it.
Comment 8 Roland McGrath 2008-09-30 01:34:43 EDT
Fixed in utrace branch, in rawhide building kernel-2_6_27-0_372_rc8_fc10
Comment 9 Denys Vlasenko 2008-09-30 10:05:19 EDT
Thanks Roland, just tested this kernel and it fixes bug 461941 too!

Bug 461456 might be fixed also (not tested yet).

Just FYI: some unrelated change in that kernel interferes with X, at least on my laptop. Created bug 464775.
Comment 10 Jan Kratochvil 2008-10-14 06:05:09 EDT
Verified as still broken on: kernel-
Could you please backport it for F9?

(kernel- has disfunctional arrow keys in VNC/KVM,
kernel-2.6.27-3.fc10.x86_64 has X locking up for ~5 seconds on any drawing,
there is now no kernel to choose from)
Comment 11 Chuck Ebbert 2008-10-20 14:50:10 EDT
(In reply to comment #10)
> Verified as still broken on: kernel-
> Could you please backport it for F9?

Please test kernel-
Comment 12 Matt McCutchen 2008-10-20 19:49:25 EDT
I tested kernel- and the problem is fixed.
Comment 13 Chuck Ebbert 2008-10-22 01:01:49 EDT
*** Bug 467214 has been marked as a duplicate of this bug. ***
Comment 14 Peter Fales 2008-10-24 07:34:00 EDT
Will this be ported to Fedora 8?
Comment 15 Chuck Ebbert 2008-10-28 10:22:27 EDT
(In reply to comment #14)
> Will this be ported to Fedora 8?

It already is, in

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