Summary: | .18 and FC6 kernels returns two waitpid exit events for process | ||
---|---|---|---|
Product: | frysk | Reporter: | Andrew Cagney <cagney> |
Component: | general | Assignee: | Andrew Cagney <cagney> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | kris.van.hees |
Priority: | P2 | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Host: | Target: | ||
Build: | Last reconfirmed: | ||
Bug Depends on: | |||
Bug Blocks: | 1496, 3489 |
Description
Andrew Cagney
2006-11-15 21:10:19 UTC
process attached; response: FINE: frysk.sys.Wait pid 2835 status 0x137f WIFSTOPPED 19 (Stopped (signal)) FINE: frysk.sys.Wait pid 0 errno 0 (Success) process sent signal telling it to do exec: FINE: frysk.sys.Wait pid 2835 status 0x1e7f WIFSTOPPED 30 (Power failure) FINE: frysk.sys.Wait pid 0 errno 0 (Success) process continued with signal; so exec of "exit 47" program occures: FINE: frysk.sys.Wait pid 2835 status 0x4057f WIFSTOPPED/EXEC 5 (Trace/breakpoint trap) FINE: frysk.sys.Wait pid 0 errno 0 (Success) process stopped at exec allowed to continue; process exits: FINE: frysk.sys.Wait pid 2835 status 0x6057f WIFSTOPPED/EXIT 5 (Trace/breakpoint trap) FINE: frysk.sys.Wait pid 0 errno 0 (Success) and then process really exits twice! FINE: frysk.sys.Wait pid 2835 status 0x2f WIFSIGNALED 47 (Real-time signal 13) FINE: frysk.sys.Wait pid 2835 status 0x2f00 WIFEXITED 47 (exit status) FINE: frysk.sys.Wait pid -1 errno 10 (No child processes) Note that the frysk process has its own special ptrace thread; i.e., the wait and ptrace operations are occuring in _different_ threads. Test case frysk-imports/tests/frysk3525 created; good output: 30389 installing signal handler and mask 30389 forking 30391 signalling 30389 with User defined signal 1 30391 waiting for signals 30389 calling waitpid 30390 for << child for daemon exits >> returns 0x0 WIFEXITED 0 -- ok 30389 waiting for signals 30389 received User defined signal 1 30389 calling ptrace 16 (ATTACH) 30391 0 30389 calling waitpid 30391 for << daemon attached >> returns 0x137f WIFSTOPPED 19 -- ok30389 calling ptrace 21 (SETOPTIONS) 30391 80 30389 calling ptrace 7 (CONT) 30391 10 30389 calling waitpid 30391 for << daemon stops at exec >>30391 received User defined signal 1 returns 0x4057f WIFSTOPPED 5 -- ok 30389 calling ptrace 7 (CONT) 30391 0 30389 calling waitpid 30391 for << daemon stops at exit(47) >>30391 argc 3 0 47 exiting 30391 with 47 returns 0x6057f WIFSTOPPED 5 -- ok 30389 calling ptrace 7 (CONT) 30391 0 30389 calling waitpid 30391 for << daemon does exit(47) >> returns 0x2f00 WIFEXITED 47 -- ok 30389 calling waitpid 30391 for << no children >> fails (No child processes) -- ok vs bad output (from FC5.18): 24081 installing signal handler and mask 24081 forking 24083 signalling 24081 with User defined signal 1 24083 waiting for signals 24081 calling waitpid 24082 for << child for daemon exits >> returns 0x0 WIFEXITED 0 -- ok 24081 waiting for signals 24081 received User defined signal 1 24081 calling ptrace 16 (ATTACH) 24083 0 24081 calling waitpid 24083 for << daemon attached >> returns 0x137f WIFSTOPPED 19 -- ok 24081 calling ptrace 21 (SETOPTIONS) 24083 80 24081 calling ptrace 7 (CONT) 24083 10 24081 calling waitpid 24083 for << daemon stops at exec >>24083 received User defined signal 1 returns 0x4057f WIFSTOPPED 5 -- ok 24081 calling ptrace 7 (CONT) 24083 0 24081 calling waitpid 24083 for << daemon stops at exit(47) >>24083 argc 3 0 47 exiting 24083 with 47 returns 0x6057f WIFSTOPPED 5 -- ok 24081 calling ptrace 7 (CONT) 24083 0 24081 calling waitpid 24083 for << daemon does exit(47) >> returns 0x2f WIFSIGNALED 47 -- WIFEXITED 47 expected Aborted (core dumped) Down stream FC6 bug: https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=216020 Testcase committed, set to must pass. *** Bug 3489 has been marked as a duplicate of this bug. *** *** Bug 3865 has been marked as a duplicate of this bug. *** *** Bug 260998 has been marked as a duplicate of this bug. *** Seen from the domain http://volichat.com Page where seen: http://volichat.com/adult-chat-rooms Marked for reference. Resolved as fixed @bugzilla. |