Bug 461552 - [utrace] strace -f => PANIC: attached pid # exited
Summary: [utrace] strace -f => PANIC: attached pid # exited
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: 9
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Roland McGrath
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 467214 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-09-09 01:18 UTC by Matt McCutchen
Modified: 2008-10-28 14:22 UTC (History)
6 users (show)

Fixed In Version: 2.6.26.6-79.fc9
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-10-24 02:43:01 UTC
Type: ---
Embargoed:


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

Description Matt McCutchen 2008-09-09 01:18:20 UTC
Description of problem:
"strace -f" fails to trace child processes.

Version-Release number of selected component (if applicable):
kernel-2.6.26.3-29.fc9.i686
strace-4.5.16-5.fc9.i386

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-2.6.25.11-92.fc9.i686.  That is why I put this bug in the kernel component.

Comment 1 Matt McCutchen 2008-09-09 03:09:49 UTC
The problem does not occur with vanilla kernel 82a28c794f27aac17d7a3ebd7f14d731a11a5532 .

Comment 2 Chuck Ebbert 2008-09-11 05:17:53 UTC
Possibly a utrace bug.

Comment 3 Sam Varshavchik 2008-09-13 13:14:25 UTC
I can duplicate this problem. This kernel is now in stable.

Comment 4 Denys Vlasenko 2008-09-15 14:22:10 UTC
Upstream kernel is not affected. More precisely:

2.6.27-rc4 is ok (this is the upstream I tested against)
2.6.25.14-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.

Comment 5 Denys Vlasenko 2008-09-16 11:50:28 UTC
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 15:04:21 UTC
Created attachment 316855 [details]
Testcase

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 22:03:03 UTC
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 05:34:43 UTC
Fixed in utrace branch, in rawhide building kernel-2_6_27-0_372_rc8_fc10

Comment 9 Denys Vlasenko 2008-09-30 14:05:19 UTC
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 10:05:09 UTC
Verified as still broken on: kernel-2.6.26.6-71.fc9.x86_64
Could you please backport it for F9?

(kernel-2.6.25.10-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)

Comment 11 Chuck Ebbert 2008-10-20 18:50:10 UTC
(In reply to comment #10)
> Verified as still broken on: kernel-2.6.26.6-71.fc9.x86_64
> Could you please backport it for F9?
> 

Please test kernel-2.6.26.6-79.fc9

Comment 12 Matt McCutchen 2008-10-20 23:49:25 UTC
I tested kernel-2.6.26.6-79.fc9 and the problem is fixed.

Comment 13 Chuck Ebbert 2008-10-22 05:01:49 UTC
*** Bug 467214 has been marked as a duplicate of this bug. ***

Comment 14 Peter Fales 2008-10-24 11:34:00 UTC
Will this be ported to Fedora 8?

Comment 15 Chuck Ebbert 2008-10-28 14:22:27 UTC
(In reply to comment #14)
> Will this be ported to Fedora 8?

It already is, in 2.6.26.6-49.fc8


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