Open Bug 1529830 Opened 7 years ago Updated 2 years ago

Empty http2 DATA frame with END_STREAM flag cause GoAway Internal Error

Categories

(Core :: Networking: HTTP, defect, P3)

66 Branch
defect

Tracking

()

People

(Reporter: xpahos, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: [necko-triaged])

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.109 Safari/537.36

Steps to reproduce:

Start sending DATA frames to Firefox without END_FRAME flag. On the end send empty DATA frame with END_FRAME flag.

Actual results:

Firefox will respond with GoAway INTERNALL_ERROR == 2

Expected results:

Two flow-control windows are applicable: the stream flow-control window and the connection flow-control window. The sender MUST NOT send a flow-controlled frame with a length that exceeds the space available in either of the flow-control windows advertised by the receiver. Frames with zero length with the END_STREAM flag set (that is, an empty DATA frame) MAY be sent if there is no available space in either flow-control window.

https://http2.github.io/http2-spec/

Summary: Empty http2 DATA frame with END_FRAME flag cause GoAway Internal Error → Empty http2 DATA frame with END_STREAM flag cause GoAway Internal Error

Looks like nsHttpTransaction::HandleContent in nsHttpTransaction.cpp is setting mTransactionDone = true; without checking END_STREAM flag. When receiving the next empty DATA frame with END_STREAM nsHttpTransaction::WriteSegments checks if mTransactionDone and returns NS_BASE_STREAM_CLOSED.

Dragana, do you have time to look into it?

Component: Untriaged → Networking: HTTP
Flags: needinfo?(dd.mozilla)
Priority: -- → P2
Product: Firefox → Core
Whiteboard: [necko-triaged]

do you have and test for this that I can reptroduse it?

Although I think I know what is going on.

Assignee: nobody → dd.mozilla
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Flags: needinfo?(dd.mozilla) → needinfo?(xpahos)

(In reply to Dragana Damjanovic [:dragana] from comment #3)

do you have and test for this that I can reptroduse it?

Although I think I know what is going on.

Unfortunately, we already changed behaviour on our production environment and I don't have a server with external access. Which HTTP server do you use for testing?

Assignee: dd.mozilla → nobody
Blocks: 1711687
Severity: normal → S4
Status: ASSIGNED → NEW
Priority: P2 → P3

Clear a needinfo that is pending on an inactive user.

Inactive users most likely will not respond; if the missing information is essential and cannot be collected another way, the bug maybe should be closed as INCOMPLETE.

For more information, please visit BugBot documentation.

Flags: needinfo?(xpahos)
You need to log in before you can comment on or make changes to this bug.