-
Notifications
You must be signed in to change notification settings - Fork 306
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
Cyclic dependency between SSO classes causes deadlock #4281
Comments
That is a very old version of Payara. Is the same problem present on the latest Payara 5.x? |
Considering that the requester fell unresponsive and that this issue was reported on a considerably older release of Payara Server, we'll close this issue. Please, verify if the problem is present in the current release and if this is the case raise a new issue with a detailed reproducer that can help us identify the problem. |
- implementation reflects javadoc now - fixes deadlock caused by side effect of getter
- see javadoc in Session interface
- improves encapsulation of parent class
- fixes deadlock between SingleSignOnEntry:121 and BaseHASession:239
- isValid has side effect described in Session interface - we cannot break contract
- partially fixes cyclic dependency between SingleSignOnEntry:121 and BaseHASession:239
- isValid has side effect described in Session interface - we cannot break contract
- synchronization object should be final, that is what Sonar said
- see javadoc in Session interface
- improves encapsulation of parent class
- partially fixes cyclic dependency between SingleSignOnEntry:121 and BaseHASession:239
- isValid has side effect described in Session interface - we cannot break contract
Part of release 5.2020.2 |
Description
Issue may relate to #2881 and #4280
During debugging why SSO never expires I have found a path, that can cause denial of service.
Expected Outcome
No DoS
Current Outcome
Steps to reproduce (Only for bug reports)
Samples
Context (Optional)
SingleSignOnEntry:121 calls toString on removed session
log.warning("session " + session.getId() + "found (and removed): " + removed);
BaseHASession:239 calls getAttributeNames() that is forwarded to StandardSession:1349 with isValid call.
There I think isValid has side effect because it is not simple getter but it's meaning is near "IsValidAndExpireIfNot".
So we call toString on session that is expired and clean up thread processes expired sessions. Clean up thread holds a lock on session cache and expired session tries to print itself in another thread but cannot because needs lock on cache.
Environment
The text was updated successfully, but these errors were encountered: