Subject: [quicwg/base-drafts] misleading advise on stream-related errors (#4123)

From: Marten Seemann <[email-masked]>
Date: Tue, 22 Sep 2020 01:24:01 -0700

The spec says:
> Errors that result in the connection being unusable, such as an obvious violation of protocol semantics or corruption of state that affects an entire connection, MUST be signaled using a CONNECTION_CLOSE frame (Section 19.19). An endpoint MAY close the connection in this manner even if the error only affects a single stream.

First of all, I have no idea what a "corruption of state" is supposed to be.
More importantly, the second sentence seems to suggest that if an error only affects a single stream, it might not be required to send a connection-level error. I'm thinking of a stream-level flow control violation.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/issues/4123

---

From: Lucas Pardue <[email-masked]>
Date: Tue, 22 Sep 2020 12:24:51 -0700

The challenge here is that the transport doesn't define how streams can be used by application layer protocols, but seems to want to strongly encourage how an application uses error codes. An example of "corruption of state" is something like a QPACK error that renders the HTTP/3 connection unusable because the QPACK state cannot be assured. In contrast, an application might treat receiving a header with an uppercase field name as a stream error that otherwise would not affect the rest of the H3 connection.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/issues/4123#issuecomment-696930301

---

From: Lars Eggert <[email-masked]>
Date: Wed, 23 Sep 2020 00:58:34 -0700

Anything remain to be done here?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/issues/4123#issuecomment-697200700

---

From: Marten Seemann <[email-masked]>
Date: Wed, 23 Sep 2020 01:05:45 -0700

It seems like @LPardue is interpreting this sentence as only applying to application protocol errors. If that's the intention, we should make that clear:
> Errors that result in the connection being unusable, such as an obvious violation of application protocol semantics or corruption of application protocol state that affects an entire connection, MUST be signaled using a CONNECTION_CLOSE frame (Section 19.19). An endpoint MAY close the connection in this manner even if the error only affects a single stream.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/issues/4123#issuecomment-697204292

---

From: Mike Bishop <[email-masked]>
Date: Wed, 23 Sep 2020 08:23:54 -0700

It's not exclusive to the application.  Another example of corrupt state at the transport layer is CRYPTO_BUFFER_EXCEEDED -- you had to drop some bytes, so now your TLS handshake state is corrupted.

As to the second piece, I think you're reading that backward.  A stream error MAY always be promoted to a connection error if the implementation decides it's severe enough; it doesn't say anything about deciding to downplay errors if they're localized.  If an error is defined to be a connection error, it's a connection error.  If it's defined to be a stream error, however, you're always allowed to decide it's the last straw and walk away.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/issues/4123#issuecomment-697535940

---

From: Martin Thomson <[email-masked]>
Date: Thu, 24 Sep 2020 15:56:17 -0700

Closed #4123 via #4167.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/issues/4123#event-3805370159

---

From: ianswett <[email-masked]>
Date: Thu, 24 Sep 2020 15:58:55 -0700

QUIC transport does not have stream-level errors, though applications can.  As such, the last sentence references a circumstance that does not exist in the transport draft.  So the best solution seems to be to remove the last sentence.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/issues/4123#issuecomment-698630112

---

From: Jana Iyengar <[email-masked]>
Date: Thu, 24 Sep 2020 15:59:02 -0700

@marten-seemann : to your two points:
- "corruption of state that affects an entire connection" is clear that if the connection state is affected then it should result in a connection error
- agree that the second sentence seems unnecessary entirely, since stream-level errors are always treated as connection errors within the transport.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/issues/4123#issuecomment-698630141