-
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
QueuedThreadPool: Stopped without executing or closing null #7650
Comments
This issue is still occurring for us. Is there anything more I can do to help here? |
Wonder how a null job even entered the queue. We have handling for |
Yeah, if you have a QueuedThreadPool pool = new QueuedThreadPool();
pool.start();
pool.execute(null);
|
Would extending the if condition like this else if (job != NOOP || job != null) {
LOG.warn("Stopped without executing or closing {}", job);
} be sufficient here? I can open a PR if you like. |
I think the loop should not test for @dzoech care to submit a pull request? |
Sure, I'll follow up with a PR in the next couple of weeks. |
Signed-off-by: Dominik Zöchbauer <[email protected]>
Signed-off-by: Dominik Zöchbauer <[email protected]>
Signed-off-by: Dominik Zöchbauer <[email protected]>
Signed-off-by: Dominik Zöchbauer <[email protected]>
I now created the PR against 9.4 since we are using this version, which is predefined by Is this the correct approach to get it merged? |
Signed-off-by: Dominik Zöchbauer <[email protected]>
* Issue #7650 - Fix race condition when stopping QueuedThreadPool Signed-off-by: Dominik Zöchbauer <[email protected]> Co-authored-by: Greg Wilkins <[email protected]> Co-authored-by: Simone Bordet <[email protected]>
…x-documentation-operations-logging * upstream/jetty-12.0.x: (35 commits) Fixes jetty#9326 - Rename DecryptedEndPoint to SslEndPoint. Jetty 10 Upgrade to Hazelcast 5 and totally disable auto join multicast etc.. (fix build on CI) (jetty#9331) jetty#9328 - changes from review jetty#9287 - catch error in ee9 maxRequestSize MultiPart test Jetty 12.0.x 9301 fix ee10 jstl jpms (jetty#9321) Issue jetty#9301 Fix dependencies for ee10-glassfish-jstl module (jetty#9303) Jetty 12 Hazelcast 5.x and disable auto detection/multicast" (jetty#9332) jetty#9287 - fix further test failures Fixed imports. Issue jetty#7650 - Fix race condition when stopping QueuedThreadPool (jetty#9325) jetty#9287 - remove unpaired release of Content.Chunk Issue jetty#8991 - rename websocket isDemanding() method to isAutoDemanding() Issue jetty#9287 - fix failing tests changes f rom review add todo to revert to normal pool after fix for jetty#9311 Issue jetty#9309 - Introducing test for requestlog format with spaces use non-pooling RetainableByteBufferPool to work around performance bug consumeAvailable should use number of reads instead of bytes fix for retainable merge changes from review ...
Jetty version(s)
9.4.44.v20210927
Java version/vendor
(use: java -version)
Java 17
we use
gcr.io/distroless/java17-debian11:nonroot
OS type/version
Debian 11
Description
We use Spring Boot 2.6.2 with Jetty.
In our logs the following log appears:
WARN [SpringApplicationShutdownHook] QueuedThreadPool: Stopped without executing or closing null
This seems to be the code that writes that warning log:
https://github.com/eclipse/jetty.project/blob/jetty-9.4.44.v20210927/jetty-util/src/main/java/org/eclipse/jetty/util/thread/QueuedThreadPool.java#L299
My understand is that either the
BlockingQueue<Runnable> _jobs
contains objects that are null, or there is a race condition so that!_jobs.isEmpty()
istrue
but then_jobs.poll()
returnsnull
because it is now empty.I'm not sure if this issue could be related to Spring so I'd like to mention that we implemented a shutdown hook waiting for an ExecutorService:
How to reproduce?
Unfortunately, I cannot reproduce it.
The text was updated successfully, but these errors were encountered: