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

Fix #5605 Unblock non container Threads #5936

Merged
merged 22 commits into from Feb 17, 2021

Conversation

gregw
Copy link
Contributor

@gregw gregw commented Feb 2, 2021

Ensure that HttpInput is always closed to EOF, EarlyEOF or Error, so that non container threads doing blocking reads
will not block forever, even if late. Delay recycling of HttpInput until next request is received.

Fixes #5605 replaces #5923

Ensure that HttpInput is always closed to EOF, EarlyEOF or Error, so that non container threads doing blocking reads
will not block forever, even if late.   Delay recycling of HttpInput until next request is received.
@gregw gregw added this to In progress in Jetty 9.4.37 via automation Feb 2, 2021
@gregw gregw requested review from sbordet and lorban February 2, 2021 13:05
@gregw gregw linked an issue Feb 2, 2021 that may be closed by this pull request
@gregw
Copy link
Contributor Author

gregw commented Feb 2, 2021

@lorban @sbordet This is looking reasonable on the read side. I added some explicit tests which it passes. It has also passed Ludo's stress test reproduction.

However, I have left it as draft for now, as I think we may need to do something similar on the write side. Give me your thoughts on the read side approach and then I'll look at the write side.

Ensure that HttpInput is always closed to EOF, EarlyEOF or Error, so that non container threads doing blocking reads
will not block forever, even if late.   Delay recycling of HttpInput until next request is received.
test and fixes for the write side.
test and fixes for the write side.
Don't consumeAll before upgrade
revert fillInterest cancellation and just abort connection instead.
tested for all transports
@gregw gregw marked this pull request as ready for review February 3, 2021 20:56
@gregw
Copy link
Contributor Author

gregw commented Feb 4, 2021

@sbordet @lorban nudge

@gregw
Copy link
Contributor Author

gregw commented Feb 4, 2021

actually hold off... I think I can see some simplifications. I think we should abort if we have pending async operations as well....

@gregw gregw marked this pull request as draft February 4, 2021 08:50
Simplification. Always abort on any pending read or write in completion.
Simplification. Always abort on any pending read or write in completion.
@gregw gregw marked this pull request as ready for review February 4, 2021 09:27
@gregw
Copy link
Contributor Author

gregw commented Feb 4, 2021

@lorban @sbordet OK simplification pushed. Ready for review once the light goes green.

@gregw
Copy link
Contributor Author

gregw commented Feb 4, 2021

@lorban @sbordet nudge

Jetty 9.4.37 automation moved this from In progress to Review in progress Feb 5, 2021
updates from review.
@gregw gregw requested a review from lorban February 5, 2021 14:37
Copy link
Contributor

@lorban lorban left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You've go my pre-approval. Changes look good the way they are besides a minor nit in one test that is more a matter of preference than anything else.
But the original bug reporter said he would test this branch early this week so I think it's worth holding off our merge until we get feedback.

Jetty 9.4.37 automation moved this from Review in progress to Reviewer approved Feb 8, 2021
@lorban lorban added the Bug For general bugs on Jetty side label Feb 9, 2021
@lorban lorban added this to the 9.4.x milestone Feb 9, 2021
refactored the complete method to consider unrecoverable API states no matter what the httpout state
actually is.  This avoid duplication of OPEN, CLOSING, CLOSED etc. handling.
@gregw gregw requested a review from lorban February 11, 2021 09:10
@gregw
Copy link
Contributor Author

gregw commented Feb 11, 2021

@sbordet nudge

@gregw
Copy link
Contributor Author

gregw commented Feb 11, 2021

rerunning CI, which was aborted for some reason???

Jetty 9.4.37 automation moved this from Reviewer approved to Review in progress Feb 11, 2021
Copy link
Contributor

@lorban lorban left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The write side fix is not working, see #5605 (comment)

@gregw gregw requested review from sbordet and lorban February 15, 2021 10:44
@gregw
Copy link
Contributor Author

gregw commented Feb 15, 2021

@lorban write side was something else.

@lorban
Copy link
Contributor

lorban commented Feb 15, 2021

@gregw yes, indeed. I forgot to update this PR after we discovered what the problem was on Friday, and the fact that it was specific to 10.0.x.

Copy link
Contributor

@lorban lorban left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@gregw
Copy link
Contributor Author

gregw commented Feb 16, 2021

@sbordet nudge!

@gregw gregw requested a review from sbordet February 16, 2021 16:49
Jetty 9.4.37 automation moved this from Review in progress to Reviewer approved Feb 16, 2021
@lorban lorban merged commit b3bebca into jetty-9.4.x Feb 17, 2021
Jetty 9.4.37 automation moved this from Reviewer approved to Done Feb 17, 2021
@joakime joakime deleted the jetty-9.4.x-5605-wakeup-blocked-threads branch April 16, 2021 14:35
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
No open projects
Development

Successfully merging this pull request may close these issues.

Blocked IO Thread not woken
3 participants