IndexOutOfBoundsException can occur during a resource outage. #23771
Labels
release bug
This bug is present in a released version of Open Liberty
release:23001
team:Zombie Apocalypse
Describe the bug
java.lang.IndexOutOfBoundsException can occur during a back end resource outage. During an outage connections can be marked to be destroyed and should not be reused. The FreePool code Is removing the bad connection, but its matching with the same connection. Since its a match, it tries to remove the connection again, resulting in the exception.
StackTrace=java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.rangeCheck(ArrayList.java:670)
at java.util.ArrayList.remove(ArrayList.java:509)
at com.ibm.ejs.j2c.FreePool.getFreeConnection(FreePool.java:658)
Steps to Reproduce
Timing related and may not be easy to reproduce. A resource outage needs to occur with connections being marked to be destroyed. If the timing is correct, if this same connection is in the free pool and its detected as bad and its in the second part of the free pool processing code, then this error can occur.
Expected behavior
java.lang.IndexOutOfBoundsException should not occur in the free pool
Diagnostic information:
Additional context
None
The text was updated successfully, but these errors were encountered: