Bug 3581 - taskObserverBlocked hangs, sometimes on FC 6
Summary: taskObserverBlocked hangs, sometimes on FC 6
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:
Depends on:
Blocks: 1496 2654
  Show dependency treegraph
 
Reported: 2006-11-23 22:07 UTC by Andrew Cagney
Modified: 2006-11-27 15:10 UTC (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 Andrew Cagney 2006-11-23 22:07:37 UTC
cagney@towns$ while true ; do ./TestRunner frysk.proc.TestTaskObserverBlocked ; done
Running testGetBlockers(frysk.proc.TestTaskObserverBlocked) ...PASS
Running testBlockedCloneUnblockChildFirst(frysk.proc.TestTaskObserverBlocked)
...PASS
Running testBlockedCloneUnblockParentFirst(frysk.proc.TestTaskObserverBlocked)
...PASS
Running testBlockedForkUnblockChildFirst(frysk.proc.TestTaskObserverBlocked) ...PASS
Running testBlockedForkUnblockParentFirst(frysk.proc.TestTaskObserverBlocked)
...PASS
Running testRefreshAfterUnblockedForkExits(frysk.proc.TestTaskObserverBlocked)
...PASS
Running testAddObserverAfterUnblock(frysk.proc.TestTaskObserverBlocked) ...PASS
Running testBlockingFibonacciClone(frysk.proc.TestTaskObserverBlocked) ...ERROR
  java.util.ConcurrentModificationException
Running testBlockingFibonacciFork(frysk.proc.TestTaskObserverBlocked) ...ERROR
  java.lang.NullPointerException
Running testUnblockRunning(frysk.proc.TestTaskObserverBlocked) ...
Comment 1 Andrew Cagney 2006-11-26 21:16:28 UTC
Just these two tests:

Running testBlockingFibonacciClone(frysk.proc.TestTaskObserverBlocked) ...ERROR
  java.util.ConcurrentModificationException
Running testUnblockRunning(frysk.proc.TestTaskObserverBlocked) ...

triggers the hang.
Comment 2 Andrew Cagney 2006-11-26 21:19:51 UTC
The test testBlockingFibonacciClone(frysk.proc.TestTaskObserverBlocked)'s tear
down was failing - the java.util.ConcurrentModificationException - leaving a
process with the main TID dead but all the children still attached.  That would
cascade through to the next successful test which would then hang waiting for
the remaining tasks to exit.

The fix eliminates the ConcurrentModificationException making tearDown more robust.

Index: frysk-core/frysk/proc/ChangeLog
2006-11-26  Andrew Cagney  <cagney@redhat.com>

        * TestLib.java (tidsToKillDuringTearDown): Rename children.
        (capturedSendTkill): Rename capturedSendKill.
        (tearDown): When scanning for stray TIDs, iterate over a copy of
        tidsToKillDuringTearDown.