[jboss-jira] [JBoss JIRA] Commented: (JGRP-748) Change in start() and connect() introduced new bug in the shared transport
Bela Ban (JIRA)
jira-events at lists.jboss.org
Wed Apr 30 10:30:31 EDT 2008
[ http://jira.jboss.com/jira/browse/JGRP-748?page=comments#action_12411347 ]
Bela Ban commented on JGRP-748:
-------------------------------
The bug is that UDP.handleDisconnect() closes the sockets and stops all threads, so the messages are not processed when we have a shared transport. Ditto for handleConnect().
SOLUTION: we need to reference-count connects and disconnects wrt the shared transport and *only* really disconnect on the *last* channel disconnected. Same for connect: only create sockets and start threads on the *first* connect.
> Change in start() and connect() introduced new bug in the shared transport
> --------------------------------------------------------------------------
>
> Key: JGRP-748
> URL: http://jira.jboss.com/jira/browse/JGRP-748
> Project: JGroups
> Issue Type: Sub-task
> Reporter: Bela Ban
> Assigned To: Bela Ban
>
> [Vladimir]
> This change caused SharedTransportTest#testReferenceCounting to start failing. As soon as one channel sharing transport layer calls disconnect we shut down threads receiving packets.
> Can you access JIRA and cvs. Both are not working for me!
> Vladimir
> Bela Ban wrote:
> > User: belaban Date: 08/04/23 02:21:53
> >
> > Modified: src/org/jgroups/protocols Tag: Branch_JGroups_2_6 UDP.java
> > Log:
> > moved thread starting to handleConnect() from start() (http://jira.jboss.com/jira/browse/JGRP-738)
> > Revision Changes Path
> > No revision
> > No revision
> > 1.156.2.3 +8 -4 JGroups/src/org/jgroups/protocols/UDP.java
> > Index: UDP.java
> > ===================================================================
> > RCS file: /cvsroot/javagroups/JGroups/src/org/jgroups/protocols/UDP.java,v
> > retrieving revision 1.156.2.2
> > retrieving revision 1.156.2.3
> > diff -u -r1.156.2.2 -r1.156.2.3
> > --- UDP.java 3 Apr 2008 08:04:19 -0000 1.156.2.2
> > +++ UDP.java 23 Apr 2008 09:21:53 -0000 1.156.2.3
> > @@ -37,7 +37,7 @@
> > * input buffer overflow, consider setting this property to true.
> > * </ul>
> > * @author Bela Ban
> > - * @version $Id: UDP.java,v 1.156.2.2 2008/04/03 08:04:19 belaban Exp $
> > + * @version $Id: UDP.java,v 1.156.2.3 2008/04/23 09:21:53 belaban Exp $
> > */
> > public class UDP extends TP implements Runnable {
> > @@ -366,7 +366,7 @@
> > throw new Exception(tmp, ex);
> > }
> > super.start();
> > - startThreads();
> > + // startThreads();
> > }
> > @@ -377,9 +377,13 @@
> > super.stop();
> > }
> > + protected void handleConnect() throws Exception {
> > + startThreads();
> > + }
> > -
> > -
> > + protected void handleDisconnect() {
> > + stopThreads();
> > + }
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list