activemq-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Feingold (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AMQ-5762) Severe memory leak in the MQTT connector
Date Thu, 14 May 2015 20:00:59 GMT

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

Michael Feingold commented on AMQ-5762:
---------------------------------------

I believe I know what's going on. It looks like every time a connection to any topic is closed,
some memory is leaked. The amount of memory leaked is ~100b times number of currently existing
durable topics. Therefore if the number of durable topics is low, the leak us so slow you
can hardly see it. Also if connect/disconnect is happening only once in a blue moon - same
thing. In my use case both are pretty high, so here we are.

I captured a few memory dumps while I was running my tests and they show that every time a
connection is disconnected, for every durable topic there are 2 objects leaking - a hashmap
and a linkedlist Node. You  can clearly see it in the heapdump compare screenshot (attached
https://issues.apache.org/jira/secure/attachment/12732941/Screen%20Shot%202015-05-14%20at%202.06.02%20PM.png).
Here is what I did:

1. on a clean install I created 2 durable topics via console
2. created a heapdump1
3. I ran a test connecting to the same topic and immediately disconnecting from it. The connect/dosconnect
cyscle was repeated 50000 times.
4. another heapdump created

What you see in the picture is a comparison between the two. You can clearly see the 2 culprits.

> Severe memory leak in the MQTT connector
> ----------------------------------------
>
>                 Key: AMQ-5762
>                 URL: https://issues.apache.org/jira/browse/AMQ-5762
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: MQTT
>    Affects Versions: 5.10.1, 5.10.2, 5.11.0, 5.11.1
>            Reporter: Michael Feingold
>            Assignee: Timothy Bish
>            Priority: Critical
>         Attachments: Screen Shot 2015-05-12 at 20.06.47.png, Screen Shot 2015-05-14 at
2.06.02 PM.png, activemq.xml, wrapper.conf
>
>
> When an MQTT connection is closed some memory is not released. In case of the soft close
(calling connection close on the client) memory leaks at the rate of 70K per connection close.
In case of the hard close (pulling the wire, or cutting off the network connection) the leak
goes at the rate of 300K per close. we also checked it on version 5.11 - same problem



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message