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

race conditions in http2 request handler #27786

Open
arenevier opened this issue Feb 25, 2021 · 1 comment
Open

race conditions in http2 request handler #27786

arenevier opened this issue Feb 25, 2021 · 1 comment

Comments

@arenevier
Copy link
Contributor

@arenevier arenevier commented Feb 25, 2021

Hi,

We are handling http2 frames in a separate thread.

A race condition could happen in the following case:

main thread: receive Connect frame
handler thread: start processing the frame

main thread: receive Reset frame
handler thread: tries to write to write to the stream. But the stream is now closed.

In practice, it rarely if ever happens with our regular h2 handlers.

But with websockets, some of the handlers have a time.sleep instruction, and I have noticed it occasionally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants