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

Make sure the delegate callback has been failed before SendCallback's iteration returns #12340

Draft
wants to merge 1 commit into
base: jetty-12.1.x
Choose a base branch
from

Conversation

lorban
Copy link
Contributor

@lorban lorban commented Oct 2, 2024

Tentative fix for #12330

LargeHeaderTest.testLargeHeaderNewConnectionsConcurrent() tests a write failure case, with the given callback being of invocable type BLOCKING. In this case, SendCallback.onFailure() gives the responsibility of failing the delegate callback to an executor, meaning that when SendCallback.iterate() returns the delegate callback may or may not has been failed.

This behavior is racy and may lead to all kinds of problems in the server, like the response data being written before the headers, NPEs, ISEs...

…lback's iteration returns

Signed-off-by: Ludovic Orban <lorban@bitronix.be>
@lorban lorban added the Bug For general bugs on Jetty side label Oct 2, 2024
@lorban lorban self-assigned this Oct 2, 2024
@lorban lorban requested review from gregw and sbordet October 2, 2024 15:12
@joakime joakime linked an issue Oct 2, 2024 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For general bugs on Jetty side
Projects
Status: 👀 In review
Development

Successfully merging this pull request may close these issues.

LargeHeaderTest.testLargeHeaderNewConnectionsConcurrent is flaky
1 participant