Bug 2761

Summary: Race condition in frysk-core.
Product: frysk Reporter: Nurdin Premji <npremji>
Component: generalAssignee: Unassigned <frysk-bugzilla>
Status: NEW ---    
Severity: normal    
Priority: P2    
Version: unspecified   
Target Milestone: ---   
Host: Target:
Build: Last reconfirmed:
Bug Depends on:    
Bug Blocks: 1553    

Description Nurdin Premji 2006-06-13 15:02:27 UTC
Every other time I run a test case I created it dies with the error:
Test is in frysk-core frysk.proc.TestOffspringObserver

testForkThenClone(frysk.proc.TestOffspringObserver)java.lang.RuntimeException:
{frysk.proc.LinuxTask@5cc720,pid=6403,tid=6403,state=attaching} in state
"attaching" did not handle handleSignaledEvent
   at frysk.proc.State.unhandled(TestRunner)
   at frysk.proc.TaskState.handleSignaledEvent(TestRunner)
   at frysk.proc.Task.processSignaledEvent(TestRunner)
   at frysk.proc.LinuxHost$PollWaitOnSigChld$2.stopped(TestRunner)
   at frysk.sys.Wait.waitAllNoHang(TestRunner)
   at frysk.proc.LinuxHost$PollWaitOnSigChld.execute(TestRunner)
   at frysk.event.EventLoop.runEventLoop(TestRunner)
   at frysk.event.EventLoop.runPolling(TestRunner)
   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.TestLib$AckProcess.spawn(TestRunner)
   at frysk.proc.TestLib$AckProcess.addFork(TestRunner)
   at frysk.proc.TestOffspringObserver.testForkThenClone(TestRunner)
   at frysk.junit.Runner.<init>(TestRunner)
   at TestRunner.main(TestRunner)
Comment 1 Nurdin Premji 2006-12-12 16:26:26 UTC
This testcase was removed from the test suite since the ProcTasksObserver
(previously OffspringObserver) is only supposed to observe clone events.

In order to be notified of any possible Offspring a TaskObserver must be created
that implements both Forked and Cloned and this observer should be added to each
thread of a process (probably with a ProcBlockAction) the observer's
updateXXXChild (where XXX is either Forked or Cloned) should add the observer to
the child as well.