activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shi Lei (JIRA)" <>
Subject [jira] [Updated] (AMQ-5447) Memory Leak after shutdown embeded broker with JDBC persistence
Date Fri, 21 Nov 2014 08:19:34 GMT


Shi Lei updated AMQ-5447:
    Attachment: 2.png

path to root

> Memory Leak after shutdown embeded broker with JDBC persistence
> ---------------------------------------------------------------
>                 Key: AMQ-5447
>                 URL:
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker, Message Store
>    Affects Versions: 5.10.0
>         Environment: Windows7, JDK7
>            Reporter: Shi Lei
>         Attachments: 1.png, 2.png,, patch.txt
>   Original Estimate: 2h
>  Remaining Estimate: 2h
> After shutdown embeded activemq broker with JDBC store, 2 'ActiveMQ JDBC PA Scheduled
Task' is still alive.
> Because the 2 thread's Thread factory is object of JDBCPersistenceAdapter's inner class,
so the object of JDBCPersistenceAdapter can be reached from the 2 threads, JDBCPersistenceAdapter
has a field point to BrokerService. So the instance of BrokerService can be reached from the
2 threads.
> So the stopped brokerService cannot be GC.
> The root cause is that when stopping JDBCPersistenceAdapter, only cancelling cleanupTicket
without shutdown clockDaemon, that's why the 2 threads are still alive.
> According to, it's better
(more reliable) to instantiate the broker again instead of reuse old broker. So if I restart
embeded broker, there will be  1 more BrokerService in memory. I think it's memory leak.

This message was sent by Atlassian JIRA

View raw message