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

A ConcurrentModificationException inside BaseWrapperManagedConnection class freezes the connection pool. #752

Open
epeire opened this issue May 11, 2022 · 1 comment

Comments

@epeire
Copy link

epeire commented May 11, 2022

Hello :)

We currently have issues with an unexpected ConcurrentModificationException inside the BaseWrapperManagedConnection class.
Under load, this leads to a complete freeze of the connection pool (which is then unable to deliver new connections anymore) - we are then forced to restart the application.

We currently use a IronJacamar 1.5.4.Final; the problem has been found on versions 1.4.38, 1.5.2 and 1.5.4
We had no problem with version 1.4.9.

This problem might have been been introduced with version ~1.4.20, in a change related to JBJCA-1396.

Here is an except of the stacktrace :

stacktrace_part.txt

The problem is caused by the BaseWrapperManagedConnection#cleanup() method (line 341)
It iterates on a set, and calls #closeHandle (line 347) on each element, which calls returnHandle(), which finally removes an element from the set (from outside the iterator ^^)
When the set contains more than one element, the iterator detects the change and throws the exception.

Iterating on a copy of the set solved the problem for us (cf PR)

@tadamski
Copy link
Contributor

Hello @epeire

Thanks for detailed description and analysis. I have created https://issues.redhat.com/browse/JBJCA-1446 to track this issue and I'm looking into this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants