Bug 3525 - .18 and FC6 kernels returns two waitpid exit events for process
Summary: .18 and FC6 kernels returns two waitpid exit events for process
Status: RESOLVED FIXED
Alias: None
Product: frysk
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Andrew Cagney
URL:
Keywords:
: 3865 (view as bug list)
Depends on:
Blocks: 1496 3489
  Show dependency treegraph
 
Reported: 2006-11-15 21:10 UTC by Andrew Cagney
Modified: 2014-05-28 19:43 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Cagney 2006-11-15 21:10:19 UTC
Running testTerminateExit47(frysk.proc.TestTaskTerminateObserver) ...waitpid
status 19134 0x137f Success
waitpid status 0 0x4abe Success
stopped status 0x137f of 19134 is 19
waitpid status 19134 0x1e7f Success
waitpid status 0 0x4abe Success
stopped status 0x1e7f of 19134 is 30
waitpid status 19134 0x4057f Success
waitpid status 0 0x4abe Success
stopped status 0x4057f of 19134 is 5
waitpid status 19134 0x6057f Success
waitpid status 0 0x4abe Success
stopped status 0x6057f of 19134 is 5
waitpid status 19134 0x2f Success
waitpid status 19134 0x2f00 Success
waitpid status -1 0x4abe No child processes
signaled status 0x2f of 19134 is 47
exit status 0x2f00 for 19134 is 47
FAIL
  junit.framework.AssertionFailedError: terminated value expected:<47> but was:<-47>
Comment 1 Andrew Cagney 2006-11-16 17:16:50 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)
Comment 2 Andrew Cagney 2006-11-16 17:18:43 UTC
Note that the frysk process has its own special ptrace thread; i.e., the wait
and ptrace operations are occuring in _different_ threads.
Comment 3 Andrew Cagney 2006-11-16 19:41:43 UTC
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)
Comment 4 Andrew Cagney 2006-11-16 19:51:31 UTC
Down stream FC6 bug:
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=216020
Comment 5 Andrew Cagney 2006-11-23 20:39:17 UTC
Testcase committed, set to must pass.
Comment 6 Andrew Cagney 2006-11-27 15:44:49 UTC
*** Bug 3489 has been marked as a duplicate of this bug. ***
Comment 7 Andrew Cagney 2007-01-22 15:05:16 UTC
*** Bug 3865 has been marked as a duplicate of this bug. ***
Comment 8 Jackie Rosen 2014-02-16 19:33:12 UTC
*** 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.