Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-6398

OutOfDirectMemoryError raised from Netty

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Critical
    • 7.1.0.DR18
    • 7.0.3.CR2, 7.1.0.DR6, 7.1.0.DR8, 7.1.0.DR12
    • ActiveMQ
    • 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

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

              fnigro Francesco Nigro
              eduda_jira Erich Duda (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: