STREAM_STATE_ERROR
QUIC STREAM_STATE_ERROR (0x05) is sent when a STREAM frame is received for a stream that is not in a state that permits that frame. QUIC streams have a defined state machine. Sending a STREAM frame to a stream in half-closed or closed state violates the state machine.
Code
0x05
Decimal
5
Standard
RFC 9000 §20
Description
QUIC stream state machines define when each frame type is legal to receive. A stream transitions through states: idle, open, half-closed (local), half-closed (remote), and closed. Certain frames are only valid in certain states – for example, STREAM data frames are only valid when the stream is open and not yet half-closed by the sender. Sending a STREAM frame to a stream the receiver has already closed (sent RESET_STREAM or received a FIN) triggers STREAM_STATE_ERROR. This is similar to TCP's handling of data after FIN, but in QUIC it is a fatal connection error. Implementations should track stream states carefully. Concurrent request/response systems with many streams must ensure state tracking is correct for each stream ID independently.
Common Causes
- –STREAM data frame received on a stream already closed by RESET_STREAM
- –STREAM data frame received after the stream's FIN was already processed
- –QUIC implementation bug not tracking stream state correctly
- –Race condition in stream closure and data sending