-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Deadlocks with DEBUG logging enabled in jetty-server testing #11282
Comments
Once PR #11225 is merged, this deadlock can be triggered with the following. Turn on DEBUG for all of jetty-server, run StopTest.testCommittedResponsesAreClosed() |
Attaching latest deadlock jstack dumps. |
…esting. Introduced AutoLock.tryLock() to use it in the toString() implementations that lock in order to retrieve a consistent state to produce the string. Signed-off-by: Simone Bordet <[email protected]>
The problem is as follows: In the example above, T1 grabs the The fact that It is going to be hard to find and modify the The log debug statement are going to occur anyway, if not explicitly within the lock, in a method called from within the lock that does not know that it is being called with a lock held. After discussion, the solution has been to introduce |
A related, but different, issue: #8354. |
Fixes #11282 - Deadlocks with DEBUG logging enabled in jetty-server testing.
Jetty version(s)
12.0.6-SNAPSHOT
Jetty Environment
Any
Java version/vendor
(use: java -version)
OpenJDK 17 (but could happen in any JDK)
OS type/version
Any
Description
When running the
jetty-server
tests in DEBUG a deadlock was discovered.Thread Dump of pid 50408 showing 2 deadlocks.
To copy/paste the first deadlock seen from the attached thread dump ...
The text was updated successfully, but these errors were encountered: