Skip to content

Stream Lifecycle Bugs causes Process Exit/Panic #128

Open
@tegefaulkes

Description

@tegefaulkes

Specification

There are some errors leaking out of the internals of quic. These are

  • TypeError: Invalid state: TypeError: Invalid state: WritableStream is closed is closed - Results from trying to use the stream once it has closed. I'll need to sanity check if this is a webstream error or coming directly from quic. Likely from quic.
  • ErrorQUICStreamInternal: Failed to prime local stream state with a 0-length message - This is one of our errors. We create a quic stream by writing a 0 length message to it. Something is causing this to fail in an unexpected way.
  • ErrorNodeConnectionTransportGenericError: Transport received a generic error

We'll need to dig deeper into these errors, find the cause of them and fix it.

Additional context

Tasks

  1. 1. Find the source of the TypeError and fix it.
  2. 2. Find the source of the ErrorQUICStreamInternal and fix it.
    • Make the error clearer so it throws ErrorQUICStreamLimit due to limit being reached.
    • Prevent the error from leaking and crashing the process - solved with the idle timeout error crash fixes.
    • Increase the stream limit in Polykey to reduce how often this is thrown.
    • Treat ErrorQUICStreamLimit as a connection error to trigger clean up of the connection when it happens.
  3. 3. Find the source of the ErrorNodeConnectionTransportGenericError and fix it.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions