[JIRA] (COMETD-596) AcknowledgedMessagesSessionExtension - java.lang.ArrayIndexOutOfBoundsException in BatchArrayQueue.clearToBatch

7 views
Skip to first unread message

john_rambo (JIRA)

unread,
Jul 1, 2015, 7:23:46 AM7/1/15
to comet...@googlegroups.com
john_rambo created an issue
 
CometD / Bug COMETD-596
AcknowledgedMessagesSessionExtension - java.lang.ArrayIndexOutOfBoundsException in BatchArrayQueue.clearToBatch
Issue Type: Bug Bug
Affects Versions: 3.0.4
Assignee: Unassigned
Attachments: cometd_ackModuleerror.png
Components: java-server
Created: 01/Jul/15 4:23 AM
Labels: cometd long-polling AcknowledgedMessagesSessionExtension
Priority: Major Major
Reporter: john_rambo

When we have multiple notifications (about 300) send form server to client (2 different browsers) - then we spot that after sending some of them we see the ArrayIndexOutOfBounds exceptions in Java code:

11:46:10,061 INFO [org.cometd.bayeux.server.ServerSession] (http-/0.0.0.0:8090-13) Exception while invoking listener org.cometd.server.ext.AcknowledgedMessagesSessionExtension@7d12b538: java.lang.ArrayIndexOutOfBoundsException: 16
at org.cometd.server.ext.BatchArrayQueue.exportMessagesToBatch(BatchArrayQueue.java:159) [cometd-java-server-3.0.4.jar:]
at org.cometd.server.ext.AcknowledgedMessagesSessionExtension.deQueue(AcknowledgedMessagesSessionExtension.java:127) [cometd-java-server-3.0.4.jar:]
at org.cometd.server.ServerSessionImpl.notifyDeQueue(ServerSessionImpl.java:487) [cometd-java-server-3.0.4.jar:]
at org.cometd.server.ServerSessionImpl.takeQueue(ServerSessionImpl.java:468) [cometd-java-server-3.0.4.jar:]
at org.cometd.server.transport.AbstractHttpTransport.flush(AbstractHttpTransport.java:331) [cometd-java-server-3.0.4.jar:]
at org.cometd.server.transport.AbstractHttpTransport.resume(AbstractHttpTransport.java:346) [cometd-java-server-3.0.4.jar:]
at org.cometd.server.transport.AbstractStreamHttpTransport.process(AbstractStreamHttpTransport.java:82) [cometd-java-server-3.0.4.jar:]
at org.cometd.server.transport.AbstractStreamHttpTransport.handle(AbstractStreamHttpTransport.java:52) [cometd-java-server-3.0.4.jar:]
at org.cometd.server.CometDServlet.service(CometDServlet.java:102) [cometd-java-server-3.0.4.jar:]

Please also see screen from debugger attached.

If you need more information don't hesitate to ask.

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.3.9#6339-sha1:46fa261)
Atlassian logo

Simone Bordet (JIRA)

unread,
Jul 6, 2015, 4:10:19 AM7/6/15
to comet...@googlegroups.com
Simone Bordet commented on Bug COMETD-596
 
Re: AcknowledgedMessagesSessionExtension - java.lang.ArrayIndexOutOfBoundsException in BatchArrayQueue.clearToBatch

Your screenshot shows that batches is a long[16] with all values set to 0.
This would be ok if the BatchArrayQueue has just been created, or if is empty.
However, it also shows that the size of the queue is 9, so there is something really wrong here.

Can you reproduce the issue in a test case ?

The message acknowledge extension has been tested under high load conditions, and I have never seen this error, but it's always possible you hit an edge case, so it will be really great if you can reproduce the issue.

Can you enable DEBUG logging for AcknowledgedMessagesSessionExtension ?

maroos (JIRA)

unread,
Jul 9, 2015, 10:21:17 AM7/9/15
to comet...@googlegroups.com
maroos commented on Bug COMETD-596

Hi, thanks for the update. Paweł (aka john_rambo) is on holidays right now - I'll try to look into it some time next week and provide an update.

john_rambo (JIRA)

unread,
Jul 21, 2015, 11:38:16 AM7/21/15
to comet...@googlegroups.com
john_rambo commented on Bug COMETD-596

Hi, I've attached logs for AcknowledgedMessagesSessionExtension and also for org.cometd.bayeux.server.ServerSession (it seems strange for me that exception is logged at INFO level and not ERROR level in org.cometd.bayeux.server.ServerSession - see logs attached there is INFO). I hope that this can help. If any further information is needed I will try to provide more data.

squiddle squiddle (JIRA)

unread,
Jul 28, 2015, 12:54:16 PM7/28/15
to comet...@googlegroups.com

i cannot tell if this is related, but i can see this error if i am using jetty-9.3.1.v20150714 with cometd 3.0.5.
It does not happen if i use the cometd 3.0.5 jetty version (jetty-9.2.12.v20150709)

Simone Bordet (JIRA)

unread,
Aug 5, 2015, 5:28:15 AM8/5/15
to comet...@googlegroups.com

CometD 3.0.x works with Jetty 9.2.x.

CometD 3.1.x works with Jetty 9.3.x.

I suggest you stick with the recommended pairings, although this issue will be investigated in CometD 3.1.

Thanks !

Reply all
Reply to author
Forward
0 new messages