-
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
WebSocketSession.close() calls onWebSocketClose() with lock held #4462
Comments
@sbordet were you able to reproduce this problem with 10.0.x? In jetty 10 websocket the only call to
|
@lachlan-roberts see stack trace that shows how
|
CometD 6 failing test is |
@sbordet what lock is being held? We can't see any core locks in that stack trace? |
@gregw the lock being held is the one from |
Just for the sake of clarity in this issue... as discussed on a hangout, the problem is not a held lock, but an allocated SharedBlockingCallback. The second call waits or the allocated callback to be returned (auto closed), but that never happens because the first call is the one reentrantly making the second call and thus will not complete as it is waiting on itself. The solution may be just to not used a shared callback There is also a question as why block() is not called? |
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
- Replicate problems from WS close deadlock with test cases - use FutureCallback instead of SharedBlockingCallback for WS blocking methods - add timeout to the blocking callbacks for WS for (idleTimeout + 1000ms) - Core throws ClosedChannelException instead of ISE if send after closed
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
Issue #4462 - do not throw IOException on Javax websocket close
Jetty version
10.0.x
Description
Currently
WebSocketSession.close()
can be called concurrently and there is no atomic state change to guard against this.The problem is that calling
close()
may call application code (onclose
event handlers) with the lock held, and that is recipe for problems (for example, CometD 6 deadlocks).The text was updated successfully, but these errors were encountered: