Uploaded image for project: 'AMQ Broker'
  1. AMQ Broker
  2. ENTMQBR-658

OutOfDirectMemoryError raised from Netty

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Critical Critical
    • AMQ 7.0.1.GA
    • A-MQ 7.0.0.CR1
    • None
    • Hide
      git clone https://github.com/dudaerich/activemq-artemis/
      cd activemq-artemis
      git checkout JBEAP-6398-reproducer
      mvn clean test -Dtest=JmsNettyNioStressTest#testStressSendNetty -Ptests -DfailIfNoTests=false -Drat.ignoreErrors=true 2>&1 | tee log
      
      Show
      git clone https: //github.com/dudaerich/activemq-artemis/ cd activemq-artemis git checkout JBEAP-6398-reproducer mvn clean test -Dtest=JmsNettyNioStressTest#testStressSendNetty -Ptests -DfailIfNoTests= false -Drat.ignoreErrors= true 2>&1 | tee log
    • AMQ Sprint 1

      If you send and receive a lot of messages in short time to Artemis via Netty connector, the exception [1] is thrown from the client.

      [1]

      Exception in thread "Thread-52" io.netty.util.internal.OutOfDirectMemoryError: failed to allocate 16777216 byte(s) of direct memory (used: 3640655872, max: 3653763072)
      	at io.netty.util.internal.PlatformDependent.incrementMemoryCounter(PlatformDependent.java:517)
      	at io.netty.util.internal.PlatformDependent.allocateDirectNoCleaner(PlatformDependent.java:471)
      	at io.netty.buffer.PoolArena$DirectArena.allocateDirect(PoolArena.java:688)
      	at io.netty.buffer.PoolArena$DirectArena.newChunk(PoolArena.java:677)
      	at io.netty.buffer.PoolArena.allocateNormal(PoolArena.java:237)
      	at io.netty.buffer.PoolArena.allocate(PoolArena.java:213)
      	at io.netty.buffer.PoolArena.allocate(PoolArena.java:141)
      	at io.netty.buffer.PooledByteBufAllocator.newDirectBuffer(PooledByteBufAllocator.java:271)
      	at io.netty.buffer.AbstractByteBufAllocator.directBuffer(AbstractByteBufAllocator.java:177)
      	at io.netty.buffer.AbstractByteBufAllocator.directBuffer(AbstractByteBufAllocator.java:168)
      	at org.apache.activemq.artemis.core.remoting.impl.netty.PartialPooledByteBufAllocator.directBuffer(PartialPooledByteBufAllocator.java:91)
      	at org.apache.activemq.artemis.core.remoting.impl.netty.NettyConnection.createTransportBuffer(NettyConnection.java:216)
      	at org.apache.activemq.artemis.spi.core.protocol.AbstractRemotingConnection.createTransportBuffer(AbstractRemotingConnection.java:182)
      	at org.apache.activemq.artemis.core.protocol.core.impl.PacketImpl.encode(PacketImpl.java:277)
      	at org.apache.activemq.artemis.core.protocol.core.impl.ChannelImpl.send(ChannelImpl.java:251)
      	at org.apache.activemq.artemis.core.protocol.core.impl.ChannelImpl.send(ChannelImpl.java:220)
      	at org.apache.activemq.artemis.core.protocol.core.impl.ActiveMQSessionContext.forceDelivery(ActiveMQSessionContext.java:314)
      	at org.apache.activemq.artemis.core.client.impl.ClientConsumerImpl.receive(ClientConsumerImpl.java:304)
      	at org.apache.activemq.artemis.core.client.impl.ClientConsumerImpl.receive(ClientConsumerImpl.java:394)
      	at org.apache.activemq.artemis.jms.client.ActiveMQMessageConsumer.getMessage(ActiveMQMessageConsumer.java:214)
      	at org.apache.activemq.artemis.jms.client.ActiveMQMessageConsumer.receive(ActiveMQMessageConsumer.java:133)
      	at org.apache.activemq.artemis.tests.integration.client.JmsNettyNioStressTest$3.run(JmsNettyNioStressTest.java:214)
      

      Customer impact: Under heavy load OutOfDirectMemoryError can arise what leads to unavailability of the service.

              rh-ee-ataylor Andy Taylor
              rhn-support-rkieley Roderick Kieley
              Jiri Daněk Jiri Daněk
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated:
                Resolved: