[jboss-jira] [JBoss JIRA] Commented: (JGRP-843) Simulator initialization processes stack events before stack initialised

Bela Ban (JIRA) jira-events at lists.jboss.org
Thu Oct 23 02:32:31 EDT 2008


    [ https://jira.jboss.org/jira/browse/JGRP-843?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12435000#action_12435000 ] 

Bela Ban commented on JGRP-843:
-------------------------------

No

> Simulator initialization processes stack events before stack initialised
> ------------------------------------------------------------------------
>
>                 Key: JGRP-843
>                 URL: https://jira.jboss.org/jira/browse/JGRP-843
>             Project: JGroups
>          Issue Type: Bug
>         Environment: Using Simulator to test protocol layers in isolation.
>            Reporter: Richard Achmatowicz
>            Assignee: Richard Achmatowicz
>            Priority: Minor
>             Fix For: 2.7
>
>
> The Simulator.start() method in its original form does the following:
> (i) process Event.SET_LOCAL_ADDRESS
> (ii) process Event.VIEW_CHANGE 
> (iii) for each protocol layer, call init() followed by start()
> When used with the NAKACK layer, this throws an exception with the stack trace:
> org.jgroups.tests.NakackTest:
> java.lang.IllegalStateException: timer has to be provided and cannot be null
> 	at org.jgroups.stack.NakReceiverWindow.<init>(NakReceiverWindow.java:139)
> 	at org.jgroups.protocols.pbcast.NAKACK.createNakReceiverWindow(NAKACK.java:1325)
> 	at org.jgroups.protocols.pbcast.NAKACK.adjustReceivers(NAKACK.java:1176)
> 	at org.jgroups.protocols.pbcast.NAKACK.down(NAKACK.java:600)
> 	at org.jgroups.debug.Simulator.start(Simulator.java:147)
> 	at org.jgroups.tests.NakackTest.testReceptionOfAllMessages(NakackTest.java:165)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:585)
> 	at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:580)
> 	at org.testng.internal.InvokeMethodRunnable.runOne(InvokeMethodRunnable.java:49)
> 	at org.testng.internal.InvokeMethodRunnable.run(InvokeMethodRunnable.java:40)
> 	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:417)
> 	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
> 	at java.util.concurrent.FutureTask.run(FutureTask.java:123)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
> 	at java.lang.Thread.run(Thread.java:595)
> This exception arises because for NAKACK to process a VIEW_CHANGE, it needs to create a NakReceiverWindow, which requires access to the timer variable. This timer variable is initialised 
> in the call to NAKACK.init() which follows after.
> Solution is to move the processing of events above after the initialization of the layers.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list