Bug 216020
Summary: | waitpid returns WIFSIGNALED instead of WIFEXITED | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Andrew Cagney <cagney> | ||||
Component: | kernel | Assignee: | Roland McGrath <roland> | ||||
Status: | CLOSED WORKSFORME | QA Contact: | Brian Brock <bbrock> | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | medium | ||||||
Version: | 6 | CC: | cmoller, ncunning, pmuldoon, roland, wtogami | ||||
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-09-04 20:32:21 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: | |||||||
Bug Depends On: | |||||||
Bug Blocks: | 173278, 216149, 216150 | ||||||
Attachments: |
|
Description
Andrew Cagney
2006-11-16 19:47:57 UTC
Created attachment 141405 [details]
test case
Frysk's bug: http://sourceware.org/bugzilla/show_bug.cgi?id=3525 Frysk's testcase: http://sources.redhat.com/cgi-bin/cvsweb.cgi/frysk-imports/tests/frysk3525/exit47.c?cvsroot=frysk The exec isn't needed, nor is SETOPTIONS, both removed from frysk's test case. $ ssh towns uname -a Linux towns.toronto.redhat.com 2.6.18-1.2849.fc6 #1 SMP Fri Nov 10 12:36:14 EST 2006 i686 i686 i386 GNU/Linux The test case is slightly racy and on a well-behaving kernel it will sometimes barf when it sees a WIFSTOPPED/WTERMSIG=SIGUSR1 result, which is a valid possibility when the parent's PTRACE_CONT with SIGUSR1 comes before the child has unblocked SIGUSR1 in the sigsuspend syscall; this will happen on a fast machine or a preemption kernel. The ptrace behavior is to requeue the PTRACE_CONT-specified signal when it's blocked, so that it comes back through ptrace when it's unblocked--whereas when the signal is already unblocked because the child has gotten far enough into its sigsuspend call, then PTRACE_CONT's injection of the signal goes directly to running the handler as the test case expects. The only mystery about the utrace bug is how we went so long without noticing it. The waitpid result for the exit of a PTRACE_ATTACH'd task (not your own child) is just always wrong. It's a simple fix. (In reply to comment #5) > The test case is slightly racy and on a well-behaving kernel it will sometimes > barf when it sees a WIFSTOPPED/WTERMSIG=SIGUSR1 result, which is a valid > possibility when the parent's PTRACE_CONT with SIGUSR1 comes before the child > has unblocked SIGUSR1 in the sigsuspend syscall I wondered about that, I'll slow down the test, tks. This bug was fixed quite a while ago. Reopen if it reoccurs. |