-
Bug
-
Resolution: Done
-
Major
-
2.4.1 SP1
-
None
During load testing of AS HttpSession repl, QE saw RPC transmission errors with the following root cause:
[JBoss] Caused by: java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
[JBoss] at java.util.ArrayList.RangeCheck(ArrayList.java:546)
[JBoss] at java.util.ArrayList.get(ArrayList.java:321)
[JBoss] at org.jgroups.protocols.FC.handleDownMessage(FC.java:390)
[JBoss] at org.jgroups.protocols.FC.down(FC.java:320)
[JBoss] at org.jgroups.stack.Protocol.receiveDownEvent(Protocol.java:517)
[JBoss] at org.jgroups.protocols.FC.receiveDownEvent(FC.java:314)
[JBoss] at org.jgroups.stack.Protocol.passDown(Protocol.java:551)
[JBoss] at org.jgroups.protocols.FRAG2.down(FRAG2.java:167)
[JBoss] at org.jgroups.stack.Protocol.receiveDownEvent(Protocol.java:517)
[JBoss] at org.jgroups.stack.Protocol.passDown(Protocol.java:551)
[JBoss] at org.jgroups.protocols.pbcast.STATE_TRANSFER.down(STATE_TRANSFER.java:294)
[JBoss] at org.jgroups.stack.Protocol.receiveDownEvent(Protocol.java:517)
[JBoss] at org.jgroups.stack.ProtocolStack.down(ProtocolStack.java:385)
[JBoss] at org.jgroups.JChannel.down(JChannel.java:1231)
[JBoss] at org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.down(MessageDispatcher.java:788)
[JBoss] at org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.passDown(MessageDispatcher.java:765)
[JBoss] at org.jgroups.blocks.RequestCorrelator.sendRequest(RequestCorrelator.java:299)
[JBoss] at org.jgroups.blocks.GroupRequest.doExecute(GroupRequest.java:444)
[JBoss] at org.jgroups.blocks.GroupRequest.execute(GroupRequest.java:193)
[JBoss] at org.jgroups.blocks.MessageDispatcher.castMessage(MessageDispatcher.java:429)
Having a look at FC, in handleDownMessage(), where the problem occurred, there's this:
Util.release(lock);
try
{
...
for(int i=0; i < creditors.size(); i++)
}
....
in handleCredit() there's:
if(Util.acquire(lock)) {
...
if(creditors.size() > 0)
...
}
If the creditors.remove(sender) call is invoked while the handleDownMessage for loop is looping, there's a possibility of IndexOutOfBoundsException.
- relates to
-
JBPAPP-102 JGroups - Non-thread-safe access to FC.creditors
- Closed
-
JGRP-450 Non thread safe access to FC.creditors
- Resolved