Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IndexOutOfBoundsException can occur during a resource outage. #23771

Closed
jmstephensgit opened this issue Dec 27, 2022 · 1 comment
Closed

IndexOutOfBoundsException can occur during a resource outage. #23771

jmstephensgit opened this issue Dec 27, 2022 · 1 comment
Assignees
Labels
release bug This bug is present in a released version of Open Liberty release:23001 team:Zombie Apocalypse

Comments

@jmstephensgit
Copy link
Member

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:

  • OpenLiberty Version: [all]
  • Affected feature(s) [Any using connection pools and the back end resource fails]
  • Java Version: [All]
  • server.xml configuration using datasource or connection factories.

Additional context
None

@jmstephensgit jmstephensgit added team:Zombie Apocalypse release bug This bug is present in a released version of Open Liberty labels Dec 27, 2022
@jmstephensgit jmstephensgit self-assigned this Dec 27, 2022
@jmstephensgit
Copy link
Member Author

Done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release bug This bug is present in a released version of Open Liberty release:23001 team:Zombie Apocalypse
Projects
None yet
Development

No branches or pull requests

2 participants