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

Flaky test ServletTest.testSimpleIdleRead() #11327

Closed
sbordet opened this issue Jan 26, 2024 · 1 comment · Fixed by #12253
Closed

Flaky test ServletTest.testSimpleIdleRead() #11327

sbordet opened this issue Jan 26, 2024 · 1 comment · Fixed by #12253
Assignees
Labels
Bug For general bugs on Jetty side flaky-test

Comments

@sbordet
Copy link
Contributor

sbordet commented Jan 26, 2024

Jetty version(s)
12+

Jetty Environment
ee10

Description
See #10945.

The problem is as follows:

The last request does not send the content, so the Servlet is blocked in a read.
The idle timeout fires, and runs the demand callback, which reads the failure, which wakes up the blocked by throwing, which is then caught and handled in ServletChannel.handleException(), resulting in a sendError() that succeeds.

In the process above, however, we do not notify the underlying HttpStream that there was a failure.
So in case of HttpStreamOverHTTP1, the underlying EndPoint remains fill interested (because the request was waiting for content that was never sent).

When the sendError() completes successfully, HttpStreamOverHTTP1 is succeeded, where it checks if it was fill interested, finding that it was, and aborting with "read pending".

@sbordet sbordet added the Bug For general bugs on Jetty side label Jan 26, 2024
@sbordet
Copy link
Contributor Author

sbordet commented Jan 26, 2024

The test also erroneously send 11 bytes of data instead of 10, due to the extra \n after the 10 digits.

@sbordet sbordet self-assigned this Feb 21, 2024
@sbordet sbordet moved this to 🏗 In progress in Jetty 12.0.13 - FROZEN Aug 28, 2024
sbordet added a commit that referenced this issue Sep 9, 2024
Just improving the test code.
The flakyness was likely fixed by the work in #12216 and #12237.

Signed-off-by: Simone Bordet <[email protected]>
@sbordet sbordet linked a pull request Sep 9, 2024 that will close this issue
@sbordet sbordet moved this to 🏗 In progress in Jetty 12.0.14 Sep 9, 2024
sbordet added a commit that referenced this issue Sep 10, 2024
Just improving the test code.
The flakyness was likely fixed by the work in #12216 and #12237.

Signed-off-by: Simone Bordet <[email protected]>
@github-project-automation github-project-automation bot moved this from 🏗 In progress to ✅ Done in Jetty 12.0.14 Sep 10, 2024
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 flaky-test
Projects
No open projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

2 participants