[jboss-jira] [JBoss JIRA] Commented: (JGRP-1027) Race conditions can have NAKACK try to send to hosts don't have a receiver window yet
Bela Ban (JIRA)
jira-events at lists.jboss.org
Mon Apr 26 05:27:10 EDT 2010
[ https://jira.jboss.org/jira/browse/JGRP-1027?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12527521#action_12527521 ]
Bela Ban commented on JGRP-1027:
--------------------------------
The unit test is flawed, it sends a message in viewAccepted() using Channel.down() instead of Channel.send(). Had you used Channel.send(), you'd get an unconnected exception.
When viewAccepted is called, the current channel may or may not yet be connected (if this is the first view), so you cannot depend on being able to send a message, the javadocs for viewAccepted() is:
/**
* Called when a change in membership has occurred.
* <b>No long running actions or sending of messages should be done in this callback.</b>
* If some long running action needs to be performed, it should be done in a separate thread.<p/>
* Note that on reception of the first view (a new member just joined), the channel will not yet be
* in the connected state. This only happens when {@link Channel#connect(String)} returns.
*/
void viewAccepted(View new_view);
Setting an initial seqno to the default (1) is dangerous, as the seqnos are only set via initial digests. So I don't know what the ramifications are, but I certainly don't want to change that code and possibly introduce subtle bugs.
> Race conditions can have NAKACK try to send to hosts don't have a receiver window yet
> --------------------------------------------------------------------------------------
>
> Key: JGRP-1027
> URL: https://jira.jboss.org/jira/browse/JGRP-1027
> Project: JGroups
> Issue Type: Bug
> Affects Versions: 2.6.12
> Reporter: Gray Watson
> Assignee: Bela Ban
> Priority: Minor
> Fix For: 2.10
>
> Attachments: NAKACK.java.patch, NAKACKEarlyTest.java, NAKACKEarlyTest.java
>
>
> We have seen NPEs in NAKACK trying to send to hosts who do not have a registered receiver window. I'd like to apply the attached patch which does a better job of creating a receiver window on the fly in these circumstances. One issue what the sequence number should be initialize to -- the patch uses 0 which has worked for us.
> Thanks,
--
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