Bug 3598 - testDetachExec(frysk.proc.TestTaskObserverDetach)junit.framework.AssertionFailedError: stat.state expected:<T> but was:<S>
Summary: testDetachExec(frysk.proc.TestTaskObserverDetach)junit.framework.AssertionFai...
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:
: 3594 3636 3637 3638 (view as bug list)
Depends on: 3594 3636 3637 3638
Blocks: 2104 2654
  Show dependency treegraph
 
Reported: 2006-11-27 18:19 IST by Nurdin Premji
Modified: 2006-12-05 03:03 IST (History)
2 users (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 Nurdin Premji 2006-11-27 18:19:53 IST
Happens occassionally

testDetachExec(frysk.proc.TestTaskObserverDetach)junit.framework.AssertionFailedError:
stat.state expected:<T> but was:<S>
   at frysk.proc.TestTaskObserverDetach$Detach.assertDetach(TestRunner)
   at frysk.proc.TestTaskObserverDetach.testDetachExec(TestRunner)
   at frysk.junit.Runner.runCases(TestRunner)
   at frysk.junit.Runner.runArchCases(TestRunner)
   at frysk.junit.Runner.runTestCases(TestRunner)
   at TestRunner.main(TestRunner)
Comment 1 Nurdin Premji 2006-11-27 18:20:29 IST
With ./frysk-core/TestRunner -r 1000 frysk.proc.TestTaskObserverDetach
on fc6
Comment 2 Andrew Cagney 2006-12-04 17:11:17 IST
Reproduced with:
  Mon Dec  4 12:10:04 EST 2006
sources on:
  Linux nettle 2.6.18-1.2239.fc5 #1 Fri Nov 10 13:04:06 EST 2006 i686 i686 i386
GNU/Linux
kernel.
Comment 3 Andrew Cagney 2006-12-04 17:29:38 IST
toadstool$ uname -a
Linux toadstool.toronto.redhat.com 2.6.17-1.2174_FC5 #1 Tue Aug 8 15:30:55 EDT
2006 i686 i686 i386 GNU/Linux

1)
testDetachClone(frysk.proc.TestTaskObserverDetach)junit.framework.AssertionFailedError:
pending signal Sig_USR1
   at frysk.proc.TestLib.tearDown(TestRunner)
   at frysk.junit.Runner.runCases(TestRunner)
   at frysk.junit.Runner.runArchCases(TestRunner)
   at frysk.junit.Runner.runTestCases(TestRunner)
   at TestRunner.main(TestRunner)
Comment 4 Andrew Cagney 2006-12-04 17:30:12 IST
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
1)
testDetachExec(frysk.proc.TestTaskObserverDetach)junit.framework.AssertionFailedError:
event loop run explictly stopped (adding signaled observer)
   at frysk.proc.TestLib.assertRunUntilStop(TestRunner)
   at frysk.proc.TestLib.assertRunUntilStop(TestRunner)
   at frysk.proc.TestTaskObserverDetach$Detach.<init>(TestRunner)
   at frysk.proc.TestTaskObserverDetach$4$DetachExec.<init>(TestRunner)
   at frysk.proc.TestTaskObserverDetach.testDetachExec(TestRunner)
   at frysk.junit.Runner.runCases(TestRunner)
   at frysk.junit.Runner.runArchCases(TestRunner)
   at frysk.junit.Runner.runTestCases(TestRunner)
   at TestRunner.main(TestRunner)
Comment 5 Andrew Cagney 2006-12-04 17:39:32 IST
repo on:
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

testDetachExec(frysk.proc.TestTaskObserverDetach)junit.framework.AssertionFailedError:
stat.state expected:<T> but was:<S>
   at frysk.proc.TestTaskObserverDetach$Detach.assertDetach(TestRunner)
   at frysk.proc.TestTaskObserverDetach.testDetachExec(TestRunner)
   at frysk.junit.Runner.runCases(TestRunner)
   at frysk.junit.Runner.runArchCases(TestRunner)
   at frysk.junit.Runner.runTestCases(TestRunner)
   at TestRunner.main(TestRunner)

