-
Notifications
You must be signed in to change notification settings - Fork 176
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
ConcurrencyException "Max number of attempts to lock object" in WriteLockManager #2319
Comments
I am seeing complete deadlocks with 4.0.4 and similar exceptions, downgrading to 4.0.2 was only what helped. |
I'd like ask You which Java/JDK is used? |
JDK23 from docker image jetty:12-jdk23 |
And 4.0.3 seems to also be unaffected. |
I've reproduced it on RHEL 8.9 with OpenJDK build |
…LockManager - bugfix Fixes eclipse-ee4j#2319 in `WriteLockManager` by `toWaitOn.getInstanceLockCondition().await(MAX_WAIT, TimeUnit.MILLISECONDS);` to wait for lock on object (CacheKey) to be released. Before this fix there was `toWaitOnLockCondition.await(ConcurrencyUtil.SINGLETON.getAcquireWaitTime(), TimeUnit.MILLISECONDS);` which was `toWaitOnLockCondition.await(0, TimeUnit.MILLISECONDS);` in case of default settings -> Zero time ammount to wait. Additionally there are some other migrations from `synchronized` to ReentrantLock usage for CacheKey related code. Signed-off-by: Radek Felcman <radek.felcman@oracle.com>
…LockManager - bugfix (eclipse-ee4j#2323) Fixes eclipse-ee4j#2319 in `WriteLockManager` by `toWaitOn.getInstanceLockCondition().await(MAX_WAIT, TimeUnit.MILLISECONDS);` to wait for lock on object (CacheKey) to be released. Before this fix there was `toWaitOnLockCondition.await(ConcurrencyUtil.SINGLETON.getAcquireWaitTime(), TimeUnit.MILLISECONDS);` which was `toWaitOnLockCondition.await(0, TimeUnit.MILLISECONDS);` in case of default settings -> Zero time ammount to wait. Additionally there are some other migrations from `synchronized` to ReentrantLock usage for CacheKey related code. Signed-off-by: Radek Felcman <radek.felcman@oracle.com> (cherry picked from commit e4245e2)
…LockManager - bugfix - backport from master (#2329) * ConcurrencyException "Max number of attempts to lock object" in WriteLockManager - bugfix (#2323) Fixes #2319 in `WriteLockManager` by `toWaitOn.getInstanceLockCondition().await(MAX_WAIT, TimeUnit.MILLISECONDS);` to wait for lock on object (CacheKey) to be released. Before this fix there was `toWaitOnLockCondition.await(ConcurrencyUtil.SINGLETON.getAcquireWaitTime(), TimeUnit.MILLISECONDS);` which was `toWaitOnLockCondition.await(0, TimeUnit.MILLISECONDS);` in case of default settings -> Zero time ammount to wait. Additionally there are some other migrations from `synchronized` to ReentrantLock usage for CacheKey related code. Signed-off-by: Radek Felcman <radek.felcman@oracle.com> (cherry picked from commit e4245e2)
First release candidate of EclipseLink 4.0.5 (4.0.5-RC1) is available. |
Indeed, the UTs pass. Thank you for the quick fix |
Describe the bug
When using second-level cache on eclipselink version 4.0.3 (and on) we occusionally get the following exception
In version 4.0.2 (and older) we get no such exception.
The issue seems to be related to #2118
120511b#diff-feb6a6b57e86e1e75038ef21b8840c8eb0d713ea82d66205ffea78d02211a4edL170
To Reproduce
Unit test must fail with the stack trace above
Expected behavior
Should be able to acquire lock to perform query
The text was updated successfully, but these errors were encountered: