You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "Huang Wen Hui (JIRA)" <ji...@apache.org> on 2015/08/25 09:29:46 UTC

[jira] [Created] (ARTEMIS-211) Memory leak using wildcard topic

Huang Wen Hui created ARTEMIS-211:
-------------------------------------

             Summary: Memory leak using wildcard topic
                 Key: ARTEMIS-211
                 URL: https://issues.apache.org/jira/browse/ARTEMIS-211
             Project: ActiveMQ Artemis
          Issue Type: Bug
          Components: Broker
    Affects Versions: 1.0.0
         Environment: FreeBSD 10.2+ARTEMIS
            Reporter: Huang Wen Hui


1. I set up broker.xml use PAGE:
      <address-settings>
         <!--default for catch all-->
         <address-setting match="#">
            <dead-letter-address>jms.queue.DLQ</dead-letter-address>
            <expiry-address>jms.queue.ExpiryQueue</expiry-address>
            <redelivery-delay>0</redelivery-delay>
            <page-size-bytes>2097152</page-size-bytes>
            <max-size-bytes>10485760</max-size-bytes>
            <message-counter-history-day-limit>10</message-counter-history-day-limit>
            <address-full-policy>PAGE</address-full-policy>
         </address-setting>
      </address-settings>
and add 2 topics:
      <topic name="rts.pick"/>
      <topic name="rts.nop"/>
2. before run broker, open DEBUG:
logger.org.apache.activemq.artemis.core.server.level=DEBUG

3. run Sender.java

4. run Receiver1.java with rts.* frst, and then run Receiver2.java with rts.pick.

5. kill Rcever1 and Receiver2.

6.  after about 20 mins, OutOfMemory:
15:18:28,462 WARN  [org.apache.activemq.artemis.core.client] AMQ212037: Connection failure has been detected: AMQ119014: Did not receive data from /127.0.0.1:36351. It is likely the client has exited or crashed without closing its connection, or the network between the server and client has failed. You also might have configured connection-ttl and client-failure-check-period incorrectly. Please check user manual for more information. The connection will now be closed. [code=CONNECTION_TIMEDOUT]
15:18:41,090 WARN  [org.apache.activemq.artemis.core.server] AMQ222061: Client connection failed, clearing up resources for session a3fafb41-4af7-11e5-8680-adb2aefa8c20
15:18:57,554 DEBUG [org.apache.activemq.artemis.core.server] Cannot expire from jms.queue.ExpiryQueue into jms.queue.ExpiryQueue
15:18:53,474 WARN  [org.apache.activemq.artemis.core.server] AMQ222107: Cleared up resources for session a3fafb41-4af7-11e5-8680-adb2aefa8c20
15:19:03,751 WARN  [org.apache.activemq.artemis.core.server] AMQ222061: Client connection failed, clearing up resources for session a3fc81e2-4af7-11e5-8680-adb2aefa8c20
15:19:11,228 WARN  [org.apache.activemq.artemis.core.server] AMQ222107: Cleared up resources for session a3fc81e2-4af7-11e5-8680-adb2aefa8c20
15:19:29,926 WARN  [org.apache.activemq.artemis.core.client] AMQ212041: Timed out waiting for netty channel to close
15:19:34,166 DEBUG [org.apache.activemq.artemis.core.server] Cannot expire from jms.queue.ExpiryQueue into jms.queue.ExpiryQueue
15:20:10,078 DEBUG [org.apache.activemq.artemis.core.server] Cannot expire from jms.queue.ExpiryQueue into jms.queue.ExpiryQueue
 Exception in thread "qtp1326393666-134" Exception in thread "ActiveMQ Artemis Server Shutdown Timer" Exception in thread "qtp1326393666-130" Exception in thread "Thread-9 (ActiveMQ-server-ActiveMQServerImpl::serverUUID=9e8aecec-4a4d-11e5-b7c8-a3ebfe3193a3-589835301)" 
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "qtp1326393666-134"
java.lang.OutOfMemoryError: Java heap space
15:20:28,493 WARNING [io.netty.channel.nio.NioEventLoop] Unexpected exception in the selector loop.: java.lang.OutOfMemoryError: Java heap space

