-
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
ManagedSelector can livelock under high load #1924
Comments
* Actually using the MAX_ACTION_PERIOD value rather than a harcoded one. * Waking up the selector outside the sync block.
Reverted CreateEndPoint to be non-blocking, as the real issue was determined to be #1924 instead.
@sbordet your changes LGTM! |
Hello,
We have 2 virtual server each hosting 3 Jetty instance (on port 8080/8081/8082) having 1 webapp per instance. Here are the thread dump that shows:
Our high load test reaches the maxThreads and Jetty doesn't respond anymore. Thanks for your reply. |
@lgangloff your issue is different from what described in this issue, but it is indeed a bug. |
@sbordet is it a bug? I did an analysis and no deadlock detected. I do see many threads waiting on the lock for the same session, so there is some contention on session.... anyway if it is a bug it is definitely a different issue |
Sorry, the fact that the threads are locking monitor at org.eclipse.jetty.io.ManagedSelector$SelectorProducer.select(ManagedSelector.java:362) made me feel that was the same issue. Anyway, see #1947 |
@gregw yes it is a bug as we call user code while holding locks. |
There is some evidence that we are favouring selection too much and that we should always consume the action list as it exists initially before selecting. |
Alternate implementation that is count based rather than time based. Signed-off-by: Greg Wilkins <gregw@webtide.com>
after review Signed-off-by: Greg Wilkins <gregw@webtide.com>
There is evidence that under high load a thread may livelock running selector actions.
The text was updated successfully, but these errors were encountered: