Red Hat Bugzilla – Bug 461552
[utrace] strace -f => PANIC: attached pid # exited
Last modified: 2008-10-28 10:22:27 EDT
Description of problem:
"strace -f" fails to trace child processes.
Version-Release number of selected component (if applicable):
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.)
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.
strace traces the "sleep" process.
The problem does not occur with kernel-220.127.116.11-92.fc9.i686. That is why I put this bug in the kernel component.
The problem does not occur with vanilla kernel 82a28c794f27aac17d7a3ebd7f14d731a11a5532 .
Possibly a utrace bug.
I can duplicate this problem. This kernel is now in stable.
Upstream kernel is not affected. More precisely:
2.6.27-rc4 is ok (this is the upstream I tested against)
18.104.22.168-108 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.
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.
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.
Verified clone-ptrace works on vanilla upstream du jour and fails on my utrace development branch. I'm looking into it.
Fixed in utrace branch, in rawhide building kernel-2_6_27-0_372_rc8_fc10
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.
Verified as still broken on: kernel-22.214.171.124-71.fc9.x86_64
Could you please backport it for F9?
(kernel-126.96.36.199-86.fc9.x86_64 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)
(In reply to comment #10)
> Verified as still broken on: kernel-188.8.131.52-71.fc9.x86_64
> Could you please backport it for F9?
Please test kernel-184.108.40.206-79.fc9
I tested kernel-220.127.116.11-79.fc9 and the problem is fixed.
*** Bug 467214 has been marked as a duplicate of this bug. ***
Will this be ported to Fedora 8?
(In reply to comment #14)
> Will this be ported to Fedora 8?
It already is, in 18.104.22.168-49.fc8