You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Keith Wall (JIRA)" <ji...@apache.org> on 2015/10/16 14:53:05 UTC
[jira] [Resolved] (QPID-6786) (0-10) ServerAssembler fails with
IndexOutOfBoundsException on receipt of message with large headers
[ https://issues.apache.org/jira/browse/QPID-6786?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Keith Wall resolved QPID-6786.
------------------------------
Resolution: Fixed
> (0-10) ServerAssembler fails with IndexOutOfBoundsException on receipt of message with large headers
> ----------------------------------------------------------------------------------------------------
>
> Key: QPID-6786
> URL: https://issues.apache.org/jira/browse/QPID-6786
> Project: Qpid
> Issue Type: Bug
> Components: Java Broker
> Affects Versions: qpid-java-6.0
> Reporter: Keith Wall
> Priority: Blocker
> Fix For: qpid-java-6.0
>
>
> In a regression since 0.32, if I run the following program, the Java Broker fails with the following IOOBE.
> {noformat}
> ava.lang.IndexOutOfBoundsException: Index: 1, Size: 1
> at java.util.Collections$SingletonList.get(Collections.java:3375)
> at org.apache.qpid.server.protocol.v0_10.ServerDecoder.getCurrentBuffer(ServerDecoder.java:111)
> at org.apache.qpid.server.protocol.v0_10.ServerDecoder.advanceIfNecessary(ServerDecoder.java:41)
> at org.apache.qpid.server.protocol.v0_10.ServerDecoder.getBuffer(ServerDecoder.java:49)
> at org.apache.qpid.server.protocol.v0_10.ServerDecoder.readUint16(ServerDecoder.java:142)
> at org.apache.qpid.server.protocol.v0_10.ServerAssembler.assemble(ServerAssembler.java:201)
> at org.apache.qpid.server.protocol.v0_10.ServerAssembler.frame(ServerAssembler.java:152)
> at org.apache.qpid.server.protocol.v0_10.ServerAssembler.received(ServerAssembler.java:80)
> at org.apache.qpid.server.protocol.v0_10.ServerInputHandler.parse(ServerInputHandler.java:175)
> at org.apache.qpid.server.protocol.v0_10.ServerInputHandler.received(ServerInputHandler.java:82)
> at org.apache.qpid.server.protocol.v0_10.AMQPConnection_0_10$3.run(AMQPConnection_0_10.java:199)
> at java.security.AccessController.doPrivileged(Native Method)
> at org.apache.qpid.server.protocol.v0_10.AMQPConnection_0_10.received(AMQPConnection_0_10.java:191)
> at org.apache.qpid.server.transport.MultiVersionProtocolEngine.received(MultiVersionProtocolEngine.java:141)
> at org.apache.qpid.server.transport.NonBlockingConnection.processAmqpData(NonBlockingConnection.java:446)
> at org.apache.qpid.server.transport.NonBlockingConnectionPlainDelegate.processData(NonBlockingConnectionPlainDelegate.java:58)
> at org.apache.qpid.server.transport.NonBlockingConnection.doRead(NonBlockingConnection.java:349)
> at org.apache.qpid.server.transport.NonBlockingConnection.doWork(NonBlockingConnection.java:223)
> at org.apache.qpid.server.transport.NetworkConnectionScheduler.processConnection(NetworkConnectionScheduler.java:143)
> at org.apache.qpid.server.transport.NetworkConnectionScheduler.access$000(NetworkConnectionScheduler.java:37)
> at org.apache.qpid.server.transport.NetworkConnectionScheduler$2.run(NetworkConnectionScheduler.java:112)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> at java.lang.Thread.run(Thread.java:745)
> {noformat}
> {noformat:java}
> ConnectionFactory connectionFactory = (ConnectionFactory) context.lookup("qpidConnectionfactory");
> Connection connection = connectionFactory.createConnection();
> connection.start();
> Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
> Destination destination = (Destination) context.lookup("topicExchange");
> MessageProducer messageProducer = session.createProducer(destination);
> MessageConsumer messageConsumer = session.createConsumer(destination);
> TextMessage message = session.createTextMessage("Hello world!");
> message.setStringProperty("str1", new String(new byte[32000]));
> message.setStringProperty("str2", new String(new byte[32000]));
> message.setStringProperty("str3", new String(new byte[32000]));
> messageProducer.send(message);
> message = (TextMessage)messageConsumer.receive();
> System.out.println(message.getText());
> System.out.println(message.getStringProperty("str1").length());
> System.out.println(message.getStringProperty("str2").length());
> System.out.println(message.getStringProperty("str3").length());
> System.out.println(message.getText());
> connection.close();
> context.close();
> {noformat}
> Same program passed successfully against 0.32.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org