but note that this fails in other ways also, see bugs hanging off this one.
Comment 6 Andrew Cagney 2006-12-04 18:19:32 IST
Test when run in isolation, and for 1000 times, passes just fine.
Comment 7 Andrew Cagney 2006-12-04 18:34:19 IST
Reducing test shows this fails:

Running testDetachFork(frysk.proc.TestTaskObserverDetach) ...PASS
Running testDetachExec(frysk.proc.TestTaskObserverDetach) ...FAIL
  junit.framework.AssertionFailedError: event loop run explictly stopped
(attempting detach (eventAcks (Sig_USR1)))

Time: 5.227
There was 1 failure:
1)
testDetachExec(frysk.proc.TestTaskObserverDetach)junit.framework.AssertionFailedError:
event loop run explictly stopped (attempting detach (eventAcks (Sig_USR1)))
   at frysk.proc.TestLib.assertRunUntilStop(TestRunner)
   at frysk.proc.TestLib.assertRunUntilStop(TestRunner)
   at frysk.proc.TestLib$AckHandler.assertAwait(TestRunner)
   at frysk.proc.TestLib$AckHandler.await(TestRunner)
   at frysk.proc.TestTaskObserverDetach$Detach.assertDetach(TestRunner)
   at frysk.proc.TestTaskObserverDetach.testDetachExec(TestRunner)
   at frysk.junit.Runner.runCases(TestRunner)
   at frysk.junit.Runner.runArchCases(TestRunner)
   at frysk.junit.Runner.runTestCases(TestRunner)
   at TestRunner.main(TestRunner)

FAILURES!!!
Tests run: 2,  Failures: 1,  Errors: 0

Comment 8 Andrew Cagney 2006-12-04 18:54:28 IST
From the log:

FINE: testDetachExec(frysk.proc.TestTaskObserverDetach) <<<<<<<<<<<<<<<< end setUp

3967.3967: received signal 13 (Broken pipe)
3967.3967: parent exit
3967.3967: process-parent switched to 1
3967.3967: notify 3941 with 10 (User defined signal 1) -- process-parent
switched to 1
4-Dec-06 1:36:22 PM frysk.proc.TestLib killDuringTearDown
FINE: testDetachExec(frysk.proc.TestTaskObserverDetach) killDuringTearDown 3969

I.e., the previous test's process was still running and sending frysk signals.

Comment 9 Andrew Cagney 2006-12-04 19:26:33 IST
3966.3966: forked 3967
3966.3966: notify 3941 with 12 (User defined signal 2) -- forked 3967
4-Dec-06 1:36:22 PM frysk.proc.TestLib$AckHandler$AckSignal execute

So the child forks, and the fork is blocked.  The parent is killed (during tear
down), the child then resumes and sends frysk a stray signal.

Need to kill this forked child.
Comment 10 Andrew Cagney 2006-12-04 21:11:22 IST
Index: frysk-core/frysk/proc/ChangeLog
2006-12-04  Andrew Cagney  <cagney@redhat.com>

        * Testlib.java (setUp): Add children of proceses already in
        tidsToKillDuringTearDown to tidsToKillDuringTearDown.
Comment 11 Andrew Cagney 2006-12-04 21:15:18 IST
*** Bug 3636 has been marked as a duplicate of this bug. ***
Comment 12 Andrew Cagney 2006-12-04 21:15:43 IST
*** Bug 3637 has been marked as a duplicate of this bug. ***
Comment 13 Andrew Cagney 2006-12-04 21:16:01 IST
*** Bug 3638 has been marked as a duplicate of this bug. ***
Comment 14 Andrew Cagney 2006-12-05 03:03:38 IST
*** Bug 3594 has been marked as a duplicate of this bug. ***