-
1. Re: java.lang.IndexOutOfBoundsException while testing with S
timfox Dec 10, 2009 9:29 AM (in response to stefan_appel)If you can tell us how replicate this - i.e. what was spec jms doing to give this error, then someone can take a look.
-
2. Re: java.lang.IndexOutOfBoundsException while testing with S
stefan_appel Dec 10, 2009 9:40 AM (in response to stefan_appel)Before the error occurred, SPECjms already audited the locations successfully and started sending messages. A base of 100 in vertical mode was used.
Right before the error, everything looked fine:
[java] SPAgent2: id=amsterdam_VM3,rate=4,57,threads=3
[java] DCAgent1: id=amsterdam_VM4,rate=36,53,threads=7
[java] DCAgent2: id=amsterdam_VM5,rate=39,93,threads=7
[java]
[java] HQAgent1: id=amsterdam_VM6,rate=80,83,threads=7
[java] SMAgent3: id=amsterdam_VM0,rate=32,90,threads=9
[java] HQAgent2: id=amsterdam_VM7,rate=86,47,threads=7
[java] SPAgent3: id=amsterdam_VM2,rate=2,97,threads=3
[java] SMAgent4: id=amsterdam_VM1,rate=30,67,threads=9
[java]
[java] SPAgent4: id=amsterdam_VM3,rate=4,60,threads=3
[java] SMAgent5: id=amsterdam_VM0,rate=31,33,threads=9
[java] SMAgent6: id=amsterdam_VM1,rate=34,63,threads=9
[java] SPAgent5: id=amsterdam_VM2,rate=3,20,threads=3
[java] SMAgent7: id=amsterdam_VM0,rate=33,00,threads=9
[java] SMAgent8: id=amsterdam_VM1,rate=31,73,threads=9
[java] SMAgent9: id=amsterdam_VM0,rate=31,40,threads=9
[java] SMAgent10: id=amsterdam_VM1,rate=33,70,threads=9
[java] SM_Interaction1DR_9_EHID_1: Uncaught exception.
[java] java.lang.IndexOutOfBoundsException
[java] at org.jboss.netty.buffer.AbstractChannelBuffer.setIndex(AbstractChannelBuffer.java:66)
[java] at org.hornetq.core.buffers.impl.ChannelBufferWrapper.setIndex(ChannelBufferWrapper.java:498)
[java] at org.hornetq.core.message.impl.MessageImpl.encodeToBuffer(MessageImpl.java:843)
[java] at org.hornetq.core.message.impl.MessageImpl.getEncodedBuffer(MessageImpl.java:438) -
3. Re: java.lang.IndexOutOfBoundsException while testing with S
timfox Dec 10, 2009 9:41 AM (in response to stefan_appel)What we really need is a sequence of actions we can replicate so we can investigate further.
-
4. Re: java.lang.IndexOutOfBoundsException while testing with S
stefan_appel Dec 10, 2009 11:10 AM (in response to stefan_appel)It should be easily possible to replicate this by using SPECjms. I can post or send you the according SPECjms configuration files, just let me know.
-
5. Re: java.lang.IndexOutOfBoundsException while testing with S
ataylor Dec 10, 2009 11:14 AM (in response to stefan_appel)can you provide a pure JMS standalone test that we can use.
-
6. Re: java.lang.IndexOutOfBoundsException while testing with S
timfox Dec 11, 2009 5:43 AM (in response to stefan_appel)If you can give us some more info about what SpecJ is doing at the time you receive this exception it would help us in replicating it (since I don't have access to SpecJMS)
I assume SpecJ is sending a message.
Is it sending the same message on multiple threads concurrently, using different sessions?
Where did the message come from? Is it created right before send or was it received from a consumer?
What type of message is it? (TextMessage, BytesMessage, ObjectMessage etc)
Any more information you could provide would be helpful. -
7. Re: java.lang.IndexOutOfBoundsException while testing with S
stefan_appel Dec 11, 2009 8:13 AM (in response to stefan_appel)I assume SPECjms is sending a message.
YesIs it sending the same message on multiple threads concurrently, using different sessions?
No, but multiple threads are sending in parallel using different sessions to the same queue.
A complete scenario description (incl. messages) is available in
http://www.dvs.tu-darmstadt.de/publications/pdf/PerfEvalJ-SPECjms2007.pdf
The exception occurs in the fist step in Interaction 1.Where did the message come from? Is it created right before send or was it received from a consumer?
It is created right before sending. It is transactional / persistent.What type of message is it? (TextMessage, BytesMessage, ObjectMessage etc)
ObjectMessage (avg. size: 2.34 kb, 95 %: 1.74 kb, 4 %: 7.10, 1%:41KB) -
8. Re: java.lang.IndexOutOfBoundsException while testing with S
timfox Dec 11, 2009 8:29 AM (in response to stefan_appel)"stefan_appel" wrote:
I assume SPECjms is sending a message.
YesIs it sending the same message on multiple threads concurrently, using different sessions?
No, but multiple threads are sending in parallel using different sessions to the same queue.
I'm confused by your answer here.
I asked if message was sent using different threads concurrently, and you said "No, but multiple threads are sending in parallel using different sessions to the same queue".
Isn't that the same thing?
Please clarify. -
9. Re: java.lang.IndexOutOfBoundsException while testing with SPECj
johnnysoccer Dec 15, 2009 2:33 PM (in response to stefan_appel)I am encountering the same issue. This is a copy of the information I added to jira HORNETQ-244
Based on what I've tracked down, the error seems to be related to the data in the buffer being exactly the default size of the buffer.
In my scenario, when I finish creating the text message, the exact size of the buffer is 1500. At the point when I attempt to send the data, the org.hornetq.core.message.implMessageImpl.encodeToBuffer() method the following lines seem to cause the problem
// write it
buffer.setInt(PacketImpl.PACKET_HEADERS_SIZE, endOfBodyPosition);
// Position at end of body and skip past the message end position int
buffer.setIndex(0, endOfBodyPosition + DataConstants.SIZE_INT);
The endOfBodyPosition in my scenario = 1500
The call to buffer.setIndex() is now looking for an index of 1504, because of adding the DataConstants.SIZE_INT value, which, when it gets to the org.jboss.netty.buffer.AbstractChannelBuffer.setIndex() call, you fail the third condition in the "if" statement (writerIndex > capacity()) because the capacity is the the size of the buffer array (which was 1500).
All messages that I send where the buffer size is > 1500 work just fine. -
10. Re: java.lang.IndexOutOfBoundsException while testing with SPECj
timfox Dec 15, 2009 3:27 PM (in response to johnnysoccer)This is actually a bug in Netty, which I believe Trustin is looking at currently. -
11. Re: java.lang.IndexOutOfBoundsException while testing with SPECj
johnnysoccer Dec 15, 2009 5:34 PM (in response to timfox)Thanks for the response Tim.
Is there a recommended work-around?
Do you know if the timeline for a fix in Netty will coincide with the GA release of HornetQ?
Can we use an older version of Netty since the bug seems to have presented itself in the CR1 release of HornetQ?
-- John
-
12. Re: java.lang.IndexOutOfBoundsException while testing with SPECj
ataylor Dec 16, 2009 4:17 AM (in response to johnnysoccer)There is currently a fix in Trunk. We will either ship GA with this fix or with a netty fix. either way GA will work fine.