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 RoundRobinConnectionPoolTest.testRoundRobin() #6217

Closed
lachlan-roberts opened this issue Apr 27, 2021 · 6 comments
Closed

Flaky test RoundRobinConnectionPoolTest.testRoundRobin() #6217

lachlan-roberts opened this issue Apr 27, 2021 · 6 comments
Assignees
Labels

Comments

@lachlan-roberts
Copy link
Contributor

Jetty version
10.0.x

Description
The test RoundRobinConnectionPoolTest.testRoundRobin() is failing for some PR builds.

https://jenkins.webtide.net/blue/organizations/jenkins/jetty.project/detail/jetty-10.0.x-FixTypo/1/tests

[55810, 55812, 55808, 55810, 55808]
Expected: <55808>
     but: was <55812>
	at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:20)
	at org.eclipse.jetty.http.client.RoundRobinConnectionPoolTest.testRoundRobin(RoundRobinConnectionPoolTest.java:103)
@lachlan-roberts
Copy link
Contributor Author

@lachlan-roberts
Copy link
Contributor Author

This test only seems to fail for the FCGI transport.
Can be reproduced easily enough locally if the test is on repeat until failure.

@lachlan-roberts
Copy link
Contributor Author

@lorban do you want to look into this one? This one seems to fail a lot on CI.
https://jenkins.webtide.net/blue/organizations/jenkins/jetty.project/detail/PR-6569/8/tests/

@lorban
Copy link
Contributor

lorban commented Aug 30, 2021

There seems to be a race condition between the calls to HttpChannelOverFCGI.eof() and HttpChannelOverFCGI.failAllContent(). The former should always be called first but it seems that in rare occurrences it is called second.

This has a side-effect that the Connection: close header is added to the response, so the connection is removed from the pool, which eventually triggers the assertion error as the connections in the pool did not generate the results that were expected from a larger number of connections.

Still investigating...

@lorban lorban assigned sbordet and unassigned lorban Aug 31, 2021
@lorban
Copy link
Contributor

lorban commented Aug 31, 2021

This race condition is intrinsic to the way FCGI currently is implemented. There needs to be adjustments such as the parser doesn't run concurrently with the dispatched servlet thread anymore.

@sbordet sbordet mentioned this issue Sep 2, 2021
@sbordet
Copy link
Contributor

sbordet commented Sep 2, 2021

Closed in favor of #6693.

@sbordet sbordet closed this as completed Sep 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants