You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Rob Davies (JIRA)" <ji...@apache.org> on 2007/08/20 07:51:22 UTC

[jira] Assigned: (AMQ-1250) 4.2 Broker memory leak wrt rejected incoming connections

     [ https://issues.apache.org/activemq/browse/AMQ-1250?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rob Davies reassigned AMQ-1250:
-------------------------------

    Assignee: Rob Davies

> 4.2 Broker memory leak wrt rejected incoming connections
> --------------------------------------------------------
>
>                 Key: AMQ-1250
>                 URL: https://issues.apache.org/activemq/browse/AMQ-1250
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.0.0
>            Reporter: Kevin Yaussy
>            Assignee: Rob Davies
>             Fix For: 5.0.0
>
>         Attachments: TransportConnection.java
>
>
> There's another memory leak in the broker, which happens when the broker rejects a new connection attempt (say, when the broker thinks the current clientId already exists).  The problem is in org/apache/activemq/broker/TransportConnection::processAddConnection.  The line of code which calls broker.addConnection might throw an exception (i.e. if the clientId already exists), but the two HashMaps (brokerConnectionStates and localConnectionStates) have already been added to.  So, the exception is thrown and propagated back, but the two maps have not been emptied.
> To fix this, I put a try-catch around the broker.addConnection, and if there's an exception, I remove the items from the two maps and then rethrow the exception.  Not sure if this is exactly the proper change - is there some other method that gets called in TransportConnection after the exception is thrown back?  I didn't immediately find anything.
> So far, this change has been working for us.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.