[jboss-jira] [JBoss JIRA] Commented: (JGRP-843) Simulator initialization processes stack events before stack initialised
Richard Achmatowicz (JIRA)
jira-events at lists.jboss.org
Wed Oct 22 21:08:20 EDT 2008
[ https://jira.jboss.org/jira/browse/JGRP-843?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12434984#action_12434984 ]
Richard Achmatowicz commented on JGRP-843:
------------------------------------------
Fixed this for 2.7, tested and committed changes.
Bela, should this also be fixed for 2.6 and 2.4 branch?
> 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: Bela Ban
> 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