[ 
https://issues.apache.org/jira/browse/QPID-4782?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13645489#comment-13645489
 ] 

Robbie Gemmell commented on QPID-4782:
--------------------------------------

r1476583 merged to the 0.22 release branch via: http://svn.apache.org/r1477567
                
> [Java Broker] ConnectionAdapter.getSessions() can cause a 
> ConcurrentModificationException
> -----------------------------------------------------------------------------------------
>
>                 Key: QPID-4782
>                 URL: https://issues.apache.org/jira/browse/QPID-4782
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Broker
>    Affects Versions: 0.20
>            Reporter: Robbie Gemmell
>            Assignee: Robbie Gemmell
>             Fix For: 0.22
>
>
> Changes made via QPID-4760 exposed a defect in 
> ConnectionAdapter.getSessions() which can cause a 
> ConcurrentModificationException. This is due to unsafe use of map.remove() 
> whilst iterating the map keyset. The code will be change to use an Iterator 
> and call iterator.remove instead.
> Recent test failure stacktrace showing the issue:
> {noformat}
> IoReceiver - /127.0.0.1:60051 2013-04-26 15:25:31,050 ERROR 
> [qpid.server.transport.ServerSessionDelegate] Exception processing command
> java.util.ConcurrentModificationException
>       at java.util.HashMap$HashIterator.nextEntry(HashMap.java:806)
>       at java.util.HashMap$KeyIterator.next(HashMap.java:841)
>       at 
> org.apache.qpid.server.model.adapter.ConnectionAdapter.getSessions(ConnectionAdapter.java:67)
>       at 
> org.apache.qpid.server.model.adapter.ConnectionAdapter.getSessionAdapter(ConnectionAdapter.java:97)
>       at 
> org.apache.qpid.server.model.adapter.QueueAdapter.getSessionAdapter(QueueAdapter.java:118)
>       at 
> org.apache.qpid.server.model.adapter.QueueAdapter.subscriptionRegistered(QueueAdapter.java:616)
>       at 
> org.apache.qpid.server.queue.SimpleAMQQueue.registerSubscription(SimpleAMQQueue.java:447)
>       at 
> org.apache.qpid.server.transport.ServerSessionDelegate.messageSubscribe(ServerSessionDelegate.java:266)
>       at 
> org.apache.qpid.server.transport.ServerSessionDelegate.messageSubscribe(ServerSessionDelegate.java:73)
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to