Skip to content

QuicConnection not being released after exception #87291

Closed

Description

@amcasey

Description

The context is best explained by the thread of comments in the original PR but, to summarize, the aspnetcore test QuicConnectionListenerTests.AcceptAsync_NoCertificateCallback_RemovedFromPendingConnections started failing when we picked up #87057, which revealed a pre-existing bug - a QuicConnection that apparently keeps itself alive, preventing Kestrel's ConditionalWeakTable (referred to as CWT in the test) from being cleared, even though an exception prevented the connection.

@BrennanConroy goes into more detail here.

Reproduction Steps

QuicConnectionListenerTests.AcceptAsync_NoCertificateCallback_RemovedFromPendingConnections shows the failure, though there's probably a simpler repro.

Expected behavior

The QuicConnection is finalized and removed from aspnetcore's ConditionalWeakTable.

Actual behavior

The QuicConnection is still rooted by a GC handle.

Regression?

It predates the insertion, but we don't know by how much.

Known Workarounds

No response

Configuration

The PR has commit SHAs for both repos, but it's basically main as of 2023-06-08.

Other information

There's a tracking bug here for any compensating work required in aspnetcore.

Activity

  1. ghost added
    untriaged
    on Jun 8, 2023
  2. amcasey commented on Jun 8, 2023

    @amcasey
    MemberAuthor
  3. added this to the 8.0.0 milestone on Jun 9, 2023
  4. ghost removed
    untriaged
    on Jun 9, 2023
  5. added
    untriaged
    on Jun 9, 2023
  6. self-assigned this
    on Jun 9, 2023
  7. removed
    untriaged
    on Jun 9, 2023
  8. ghost added
    in-pr
    on Jun 9, 2023
  9. ghost removed
    in-pr
    on Jun 14, 2023
  10. ghost locked as resolved and limited conversation to collaborators on Jul 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions