Skip to content

Verify the Pub/Sub client fix for unobserved initial StreamingPull write failures #896

Open

Description

@thomhurst

Summary

The Pub/Sub subscriber can leave an unobserved task when the initial StreamingPull write fails. This surfaced in a .NET 11 emulator test report, where two HTTP/2 connection exceptions were reported despite all 55 tests passing. A native-only reproduction against Google.Cloud.PubSub.V1 3.40.0 also reproduced the defect on .NET 10.

Reproduction and evidence

googleapis/google-cloud-dotnet#16120 contains the standalone reproduction. It awaits SubscriberClient.StartAsync, observes the injected IOException, and detects the same error on a distinct unobserved task before any disposal call.

In Relayer, the matching cases are GooglePubSubTests.Fatal_native_initial_write_recreates_application_without_replacing_subscription. They already observe native subscriber completion and handle the matching disposal exception by identity. The original .NET 11 report for #884 at e52d68b5344b2fcfa89e647710d9989503f219d2 is archived at Relayer-evidence/pr-884/e52d68b5344b2fcfa89e647710d9989503f219d2/pubsub-490/. Its unobservedTaskExceptions entries show an incomplete HTTP/2 handshake and an aborted request with a broken pipe. #490 tracks the separate keep-alive cancellation failure.

Release gate and acceptance criteria

Activity

  1. added
    P2
    in-progress
    on Nov 19, 2026
  2. thomhurst commented on Nov 19, 2026

    @thomhurst
    OwnerAuthor

    The matching cases are in GooglePubSubTests.Fatal_native_initial_write_recreates_application_without_replacing_subscription. They inject the handshake and broken-pipe errors, and the fixture observes the native completion and handles the matching disposal exception by identity. The focused .NET 11 emulator run on main passed all 24 tests while still reporting a matching unobserved disposal stack.

    A standalone Pub/Sub 3.40.0 probe reproduced the same category of failure with no Relayer or emulator code. It awaited the public StartAsync task, caught the injected IOException, and made no disposal call. The event came from a distinct task ID. The probe recorded 26 matching events in 40 starts on .NET 11 and 22 on .NET 10. The stack in the original report includes disposal because the same exception also propagates through that awaited path.

    The reproduction is filed at googleapis/google-cloud-dotnet#16120. Remove on-hold when a published Pub/Sub client observes the additional faulted task, then verify the deliberate failure cases and the emulator report with that version. #490 tracks the separate keep-alive monitor failure.

  3. added
    on-hold
    and removed
    in-progress
    on Nov 19, 2026
  4. changed the title [-]Pub/Sub emulator tests leave HTTP/2 connection failures unobserved on .NET 11[/-] [+]Verify the Pub/Sub client fix for unobserved initial StreamingPull write failures[/+] on Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2on-hold

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions