Uploaded image for project: 'ActiveMQ Artemis'
  1. ActiveMQ Artemis
  2. ARTEMIS-4235

Losing bridge connection when sending empty Openwire map message.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 2.27.0, 2.28.0
    • 2.29.0
    • OpenWire
    • None
    • Windows 10

    Description

      Artemis 2.27.0 installations with a bridge configured. When sending a map message with an empty map the message is sent to DLQ and the connection is lost. It will not recover unless I delete the message and restarts the service. Same testcase works on old ActiveMQ. Found this when upgrading.

      2023-04-03 14:17:59,339 WARN  [org.apache.activemq.artemis.protocol.amqp.logger] AMQ111005: Failed to convert message. Sending it to Dead Letter Address.
      org.apache.activemq.artemis.protocol.amqp.converter.coreWrapper.ConversionException: readerIndex(0) + length(1) exceeds writerIndex(0): ReadOnlyByteBuf(ridx: 0, widx: 0, cap: 0/0, unwrapped: UnpooledSlicedByteBuf(ridx: 0, widx: 0, cap: 0/0, unwrapped: UnpooledByteBufAllocator$InstrumentedUnpooledUnsafeHeapByteBuf(ridx: 0, widx: 1096, cap: 1096)))
          at org.apache.activemq.artemis.protocol.amqp.converter.CoreAmqpConverter.fromCore(CoreAmqpConverter.java:319) ~[artemis-amqp-protocol-2.27.0.jar:2.27.0]
          at org.apache.activemq.artemis.protocol.amqp.converter.CoreAmqpConverter.checkAMQP(CoreAmqpConverter.java:80) ~[artemis-amqp-protocol-2.27.0.jar:2.27.0]
          at org.apache.activemq.artemis.protocol.amqp.proton.ProtonServerSenderContext.executeDelivery(ProtonServerSenderContext.java:541) ~[artemis-amqp-protocol-2.27.0.jar:2.27.0]
          at org.apache.activemq.artemis.core.server.impl.MessageReferenceImpl.run(MessageReferenceImpl.java:134) ~[artemis-server-2.27.0.jar:2.27.0]
          at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:174) ~[netty-common-4.1.82.Final.jar:4.1.82.Final]
          at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:167) ~[netty-common-4.1.82.Final.jar:4.1.82.Final]
          at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470) ~[netty-common-4.1.82.Final.jar:4.1.82.Final]
          at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:569) ~[netty-transport-4.1.82.Final.jar:4.1.82.Final]
          at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) ~[netty-common-4.1.82.Final.jar:4.1.82.Final]
          at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[netty-common-4.1.82.Final.jar:4.1.82.Final]
          at org.apache.activemq.artemis.utils.ActiveMQThreadFactory$1.run(ActiveMQThreadFactory.java:118) ~[artemis-commons-2.27.0.jar:?]
      Caused by: java.lang.IndexOutOfBoundsException: readerIndex(0) + length(1) exceeds writerIndex(0): ReadOnlyByteBuf(ridx: 0, widx: 0, cap: 0/0, unwrapped: UnpooledSlicedByteBuf(ridx: 0, widx: 0, cap: 0/0, unwrapped: UnpooledByteBufAllocator$InstrumentedUnpooledUnsafeHeapByteBuf(ridx: 0, widx: 1096, cap: 1096)))
          at io.netty.buffer.AbstractByteBuf.checkReadableBytes0(AbstractByteBuf.java:1442) ~[netty-buffer-4.1.82.Final.jar:4.1.82.Final]
          at io.netty.buffer.AbstractByteBuf.readByte(AbstractByteBuf.java:730) ~[netty-buffer-4.1.82.Final.jar:4.1.82.Final]
          at io.netty.buffer.WrappedByteBuf.readByte(WrappedByteBuf.java:529) ~[netty-buffer-4.1.82.Final.jar:4.1.82.Final]
          at org.apache.activemq.artemis.utils.collections.TypedProperties.decode(TypedProperties.java:464) ~[artemis-commons-2.27.0.jar:?]
          at org.apache.activemq.artemis.utils.collections.TypedProperties.decode(TypedProperties.java:547) ~[artemis-commons-2.27.0.jar:?]
          at org.apache.activemq.artemis.reader.MapMessageUtil.readBodyMap(MapMessageUtil.java:46) ~[artemis-core-client-2.27.0.jar:2.27.0]
          at org.apache.activemq.artemis.protocol.amqp.converter.coreWrapper.CoreMapMessageWrapper.decode(CoreMapMessageWrapper.java:222) ~[artemis-amqp-protocol-2.27.0.jar:2.27.0]
          at org.apache.activemq.artemis.protocol.amqp.converter.CoreAmqpConverter.fromCore(CoreAmqpConverter.java:98) ~[artemis-amqp-protocol-2.27.0.jar:2.27.0]

      Attachments

        1. broker.xml
          14 kB
          Peter Sunnerdahl
        2. TestMQ.java
          6 kB
          Peter Sunnerdahl
        3. testMQMap.xml
          3 kB
          Peter Sunnerdahl

        Issue Links

          Activity

            People

              jbertram Justin Bertram
              psu93 Peter Sunnerdahl
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 2h
                  2h