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

(0-10) Sending messages with large header string throws AssertionError

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Java Common
    • Labels:
      None

      Description

      On AMQP 0-10 when putting a large String (>16 Bit) on a header sending throws and AssertionError.

      Example:

      // ...with an established 0-10 session
      Message message = session.createMessage();
      message.setStringProperty("foo", Strings.repeat("x", 1 << 16));
      MessageProducer producer = session.createProducer(destination);
      producer.send(message);
      

      Results in:

      java.lang.AssertionError
      	at org.apache.qpid.transport.codec.BBEncoder.writeUint16(BBEncoder.java:149)
      	at org.apache.qpid.transport.codec.AbstractEncoder.writeStr16(AbstractEncoder.java:185)
      	at org.apache.qpid.transport.codec.AbstractEncoder.write(AbstractEncoder.java:579)
      	at org.apache.qpid.transport.codec.AbstractEncoder.writeMapEntries(AbstractEncoder.java:365)
      	at org.apache.qpid.transport.codec.AbstractEncoder.writeMap(AbstractEncoder.java:351)
      	at org.apache.qpid.transport.MessageProperties.write(MessageProperties.java:390)
      	at org.apache.qpid.transport.codec.AbstractEncoder.writeStruct32(AbstractEncoder.java:288)
      	at org.apache.qpid.transport.network.Disassembler.method(Disassembler.java:224)
      	at org.apache.qpid.transport.network.Disassembler.command(Disassembler.java:182)
      	at org.apache.qpid.transport.network.Disassembler.command(Disassembler.java:56)
      	at org.apache.qpid.transport.Method.delegate(Method.java:155)
      	at org.apache.qpid.transport.network.Disassembler.send(Disassembler.java:82)
      	at org.apache.qpid.transport.Connection.send(Connection.java:415)
      	at org.apache.qpid.transport.Session.send(Session.java:588)
      	at org.apache.qpid.transport.Session.invoke(Session.java:758)
      	at org.apache.qpid.transport.Session.invoke(Session.java:613)
      	at org.apache.qpid.transport.SessionInvoker.messageTransfer(SessionInvoker.java:93)
      	at org.apache.qpid.client.BasicMessageProducer_0_10.sendMessage(BasicMessageProducer_0_10.java:355)
      	at org.apache.qpid.client.BasicMessageProducer.sendImpl(BasicMessageProducer.java:525)
      	at org.apache.qpid.client.BasicMessageProducer.send(BasicMessageProducer.java:326)
      	at org.apache.qpid.test.unit.basic.PropertyValueTest.testFoo(PropertyValueTest.java:177)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at org.apache.qpid.test.utils.QpidTestCase.runTest(QpidTestCase.java:171)
      	at org.apache.qpid.test.utils.QpidBrokerTestCase.runBare(QpidBrokerTestCase.java:332)
      	at org.apache.qpid.test.utils.QpidTestCase.run(QpidTestCase.java:156)
      	at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:84)
      	at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
      	at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:78)
      	at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:212)
      	at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:68)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      	at com.intellij.rt.execution.application.AppMain.main(AppMain.java:140)
      

      This should be caught and either handled or reported in a proper way.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                lorenz.quack Lorenz Quack
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: