Skip to content

Fix .NET captured execution timeout cleanup - #1613

Merged
Gudge (MGudgin) merged 1 commit into
mainfrom
user/gudge/dotnet-capture-timeout
Oct 29, 2026
Merged

Gudge (MGudgin) merged 1 commit into
mainfrom
user/gudge/dotnet-capture-timeout

Conversation

@MGudgin

@MGudgin Gudge (MGudgin) commented Oct 29, 2026 •

Copy link
Copy Markdown
Member

This PR fixes captured execution that can wait indefinitely after a workload timeout when a descendant keeps an output pipe open.

Details

  • Close output readers on timeout and return the collected partial output.
  • Report reader-close failures without waiting on the blocked readers.
  • Add a typed IsolationSession regression and document the capture behavior.

Tests

  • C# syntax and git diff checks passed.
  • The regression is in the existing scheduled IsolationSession test class.
  • dotnet build --no-restore --nologo -v:q was blocked by NETSDK1004. The host-dependent runtime regression was not run locally.
Microsoft Reviewers: Open in CodeFlow

This PR fixes captured execution that can wait indefinitely after a
workload timeout when a descendant keeps an output pipe open.

Details

* Close output readers on timeout and return the collected partial output.
* Report reader-close failures without waiting on the blocked readers.
* Add a typed IsolationSession regression and document the capture behavior.

Tests

* C# syntax and git diff checks passed.
* The regression is in the existing scheduled IsolationSession test class.
* dotnet build --no-restore --nologo -v:q was blocked by NETSDK1004.
  The host-dependent runtime regression was not run locally.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 38bb56f2-debb-4e64-a7a1-574321a83b89
Generated-with: gpt-6.1-sol
Copilot AI balanced review requested due to automatic review settings October 29, 2026 00:58
@MGudgin
Gudge (MGudgin) requested a review from a team as a code owner October 29, 2026 00:58
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The Windows IsolationSession regression has not run on a supported live host, leaving native pipe-read interruption, bounded completion, and retention of partial output unverified.

No open issues 🎉

What changed in this PR

Fixes .NET captured execution hanging after a timeout when a descendant keeps an output pipe open.

Changes:

  • Closes output readers on timeout and returns collected partial output.
  • Reports reader-close failures without waiting for blocked readers.
  • Adds an IsolationSession regression and documents timeout capture behavior.

Validation remains incomplete: the reported build was blocked by NETSDK1004, and the host-dependent regression was not run locally.

File Description
sdk/​dotnet/​Microsoft.Mxc.Sdk/​V1/​MxcProcess.cs Adds timeout reader cleanup and close-failure handling.
sdk/​dotnet/​Microsoft.Mxc.Sdk.Tests/​V1/​MxcLifecycleE2ETests.cs Adds regression coverage for descendant-held output pipes.
docs/​api-reference/​dotnet/​v1/​api.md Documents partial-output capture on timeout.

Review effort: Balanced

@MGudgin
Gudge (MGudgin) merged commit 5cbefd2 into main Oct 29, 2026
30 checks passed
@MGudgin
Gudge (MGudgin) deleted the user/gudge/dotnet-capture-timeout branch October 29, 2026 16:25
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.

3 participants