-
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
Jetty 9.4.x #1970 lost selector #2023
Conversation
Instrumented EWYK to gather additional information in case the selector thread is lost. Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Extended LowResourceMonitor to also check selector health Improved the dump of ManagedSelector and EWYK Signed-off-by: Greg Wilkins <gregw@webtide.com>
The actions should not be none blocking and they are intended to be executed by the selector thread between selections, so instead of passing them back to an execution strategy that might dispatch them, execute them in a tight loop with lock held. If a blocking task is discovered, warn and then pass back to the exection strategy. Signed-off-by: Greg Wilkins <gregw@webtide.com>
@sbordet I've made this PR for:
|
@sbordet the ip-validation is red because I did a merge and it's commits don't have signed-off-by clauses and the ip system is too stupid to notice that the author is a committer anyway. We can ignore the red X and merge anyway (when ready) as the committer who does the merge is responsible for checking anyway (and if we squash they make the commit). |
@Test | ||
public void testStuckSelector() throws Exception | ||
{ | ||
// TODO currently this is test needs human inspection of the log output |
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.
@sbordet Not sure if we should keep this test, as it is has no asserts and needs visual confirmation.
private final LongAdder _nonBlocking = new LongAdder(); | ||
private final LongAdder _blocking = new LongAdder(); | ||
private final LongAdder _executed = new LongAdder(); | ||
private final Producer _producer; | ||
private final Executor _executor; | ||
private final ReservedThreadExecutor _producers; | ||
private State _state = State.IDLE; | ||
private Thread _producerThread; | ||
private int _ancient; | ||
private int _history; |
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.
@sbordet I propose that we remove the _ancient and _history fields and the static array of state strings
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.
@sbordet looking at this again, I think the JIT will take out all the history stuff, so I think this is good to merge as is!
Signed-off-by: Greg Wilkins <gregw@webtide.com>
Issue #1970