15:20:37,701 WARN  [org.apache.activemq.artemis.core.server] AMQ222082: error on connection failure check: java.lang.OutOfMemoryError: Java heap space

	at java.lang.StringCoding$StringEncoder.encode(StringCoding.java:300)
	at java.lang.StringCoding.encode(StringCoding.java:344)
	at java.lang.String.getBytes(String.java:906)
	at java.io.UnixFileSystem.getBooleanAttributes0(Native Method)
	at java.io.UnixFileSystem.getBooleanAttributes(UnixFileSystem.java:242)
	at java.io.File.exists(File.java:819)
	at org.apache.activemq.artemis.cli.commands.Run$1.run(Run.java:134)
	at java.util.TimerThread.mainLoop(Timer.java:555)
	at java.util.TimerThread.run(Timer.java:505)
java.lang.OutOfMemoryError: Java heap space
java.lang.OutOfMemoryError: Java heap space
Exception in thread "Thread-3 (activemq-netty-threads-2123444693)" Exception in thread "activemq-expiry-reaper-thread" java.lang.OutOfMemoryError: Java heap space
java.lang.OutOfMemoryError: Java heap space
15:21:04,952 WARNING [io.netty.channel.DefaultChannelPipeline] An exceptionCaught() event was fired, and it reached at the tail of the pipeline. It usually means the last handler in the pipeline did not handle the exception.: io.netty.channel.ChannelPipelineException: org.apache.activemq.artemis.core.remoting.impl.netty.ActiveMQFrameDecoder2.handlerRemoved() has thrown an exception.
	at io.netty.channel.DefaultChannelPipeline.callHandlerRemoved0(DefaultChannelPipeline.java:529) [netty-all-4.0.20.Final.jar:4.0.20.Final]
	at io.netty.channel.DefaultChannelPipeline.callHandlerRemoved(DefaultChannelPipeline.java:520) [netty-all-4.0.20.Final.jar:4.0.20.Final]
	at io.netty.channel.DefaultChannelPipeline.remove0(DefaultChannelPipeline.java:350) [netty-all-4.0.20.Final.jar:4.0.20.Final]
	at io.netty.channel.AbstractChannelHandlerContext.teardown0(AbstractChannelHandlerContext.java:103) [netty-all-4.0.20.Final.jar:4.0.20.Final]
	at io.netty.channel.AbstractChannelHandlerContext.teardown(AbstractChannelHandlerContext.java:88) [netty-all-4.0.20.Final.jar:4.0.20.Final]
	at io.netty.channel.AbstractChannelHandlerContext.teardown0(AbstractChannelHandlerContext.java:105) [netty-all-4.0.20.Final.jar:4.0.20.Final]
	at io.netty.channel.AbstractChannelHandlerContext.teardown(AbstractChannelHandlerContext.java:88) [netty-all-4.0.20.Final.jar:4.0.20.Final]
	at io.netty.channel.DefaultChannelPipeline.teardownAll(DefaultChannelPipeline.java:753) [netty-all-4.0.20.Final.jar:4.0.20.Final]
	at io.netty.channel.DefaultChannelPipeline.fireChannelUnregistered(DefaultChannelPipeline.java:742) [netty-all-4.0.20.Final.jar:4.0.20.Final]
	at io.netty.channel.AbstractChannel$AbstractUnsafe$6.run(AbstractChannel.java:607) [netty-all-4.0.20.Final.jar:4.0.20.Final]
	at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:370) [netty-all-4.0.20.Final.jar:4.0.20.Final]
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:353) [netty-all-4.0.20.Final.jar:4.0.20.Final]
	at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116) [netty-all-4.0.20.Final.jar:4.0.20.Final]
	at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_51]
Caused by: io.netty.util.IllegalReferenceCountException: refCnt: 0
	at io.netty.buffer.AbstractByteBuf.ensureAccessible(AbstractByteBuf.java:1180) [netty-all-4.0.20.Final.jar:4.0.20.Final]
	at io.netty.buffer.AbstractByteBuf.checkReadableBytes(AbstractByteBuf.java:1163) [netty-all-4.0.20.Final.jar:4.0.20.Final]
	at io.netty.buffer.AbstractByteBuf.readBytes(AbstractByteBuf.java:655) [netty-all-4.0.20.Final.jar:4.0.20.Final]
	at io.netty.handler.codec.ByteToMessageDecoder.handlerRemoved(ByteToMessageDecoder.java:108) [netty-all-4.0.20.Final.jar:4.0.20.Final]
	at io.netty.channel.DefaultChannelPipeline.callHandlerRemoved0(DefaultChannelPipeline.java:526) [netty-all-4.0.20.Final.jar:4.0.20.Final]
	... 13 more

This problem is similar as https://issues.jboss.org/browse/HORNETQ-1486




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