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

Jetty 12 - LargeHeaderTest shows rare (error) response write bug where no response is produced #9672

Closed
joakime opened this issue Apr 24, 2023 · 6 comments
Assignees
Labels
Bug For general bugs on Jetty side
Milestone

Comments

@joakime
Copy link
Contributor

joakime commented Apr 24, 2023

Jetty version(s)
12

Java version/vendor (use: java -version)
17.0.6

OS type/version
Linux

Description
When working on restoring the disabled test LargeHeaderTest it can be seen that some of the responses are not producing any response.
The connection is closed before a response is written (as evidenced by wireshark capture).

It happens about 1 time out of 200 full requests.

See branch fix/12.0.x/large-header-test for the current state of the LargeHeaderTest.

Note: the LargeHeaderTest creates 500 new connections, each making a simple request, every request reaches the Handler, which adds an excessively large response header, and then attempts to write a tiny response body. Each response that the client sees should be a 500: Response header too large.

@joakime joakime added the Bug For general bugs on Jetty side label Apr 24, 2023
@joakime joakime added this to the 12.0.x milestone Apr 24, 2023
@joakime joakime self-assigned this Apr 24, 2023
@joakime
Copy link
Contributor Author

joakime commented Apr 24, 2023

@sbordet I managed to capture a full DEBUG log from this branch. (had to turn on logback to capture it successfully).

Pay attention to the end of the log.

[ERROR] Failures:
[ERROR]   LargeHeaderTest.testLargeHeaderNewConnections:194 All tasks did not fail as expected.
Iterations: 500
Count (500 response status) [expected]: 492
Count (null response): 0
Count (throwables): 0
Count (other status codes): 8
 ==> expected: <500> but was: <492>


2023-04-24 17:23:57,807 DEBUG [ForkJoinPool-1-worker-1] o.e.j.s.LargeHeaderTest [LargeHeaderTest.java:189] -- Other Result: <status-bad-0-144>
2023-04-24 17:23:57,807 DEBUG [ForkJoinPool-1-worker-1] o.e.j.s.LargeHeaderTest [LargeHeaderTest.java:189] -- Other Result: <status-bad-0-221>
2023-04-24 17:23:57,807 DEBUG [ForkJoinPool-1-worker-1] o.e.j.s.LargeHeaderTest [LargeHeaderTest.java:189] -- Other Result: <status-bad-0-239>
2023-04-24 17:23:57,807 DEBUG [ForkJoinPool-1-worker-1] o.e.j.s.LargeHeaderTest [LargeHeaderTest.java:189] -- Other Result: <status-bad-0-307>
2023-04-24 17:23:57,808 DEBUG [ForkJoinPool-1-worker-1] o.e.j.s.LargeHeaderTest [LargeHeaderTest.java:189] -- Other Result: <status-bad-0-316>
2023-04-24 17:23:57,808 DEBUG [ForkJoinPool-1-worker-1] o.e.j.s.LargeHeaderTest [LargeHeaderTest.java:189] -- Other Result: <status-bad-0-344>
2023-04-24 17:23:57,808 DEBUG [ForkJoinPool-1-worker-1] o.e.j.s.LargeHeaderTest [LargeHeaderTest.java:189] -- Other Result: <status-bad-0-404>
2023-04-24 17:23:57,808 DEBUG [ForkJoinPool-1-worker-1] o.e.j.s.LargeHeaderTest [LargeHeaderTest.java:189] -- Other Result: <status-bad-0-469>

@joakime
Copy link
Contributor Author

joakime commented Apr 24, 2023

@gregw you might want to be aware of this

@joakime joakime moved this to 👀 In review in Jetty 12.0.0.beta2 May 10, 2023
@joakime joakime moved this from 👀 In review to 🏗 In progress in Jetty 12.0.0.beta2 May 10, 2023
@gregw
Copy link
Contributor

gregw commented Jun 6, 2023

@joakime can you still reproduce this?

@gregw
Copy link
Contributor

gregw commented Jun 6, 2023

I get a long pause every 500 to 1000 runs when running in a loop in Intellij, but the test does not fail. No reports of empty responses and when a test for slow responses is added, I see no slow responses?

@gregw
Copy link
Contributor

gregw commented Jun 6, 2023

Hmmmm when I stop the test in the middle of a long pause and then immediately re-run it, then very first test goes back into a long pause. Thus I'm thinking it is an intellij or system issue rather than a test issue.

@joakime
Copy link
Contributor Author

joakime commented Jun 6, 2023

I consider this to be fixed by PR #9684 now

@joakime joakime closed this as completed Jun 6, 2023
@github-project-automation github-project-automation bot moved this from 🏗 In progress to ✅ Done in Jetty 12.0.0.beta2 Jun 6, 2023
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
None yet
Development

No branches or pull requests

2 participants