Uploaded image for project: 'Qpid'
  1. Qpid
  2. QPID-7982

[Java Broker] MariaDB backed JDBC virtualhost truncates message content at 64K leading to Broker abnormal shutdown

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.30, 0.32, qpid-java-6.0, qpid-java-6.1
    • Fix Version/s: qpid-java-broker-7.0.0
    • Component/s: Broker-J
    • Labels:
      None

      Description

      When using the Qpid Broker-J with a JDBC backed virtualhost using MariaDB, the database silently truncates message content at 64KB. This means if the Broker needs to recover a message from disk (i.e. after a restart or after message content has been flowed to disk), it will fail to retrieve the expected number of message bytes and will fail as it tries to deliver the message to the consumer. The failure also manifests if the message is viewed from Management.

      ########################################################################
      #
      # Unhandled Exception java.lang.IllegalArgumentException: offset: 0, length: 262152, remaining: 65535 in Thread IO-/127.0.0.1:56942
      #
      # Exiting
      #
      ########################################################################
      java.lang.IllegalArgumentException: offset: 0, length: 262152, remaining: 65535
      	at org.apache.qpid.server.bytebuffer.QpidByteBuffer.view(QpidByteBuffer.java:1003)
      	at org.apache.qpid.server.store.jdbc.AbstractJDBCMessageStore$StoredJDBCMessage.getContent(AbstractJDBCMessageStore.java:1443)
      	at org.apache.qpid.server.message.AbstractServerMessageImpl.getContent(AbstractServerMessageImpl.java:191)
      	at org.apache.qpid.server.protocol.v1_0.Message_1_0.getContent(Message_1_0.java:215)
      	at org.apache.qpid.server.message.AbstractServerMessageImpl.getContent(AbstractServerMessageImpl.java:181)
      	at org.apache.qpid.server.protocol.v1_0.ConsumerTarget_1_0.doSend(ConsumerTarget_1_0.java:154)
      	at org.apache.qpid.server.consumer.AbstractConsumerTarget.send(AbstractConsumerTarget.java:227)
      	at org.apache.qpid.server.consumer.AbstractConsumerTarget.sendNextMessage(AbstractConsumerTarget.java:280)
      	at org.apache.qpid.server.consumer.AbstractConsumerTarget.processPending(AbstractConsumerTarget.java:162)
      	at org.apache.qpid.server.session.AbstractAMQPSession.processPending(AbstractAMQPSession.java:394)
      	at org.apache.qpid.server.protocol.v1_0.AMQPConnection_1_0Impl$ProcessPendingIterator.lambda$next$2(AMQPConnection_1_0Impl.java:1814)
      	at org.apache.qpid.server.transport.NonBlockingConnection.processPending(NonBlockingConnection.java:356)
      	at org.apache.qpid.server.transport.NonBlockingConnection.doWork(NonBlockingConnection.java:264)
      	at org.apache.qpid.server.transport.NetworkConnectionScheduler.processConnection(NetworkConnectionScheduler.java:134)
      	at org.apache.qpid.server.transport.SelectorThread$ConnectionProcessor.processConnection(SelectorThread.java:563)
      	at org.apache.qpid.server.transport.SelectorThread$SelectionTask.performSelect(SelectorThread.java:354)
      	at org.apache.qpid.server.transport.SelectorThread$SelectionTask.run(SelectorThread.java:97)
      	at org.apache.qpid.server.transport.SelectorThread.run(SelectorThread.java:521)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      	at org.apache.qpid.server.bytebuffer.QpidByteBuffer.lambda$null$0(QpidByteBuffer.java:1396)
      	at java.lang.Thread.run(Thread.java:748)
      

      Inspecting the db you see:

      MariaDB [qpid]> select octet_length(content) from QPID_MESSAGE_CONTENT
          -> ;
      +-----------------------+
      | octet_length(content) |
      +-----------------------+
      |                 65535 |
      +-----------------------+
      1 row in set (0.01 sec)
      

        Attachments

          Activity

            People

            • Assignee:
              kwall Keith Wall
              Reporter:
              kwall Keith Wall
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: