Skip to content
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

AsyncContext completion attempt after AsyncListener.onError is called #5675

Open
wendigo opened this issue Jun 11, 2024 · 3 comments
Open

AsyncContext completion attempt after AsyncListener.onError is called #5675

wendigo opened this issue Jun 11, 2024 · 3 comments

Comments

@wendigo
Copy link

wendigo commented Jun 11, 2024

We've observer an issue with Jersey 3.1.+ running in the Jetty EE10 container that applies to HTTP/2 protocol.

When client disconnects in the middle of the request (due to a timeout or whatever), it sends a RST_STREAM frame that on the server side, finishes an AsyncContext with an error through the AsyncListener.onError. It seems that Jersey doesn't understand this condition, and still tries to finish an AsyncContext when the AsyncResponse.complete is called. Since Jetty recycles request/response objects on AsyncContext error, there is no response to write output to, and the jersey code generates a non-actionable warning.

We've work around this issue by implementing trinodb/trino#22315 that seems to do a trick. I'd like to see a permanent solution on the Jersey side instead.

@wendigo
Copy link
Author

wendigo commented Jun 11, 2024

@lorban anything else to add here?

@lorban
Copy link

lorban commented Jun 11, 2024

@wendigo no; you accurately described the problem.

@jansupol
Copy link
Contributor

It looks like creating the test case is the most difficult part here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants