[jboss-jira] [JBoss JIRA] Commented: (JBREM-785) BisocketClientInvoker.transport() inadvertently uses listenerId member variable

Ron Sigal (JIRA) jira-events at lists.jboss.org
Thu Aug 2 03:54:49 EDT 2007


    [ http://jira.jboss.com/jira/browse/JBREM-785?page=comments#action_12370835 ] 
            
Ron Sigal commented on JBREM-785:
---------------------------------

The fix has been applied to the remoting_2_2_0_GA branch.

Unit test:  org.jboss.test.remoting.transport.bisocket.listenerID.ListenerIDonStackTestCase.

> BisocketClientInvoker.transport() inadvertently uses listenerId member variable
> -------------------------------------------------------------------------------
>
>                 Key: JBREM-785
>                 URL: http://jira.jboss.com/jira/browse/JBREM-785
>             Project: JBoss Remoting
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>    Affects Versions: 2.4.0.Beta1 (Pinto), 2.2.1.GA, 2.2.0.SP4_CP02, 2.2.1.SP1
>            Reporter: Ron Sigal
>         Assigned To: Ron Sigal
>             Fix For: 2.4.0.Beta1 (Pinto), 2.2.0.SP4_CP02, 2.2.1.SP1
>
>
> org.jboss.remoting.transport.bisocket.BisocketClientInvoker.transport() sets listenerId member variable, instead of creating a new variable on the stack.  As a result, there is a race condition if multiple org.jboss.remoting.Client's call addListener() on the same server.  Each entering thread would attempt to add a (listenerId, BisocketClientInvoker) pair to listenerIdToClientInvokerMap, and under the right circumstances, one or more of the threads could experience the overwriting of the listenerId variable, which would lead to a missing pair in listenerIdToClientInvokerMap.
> The fix is just to use a stack variable instead of the member variable.

-- 
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