* [Bug general/3639] fc6: testTerminateKillKILL(frysk.proc.TestTaskTerminateObserver)
2006-12-04 18:08 [Bug general/3639] New: fc6: testTerminateKillKILL(frysk.proc.TestTaskTerminateObserver) cmoller at redhat dot com
@ 2006-12-04 20:05 ` cagney at redhat dot com
2007-01-31 22:15 ` cagney at redhat dot com
` (14 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: cagney at redhat dot com @ 2006-12-04 20:05 UTC (permalink / raw)
To: frysk-bugzilla
------- Additional Comments From cagney at redhat dot com 2006-12-04 20:05 -------
*** This bug has been marked as a duplicate of 3489 ***
--
What |Removed |Added
----------------------------------------------------------------------------
OtherBugsDependingO|2654 |3489
nThis| |
Status|NEW |RESOLVED
Resolution| |DUPLICATE
Summary|fc6: |fc6:
|testTerminateKillKILL(frysk.|testTerminateKillKILL(frysk.
|proc.TestTaskTerminateObserv|proc.TestTaskTerminateObserv
|er) |er)
http://sourceware.org/bugzilla/show_bug.cgi?id=3639
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug general/3639] fc6: testTerminateKillKILL(frysk.proc.TestTaskTerminateObserver)
2006-12-04 18:08 [Bug general/3639] New: fc6: testTerminateKillKILL(frysk.proc.TestTaskTerminateObserver) cmoller at redhat dot com
2006-12-04 20:05 ` [Bug general/3639] " cagney at redhat dot com
@ 2007-01-31 22:15 ` cagney at redhat dot com
2007-01-31 22:16 ` cagney at redhat dot com
` (13 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: cagney at redhat dot com @ 2007-01-31 22:15 UTC (permalink / raw)
To: frysk-bugzilla
------- Additional Comments From cagney at redhat dot com 2007-01-31 22:15 -------
Fixes to make exit47 test case pass, do not fix this bug. Assuming a separate
problem and re-splitting.
--
What |Removed |Added
----------------------------------------------------------------------------
OtherBugsDependingO|3489 |2654, 3385
nThis| |
Status|RESOLVED |REOPENED
Resolution|DUPLICATE |
http://sourceware.org/bugzilla/show_bug.cgi?id=3639
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug general/3639] fc6: testTerminateKillKILL(frysk.proc.TestTaskTerminateObserver)
2006-12-04 18:08 [Bug general/3639] New: fc6: testTerminateKillKILL(frysk.proc.TestTaskTerminateObserver) cmoller at redhat dot com
2006-12-04 20:05 ` [Bug general/3639] " cagney at redhat dot com
2007-01-31 22:15 ` cagney at redhat dot com
@ 2007-01-31 22:16 ` cagney at redhat dot com
2007-01-31 22:22 ` cagney at redhat dot com
` (12 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: cagney at redhat dot com @ 2007-01-31 22:16 UTC (permalink / raw)
To: frysk-bugzilla
------- Additional Comments From cagney at redhat dot com 2007-01-31 22:16 -------
*** Bug 3640 has been marked as a duplicate of this bug. ***
--
http://sourceware.org/bugzilla/show_bug.cgi?id=3639
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug general/3639] fc6: testTerminateKillKILL(frysk.proc.TestTaskTerminateObserver)
2006-12-04 18:08 [Bug general/3639] New: fc6: testTerminateKillKILL(frysk.proc.TestTaskTerminateObserver) cmoller at redhat dot com
` (2 preceding siblings ...)
2007-01-31 22:16 ` cagney at redhat dot com
@ 2007-01-31 22:22 ` cagney at redhat dot com
2007-03-26 16:26 ` cmoller at redhat dot com
` (11 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: cagney at redhat dot com @ 2007-01-31 22:22 UTC (permalink / raw)
To: frysk-bugzilla
------- Additional Comments From cagney at redhat dot com 2007-01-31 22:22 -------
RHEL https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=226684
--
http://sourceware.org/bugzilla/show_bug.cgi?id=3639
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug general/3639] fc6: testTerminateKillKILL(frysk.proc.TestTaskTerminateObserver)
2006-12-04 18:08 [Bug general/3639] New: fc6: testTerminateKillKILL(frysk.proc.TestTaskTerminateObserver) cmoller at redhat dot com
` (3 preceding siblings ...)
2007-01-31 22:22 ` cagney at redhat dot com
@ 2007-03-26 16:26 ` cmoller at redhat dot com
2007-03-26 16:55 ` cagney at redhat dot com
` (10 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: cmoller at redhat dot com @ 2007-03-26 16:26 UTC (permalink / raw)
To: frysk-bugzilla
------- Additional Comments From cmoller at redhat dot com 2007-03-26 17:26 -------
What's happening is that in TestTaskTerminateObserver.java,
Terminate.updateTerminating(...) is never executed when funit-exit is passed a -
Sig.KILL_. Before I go to all the effort of possibly re-chasing an already
chased bug, I thought I'd ask about the possibility that this is related to the
x-state bug; i.e., is a "terminating" condition related to the transient X
state? If so, if you SIGKILL a process, is it possible to miss a "terminating"
and go straight to "terminated?"
(A little background for Roland, to whom I've cc-ed this: this is a bug where a
process being sent a kill(SIGKILL) should trigger a "terminating" observer, but
doesn't seem to be doing that.)
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |roland at redhat dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=3639
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug general/3639] fc6: testTerminateKillKILL(frysk.proc.TestTaskTerminateObserver)
2006-12-04 18:08 [Bug general/3639] New: fc6: testTerminateKillKILL(frysk.proc.TestTaskTerminateObserver) cmoller at redhat dot com
` (4 preceding siblings ...)
2007-03-26 16:26 ` cmoller at redhat dot com
@ 2007-03-26 16:55 ` cagney at redhat dot com
2007-03-26 18:34 ` cmoller at redhat dot com
` (9 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: cagney at redhat dot com @ 2007-03-26 16:55 UTC (permalink / raw)
To: frysk-bugzilla
------- Additional Comments From cagney at redhat dot com 2007-03-26 17:55 -------
The waitpid call should return a reasonable value. For instance:
-> some sort of error indication, for instance ESRCH, EINTR, ...
-> PID killed with -9
But instead it's getting back that the process exited with 128.
Our tests show that exit47, the previous bug, is fixed.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=3639
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug general/3639] fc6: testTerminateKillKILL(frysk.proc.TestTaskTerminateObserver)
2006-12-04 18:08 [Bug general/3639] New: fc6: testTerminateKillKILL(frysk.proc.TestTaskTerminateObserver) cmoller at redhat dot com
` (5 preceding siblings ...)
2007-03-26 16:55 ` cagney at redhat dot com
@ 2007-03-26 18:34 ` cmoller at redhat dot com
2007-03-26 20:11 ` cagney at redhat dot com
` (8 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: cmoller at redhat dot com @ 2007-03-26 18:34 UTC (permalink / raw)
To: frysk-bugzilla
------- Additional Comments From cmoller at redhat dot com 2007-03-26 19:34 -------
Okay, I'll chase that, but it's not the only possibility.
TestTaskTerminateObserver.Terminate initialises int terminating = INVALID (where
INVALID = 128), but public Action updateTerminating (...) never runs, leaving
terminating = INVALID, which is the proximate cause of the failure. I'll wire
up the waitpid() and check if it's causing the problem.
The exit47 test does indeed pass.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=3639
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug general/3639] fc6: testTerminateKillKILL(frysk.proc.TestTaskTerminateObserver)
2006-12-04 18:08 [Bug general/3639] New: fc6: testTerminateKillKILL(frysk.proc.TestTaskTerminateObserver) cmoller at redhat dot com
` (6 preceding siblings ...)
2007-03-26 18:34 ` cmoller at redhat dot com
@ 2007-03-26 20:11 ` cagney at redhat dot com
2007-03-26 20:23 ` cmoller at redhat dot com
` (7 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: cagney at redhat dot com @ 2007-03-26 20:11 UTC (permalink / raw)
To: frysk-bugzilla
------- Additional Comments From cagney at redhat dot com 2007-03-26 21:10 -------
Ah, so it is seeing no notification at all that the task was terminated?
--
http://sourceware.org/bugzilla/show_bug.cgi?id=3639
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug general/3639] fc6: testTerminateKillKILL(frysk.proc.TestTaskTerminateObserver)
2006-12-04 18:08 [Bug general/3639] New: fc6: testTerminateKillKILL(frysk.proc.TestTaskTerminateObserver) cmoller at redhat dot com
` (7 preceding siblings ...)
2007-03-26 20:11 ` cagney at redhat dot com
@ 2007-03-26 20:23 ` cmoller at redhat dot com
2007-03-26 20:51 ` cagney at redhat dot com
` (6 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: cmoller at redhat dot com @ 2007-03-26 20:23 UTC (permalink / raw)
To: frysk-bugzilla
------- Additional Comments From cmoller at redhat dot com 2007-03-26 21:23 -------
Yeah, for SIGKILL, updateTerminating never gets hit; updateTerminated does. The
pattern of waitpid returns is similar in all test cases (terminate(),
terminated(), and terminating()), nothing unexpected, but the first two fail for
a lack of a terminating event.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=3639
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug general/3639] fc6: testTerminateKillKILL(frysk.proc.TestTaskTerminateObserver)
2006-12-04 18:08 [Bug general/3639] New: fc6: testTerminateKillKILL(frysk.proc.TestTaskTerminateObserver) cmoller at redhat dot com
` (8 preceding siblings ...)
2007-03-26 20:23 ` cmoller at redhat dot com
@ 2007-03-26 20:51 ` cagney at redhat dot com
2007-03-26 20:52 ` roland at gnu dot org
` (5 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: cagney at redhat dot com @ 2007-03-26 20:51 UTC (permalink / raw)
To: frysk-bugzilla
------- Additional Comments From cagney at redhat dot com 2007-03-26 21:51 -------
Nice analysis.
Can you check that this is an intended behavior change with Roland.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=3639
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug general/3639] fc6: testTerminateKillKILL(frysk.proc.TestTaskTerminateObserver)
2006-12-04 18:08 [Bug general/3639] New: fc6: testTerminateKillKILL(frysk.proc.TestTaskTerminateObserver) cmoller at redhat dot com
` (9 preceding siblings ...)
2007-03-26 20:51 ` cagney at redhat dot com
@ 2007-03-26 20:52 ` roland at gnu dot org
2007-03-27 3:40 ` cmoller at redhat dot com
` (4 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: roland at gnu dot org @ 2007-03-26 20:52 UTC (permalink / raw)
To: frysk-bugzilla
------- Additional Comments From roland at gnu dot org 2007-03-26 21:52 -------
I don't know what's going on in the frysk world, but a couple things from the
kernel side might be relevant.
First is that for death by SIGKILL you may well not see any EXIT event
(WIFSTOPPED, SIGTRAP|PTRACE_EVENT_EXIT<<16).
You will see the death event (WIFSIGNALED) for sure except possibly in the case
of multi-threaded exec by a non-leader thread (when you won't see a report from
the old leader, but the exec'ing thread will change its PID to the leader's).
Second is there is a rare race bug in kernels before the recent test kernels,
that can produce a bogus wait status value. The bogus value will be a
WIFSTOPPED with WSTOPSIG 0 or some high bits set. This is a very unlikely race.
Also, it doesn't produce a WIFEXITED value in the bug case, so it doesn't seem
likely to be relevant to what you are seeing.
Nothing comes to mind with a bogus status of 0x8000. An _exit(128) produces
that status.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=3639
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug general/3639] fc6: testTerminateKillKILL(frysk.proc.TestTaskTerminateObserver)
2006-12-04 18:08 [Bug general/3639] New: fc6: testTerminateKillKILL(frysk.proc.TestTaskTerminateObserver) cmoller at redhat dot com
` (10 preceding siblings ...)
2007-03-26 20:52 ` roland at gnu dot org
@ 2007-03-27 3:40 ` cmoller at redhat dot com
2007-03-27 3:49 ` roland at gnu dot org
` (3 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: cmoller at redhat dot com @ 2007-03-27 3:40 UTC (permalink / raw)
To: frysk-bugzilla
------- Additional Comments From cmoller at redhat dot com 2007-03-27 04:39 -------
Created an attachment (id=1653)
--> (http://sourceware.org/bugzilla/attachment.cgi?id=1653&action=view)
side by side trace comparison
This attachment shows the diagnostic output of two failing tests and one
passing test, all of which do a kill(SIGKILL). None of the tests get a
"terminating" event--the one that passes does so only because it's not
/expecting/ a terminating event.
None of the waitpid()s look wrong to me except possibly lines 13 and 14: should
there really be two waitpid()s in a row returning WIFSIGNALED(9) on the same
task?
--
http://sourceware.org/bugzilla/show_bug.cgi?id=3639
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug general/3639] fc6: testTerminateKillKILL(frysk.proc.TestTaskTerminateObserver)
2006-12-04 18:08 [Bug general/3639] New: fc6: testTerminateKillKILL(frysk.proc.TestTaskTerminateObserver) cmoller at redhat dot com
` (11 preceding siblings ...)
2007-03-27 3:40 ` cmoller at redhat dot com
@ 2007-03-27 3:49 ` roland at gnu dot org
2007-03-27 16:07 ` cmoller at redhat dot com
` (2 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: roland at gnu dot org @ 2007-03-27 3:49 UTC (permalink / raw)
To: frysk-bugzilla
------- Additional Comments From roland at gnu dot org 2007-03-27 04:49 -------
Your trace doesn't indicate whether different threads are doing different wait
calls or did ptrace calls or forks. If thread A forks a child, and thread B
does PTRACE_ATTACH to that child, then on death there is one report "to B" (but
available to all threads in the same process calling wait*) and then there is a
second one "to A". The second one happens because you are the real parent of
the child that is no longer ptrace'd after the ptracer's wait returns
WIFSIGNALED/WIFEXITED. The first one happens because you are the ptracer but
not the real parent, but there are two of you so all things can be true and false.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=3639
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug general/3639] fc6: testTerminateKillKILL(frysk.proc.TestTaskTerminateObserver)
2006-12-04 18:08 [Bug general/3639] New: fc6: testTerminateKillKILL(frysk.proc.TestTaskTerminateObserver) cmoller at redhat dot com
` (12 preceding siblings ...)
2007-03-27 3:49 ` roland at gnu dot org
@ 2007-03-27 16:07 ` cmoller at redhat dot com
2007-04-05 15:22 ` cagney at redhat dot com
2007-07-04 19:06 ` cagney at redhat dot com
15 siblings, 0 replies; 17+ messages in thread
From: cmoller at redhat dot com @ 2007-03-27 16:07 UTC (permalink / raw)
To: frysk-bugzilla
------- Additional Comments From cmoller at redhat dot com 2007-03-27 17:07 -------
Here's what's happening:
1. Wait.cxx:processStatus() decodes the waitpid status and if (WIFSTOPPED
(status) && (PTRACE_EVENT_EXIT == WSTOPEVENT (status))) it calls exitEvent()
2. LinuxPtraceHost.PollWaitOnSigChld.exitEvent() calls processTerminatingEvent()
3. Task.processTerminatingEvent() calls .handleTerminatingEvent()
4. LinuxPtraceTaskState.handleTerminatingEvent() calls notifyTerminating()
5. Task.notifyTerminating() calls updateTerminating()
6. TestTaskTerminateObserver. updateTerminating sets the int terminating value.
If, in Wait.cxx:processStatus(), status == 9, (KILL), WIFSIGNALED (status) is
true rather than WIFSTOPPED (status), so none of the foregoing happens, causing
the test to fail. What I don't know is if the process described above is in
fact what the programmer who wrote it intended and the test exercises conditions
that weren't meant to be exercised, or if the process described is flawed or
incomplete.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=3639
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug general/3639] fc6: testTerminateKillKILL(frysk.proc.TestTaskTerminateObserver)
2006-12-04 18:08 [Bug general/3639] New: fc6: testTerminateKillKILL(frysk.proc.TestTaskTerminateObserver) cmoller at redhat dot com
` (13 preceding siblings ...)
2007-03-27 16:07 ` cmoller at redhat dot com
@ 2007-04-05 15:22 ` cagney at redhat dot com
2007-07-04 19:06 ` cagney at redhat dot com
15 siblings, 0 replies; 17+ messages in thread
From: cagney at redhat dot com @ 2007-04-05 15:22 UTC (permalink / raw)
To: frysk-bugzilla
------- Additional Comments From cagney at redhat dot com 2007-04-05 16:22 -------
(In reply to comment #14)
> If, in Wait.cxx:processStatus(), status == 9, (KILL), WIFSIGNALED (status) is
> true rather than WIFSTOPPED (status), so none of the foregoing happens, causing
> the test to fail. What I don't know is if the process described above is in
> fact what the programmer who wrote it intended and the test exercises conditions
> that weren't meant to be exercised, or if the process described is flawed or
> incomplete.
The programmer, me, didn't know that the "terminating" event was not guarenteed
when the process was killed using -9. Just the testcase needs to be adjusted to
be more flexable.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=3639
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug general/3639] fc6: testTerminateKillKILL(frysk.proc.TestTaskTerminateObserver)
2006-12-04 18:08 [Bug general/3639] New: fc6: testTerminateKillKILL(frysk.proc.TestTaskTerminateObserver) cmoller at redhat dot com
` (14 preceding siblings ...)
2007-04-05 15:22 ` cagney at redhat dot com
@ 2007-07-04 19:06 ` cagney at redhat dot com
15 siblings, 0 replies; 17+ messages in thread
From: cagney at redhat dot com @ 2007-07-04 19:06 UTC (permalink / raw)
To: frysk-bugzilla
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|frysk-bugzilla at sourceware|cagney at redhat dot com
|dot org |
Status|REOPENED |ASSIGNED
http://sourceware.org/bugzilla/show_bug.cgi?id=3639
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
^ permalink raw reply [flat|nested] 17+ messages in thread