twisted / twisted/twisted

HTTP2 does not resume the same stream that was blocked

Open
#9,651 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug new priority-normal web
Dominant language
Python
Stars
6k
Forks
1.2k
Avg merge
2d 10h
Merged PRs (30d)
10

Description

markrwilliams's avatar @markrwilliams reported
Trac ID trac#9651
Type defect
Created 2019-06-08 21:04:54Z

twisted.web._http2.H2Connection._sendPrioritisedData first finds a stream from the priority tree to work on, then checks if consumer is blocked. If it is, _sendPrioritisedData reschedules itself as a callback on the the _consumerBlocked Deferred. There's no guarantee that the stream popped off the priority tree when _sendPriortisedData will be the same stream.

The simple solution is check _consumerBlocked before looking for a stream that might not be used.

Searchable metadata
trac-id__9651 9651
type__defect defect
reporter__markrwilliams markrwilliams
priority__normal normal
milestone__None None
branch__ 
branch_author__ 
status__new new
resolution__None None
component__web web
keywords__h2 h2
time__1560027894126933 1560027894126933
changetime__1560027894126933 1560027894126933
version__None None
owner__None None

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in twisted.web._http2.H2Connection._sendPrioritisedData and inspect how _consumerBlocked is checked and used. Ensure the callback resumes the same blocked HTTP/2 stream rather than selecting a different stream from the priority tree; done means the blocked stream is reliably resumed.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
networking
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.