Skip to content

fix/bidirectional stream shutdown - #3919

Merged
pulimsr merged 7 commits into
mainfrom
test/bidirectional-stream-shutdown
Sep 10, 2026
Merged

pulimsr merged 7 commits into
mainfrom
test/bidirectional-stream-shutdown

Conversation

@pulimsr

@pulimsr pulimsr commented Sep 3, 2026

Copy link
Copy Markdown
Collaborator

Issue #3911 & #3917

Aws::ShutdownAPI() hung indefinitely after InvokeModelWithBidirectionalStreamAsync() because a reference cycle (stream → signing callback → ctx → httpRequest → body → stream) kept an HTTP/2 connection alive, blocking CleanupCrt in ~ClientBootstrap.

  • Fix (eddb695, @sbiscigl): release m_stream / m_connection in HttpWriteDataStreamBuf::WaitForStreamComplete(); drop the eventEncoderStream self-capture in codegen.
  • Regression test: Nova Sonic bidi session in the bedrock-runtime integration suite, with a 60s shutdown watchdog in RunTests.cpp that turns a future hang into SIGABRT on any platform.
  • Transcribe Streaming Low Speed Limit Registers a low speed limit on the CRT http client so connections will drop when data is not being transferred.

Check all that applies:

  • Did a review by yourself.
  • Added proper tests to cover this PR. (If tests are not applicable, explain.)
  • Checked if this PR is a breaking (APIs have been changed) change.
  • Checked if this PR will not introduce cross-platform inconsistent behavior.
  • Checked if this PR would require a ReadMe/Wiki update.

Check which platforms you have built SDK on to verify the correctness of this PR.

  • Linux
  • Windows
  • Android
  • MacOS
  • IOS
  • Other Platforms

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@pulimsr pulimsr changed the title Test/bidirectional stream shutdown fix/bidirectional stream shutdown Sep 3, 2026
@sbiscigl
sbiscigl force-pushed the test/bidirectional-stream-shutdown branch 2 times, most recently from 64832a5 to 7efd2bd Compare September 8, 2026 14:34
@sbiscigl
sbiscigl force-pushed the test/bidirectional-stream-shutdown branch from e1248c3 to 45ceaaa Compare September 9, 2026 20:19
@sbiscigl
sbiscigl force-pushed the test/bidirectional-stream-shutdown branch from 45ceaaa to 572cae2 Compare September 9, 2026 20:24
@pulimsr
pulimsr enabled auto-merge September 10, 2026 14:39
@pulimsr
pulimsr added this pull request to the merge queue Sep 10, 2026
Merged via the queue into main with commit 2460270 Sep 10, 2026
3 of 7 checks passed
@sbaluja sbaluja mentioned this pull request Sep 17, 2026
11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants