activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Posta <christian.po...@gmail.com>
Subject Re: Web Console causes Out of Memory
Date Sat, 18 May 2013 13:01:26 GMT
Thanks for the debugging info!
Looks like this issue has been raised:
https://issues.apache.org/jira/browse/AMQ-4487

When one of us gets a sec, we can fix it.


On Fri, May 17, 2013 at 8:21 AM, Ilia Stepanov <ilia.stepanov@gmail.com>wrote:

> Hello,
> I am using 5.8.0 and get OutOfMemory when trying to browse a queue with
> about 200 messages. In the heap dump an instance of VMPendingMessageCursor
> with 18 millions (instead of two hundreds) of PendingNode elemements was
> found. Debugging showed that the Queue.iterate() method is repeated in an
> endless loop.
> In first run it adds 200 messages to the browser. The second run should
> normally add no new messages and remove the browserDispatch from the
> browserDispatches. However this does not happen - the if (!node.isAcked()
> &&
> !browser.getPending().getMessageAudit().isDuplicate(node.getMessageId()))
>  return true again and messages are added again. The third run adds
> messages again and so on. Messages are added until OOM occurs.
> I found it strange that method ActiveMQMessageAuditNoSync.isDuplicate()
> returns false in the second iteration and checked it. It behaves strange
> imho.
>
>     public boolean isDuplicate(final MessageId id) {
>         boolean answer = false;
>
>         if (id != null) {
>             ProducerId pid = id.getProducerId();
>             if (pid != null) {
>                 BitArrayBin bab = map.get(pid);  << here the bab is null in
> the second iteration. why? it should been added in the first iteration
>                 if (bab == null) {
>                     bab = new BitArrayBin(auditDepth);
>                     map.put(pid, bab);           << here new entry is added
> to the map, but the size of keySet() is NOT increased!
>                     modified = true;             << here  map.get(pid)
> returns a coorect value in the debugger.
>  << However in the next iteration it returns null again...
>                 }
>                 answer = bab.setBit(id.getProducerSequenceId(), true);
>             }
>         }
>         return answer;
>     }
>
> Other queues of similar size are shown without problems.
> Do you have any ideas what is going wrong here?
>
> best regards,
> Ilya Stepanov
>



-- 
*Christian Posta*
http://www.christianposta.com/blog
twitter: @christianposta

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message