[jboss-jira] [JBoss JIRA] Closed: (JBAS-7945) LookupSucceededFilter is not thread safe

Brian Stansberry (JIRA) jira-events at lists.jboss.org
Fri Apr 16 10:13:25 EDT 2010


     [ https://jira.jboss.org/jira/browse/JBAS-7945?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brian Stansberry closed JBAS-7945.
----------------------------------

    Resolution: Done


I did not change LookupSucceededFilter.isAcceptable() to return false if the response is null, Exception or NoHandlerForRpc. This leads to a problem in request handling if no "acceptable" response comes in. JGroups only marks a response as received and increments the received count if isAcceptable() returns true. And needMoreResponses() will only return false if an acceptable response comes in. The combination means if all responses come in but none are "acceptable", the caller will block until the RPC timeout kicks in and will then get a TimeoutException.

> LookupSucceededFilter is not thread safe
> ----------------------------------------
>
>                 Key: JBAS-7945
>                 URL: https://jira.jboss.org/jira/browse/JBAS-7945
>             Project: JBoss Application Server
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: Clustering
>    Affects Versions: JBossAS-5.1.0.CR1, JBossAS-5.1.0.GA, JBossAS-6.0.0.M2
>            Reporter: Brian Stansberry
>            Assignee: Brian Stansberry
>             Fix For: JBossAS-6.0.0.M3
>
>
> Access to the private boolean lookupSucceeded field is not controlled.
> It should be volatile with an initial false value and only set to true when an acceptable result is received. The only state change is to true.
> TruthfulResponseFilterUnitTestCase is intermittently failing, probably for the same reason. Here is the logging it generates when it fails: threads OOB-16 and OOB-15 are concurrently executing in the isAcceptableMethod().
> 2010-04-14 19:42:15,188 DEBUG [org.jboss.test.cluster.rspfilter.Echo] (RMI TCP Connection(70)-10.16.93.33) callEchoOnCluster(true, false, org.jboss.test.cluster.rspfilter.TruthfulResponseFilter at 34a502)
> 2010-04-14 19:42:15,201 DEBUG [org.jboss.test.cluster.rspfilter.TruthfulResponseFilter] (OOB-16,null) isAcceptable (true) from 10.16.93.34:55200
> 2010-04-14 19:42:15,202 DEBUG [org.jboss.test.cluster.rspfilter.TruthfulResponseFilter] (OOB-15,null) isAcceptable (false) from 10.16.93.33:55200
> 2010-04-14 19:42:15,202 DEBUG [org.jboss.test.cluster.rspfilter.TruthfulResponseFilter] (OOB-16,null) Lookup succeded from 10.16.93.34:55200
> 2010-04-14 19:42:15,202 DEBUG [org.jboss.test.cluster.rspfilter.TruthfulResponseFilter] (OOB-15,null) needMoreResponses? true
> 2010-04-14 19:42:15,202 DEBUG [org.jboss.test.cluster.rspfilter.TruthfulResponseFilter] (OOB-16,null) needMoreResponses? true
> I'll also change LookupSucceededFilter.isAcceptable() to return false if the response is null, Exception or NoHandlerForRpc. HAPartition or HAJNDI.lookupRemotely() already ignore such values so there is no point accepting them.

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