-
Notifications
You must be signed in to change notification settings - Fork 175
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
[master] ConcurrencyException "Max number of attempts to lock object" in WriteLockManager - bugfix #2323
[master] ConcurrencyException "Max number of attempts to lock object" in WriteLockManager - bugfix #2323
Conversation
…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 <[email protected]>
This could be related to the #2219 (comment) ? The linked issue is a blocker both for Spring and GlassFish now, I think you missed one systematic problem when migrating I would have to spend much more time to analyze which change exactly causes the deadlock but as the change is a breaking change, I would recommend to revert it at least for 4.0.x versions. For now everybody stays with 4.0.3, GlassFish 7 with EclipseLink 4.0.4 doesn't pass even TCK for Jakarta EE 10. |
About #2219 . I think it's related with |
@dmatej are available somewhere some details logs/ Jenkins output about Glassfish TCK failures related with EclipseLink 4.0.4? |
It is a race condition, originally we blamed Weld, but then it failed after we reverted weld upgrade. Then by doing bisect we have found that the EclipseLink update to 4.0.4 is to blame. It is a race condition, so ti passes in some 30% of runs on my machine - it is quite well reproducible if you run those tests several times. Jenkins CI has shorter history now, but you can checkout GlassFish's master branch, then run this:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good
…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 <[email protected]> (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 <[email protected]> (cherry picked from commit e4245e2)
Fixes #2319 in
WriteLockManager
bytoWaitOn.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 persistence settings -> Zero time ammount to wait.Additionally there are some other migrations from
synchronized
to ReentrantLock usage for CacheKey related code.