activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kevin Yaussy (JIRA)" <j...@apache.org>
Subject [jira] Created: (AMQ-1250) 4.2 Broker memory leak wrt rejected incoming connections
Date Wed, 23 May 2007 15:52:34 GMT
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: 4.2.0
            Reporter: Kevin Yaussy
             Fix For: 4.2.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.


Mime
View raw message