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
Jetty 9.4.x 3550 queued thread pool stalled #3586
Conversation
previously if there were no idle threads, QueuedThreadPool.execute() would just queue the job and not start a new thread to run it Signed-off-by: lachan-roberts <lachlan@webtide.com>
QueuedThreadPool pool = new QueuedThreadPool(4, 3); | ||
|
||
String dump = pool.dump(); | ||
// TODO use hamcrest 2.0 regex matcher |
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 need to do a refresh of maven-test-helper for Jetty 9.4.x anyway.
In the meantime you can use the maven-test-helper regex version ...
import static org.eclipse.jetty.websocket.common.test.MoreMatchers.regex;
assertThat(endpoint.capture.pollMessages(), regex("^onBinary\\(.*InputStream.*"));
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.
never mind, that's a websocket specific matcher.
i'll upgrade maven-test-helper today. (and even include the new Net
helper for junit 5. 879e161)
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.
thanks
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'm good with these changes.
@@ -603,7 +604,7 @@ public void dump(Appendable out, String indent) throws IOException | |||
String knownMethod = ""; | |||
for (StackTraceElement t : trace) | |||
{ | |||
if ("idleJobPoll".equals(t.getMethodName()) && t.getClassName().endsWith("QueuedThreadPool")) | |||
if ("idleJobPoll".equals(t.getMethodName()) && t.getClassName().endsWith("QueuedThreadPool$Runner")) |
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.
can this be ...
if ("idleJobPoll".equals(t.getMethodName()) && t.getClassName().equals(Runner.class.getName()))
instead? To avoid static name of class, if someone refactors that class (again), which broken this before.
Signed-off-by: Greg Wilkins <gregw@webtide.com>
This fixes #3550 by ensure that a new thread is always started when: