-
-
Notifications
You must be signed in to change notification settings - Fork 274
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
[JENKINS-69890] Prevent deadlock on websocket agents #595
Conversation
More information in [JENKINS-69890](https://issues.jenkins.io/browse/JENKINS-69890)
// making this call async to avoid potential deadlocks when some thread is holding a lock on the | ||
// channel object while this thread is trying to acquire it to call Transport#terminate | ||
ch.get().executor.submit(() -> transport.terminate(new ChannelClosedException(ch.get(), null))); |
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.
I suspect a similar change would be needed in onError
method if it works.
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.
👍
I just added it as well.
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.
Needs at least a manual sanity check. You can also check in core WebSocketAgentsTest
and JNLPLauncherRealTest.webSocket
.
I wonder if this could be one cause of occasional flakes in |
@jglick Good idea! On top of running the automated tests of that project, I also built it and used it in core in order to run the tests you mentioned, and they went fine. |
Co-authored-by: Jesse Glick <[email protected]>
More information in JENKINS-69890