Issue Details (XML | Word | Printable)

Key: AMQ-677
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Rob Davies
Reporter: Andrew Lusk
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
ActiveMQ

ActiveMQ broker leaks advisory topics

Created: 05/Apr/06 11:45 PM   Updated: 01/May/06 03:34 PM
Return to search
Component/s: Broker
Affects Version/s: None
Fix Version/s: 4.0

Time Tracking:
Not Specified

File Attachments:
  Size
Java Source File ProducerTool.java 2006-04-05 11:45 PM Andrew Lusk 5 kB
Environment: linux, near-trunk version of ActiveMQ


 Description  « Hide
When I run the attached code, which AFAIK is completely legal JMS, the ActiveMQ broker grows to 500+ mb and crashes due to being out of heap space.

Some investigation with hprof has lead me to believe that the advisory topics created by the MessageConsumers (and Producers, but I use the same producer each time so that's not causing a problem) are being put into a DestinationMap and not being removed.

The rough origin of this is in the addProducer call in AdvisoryBroker, which creates the advisory topic.

Note that this memory is not freed when the DestinationInfo removing the original temptopic is received, nor when the actual client exits. The object lifetime of these advisory destinations seems very poorly defined. If they are implicitly created by the server, they should be implicitly destroyed by the same.

To reproduce, I've been running this code with -Dtopic=true and -Dmax=10000 (though the problem shows up well before this amount). This is just a modified version of the example ProducerTool (note it doesn't actually send any messages).

Please verify the correctness of the attached code.

Andrew Lusk



 All   Comments   Work Log   Change History   Subversion Commits   FishEye   Crucible      Sort Order: Ascending order - Click to sort in descending order
No related commits found.