Skip to content

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Sep 26, 2025

Backport of #120029 to release/10.0

The apphost ResourceUpdater doesn't dispose of the PEReader when leaveOpen is true, but the leaveOpen should only apply to the FileStream passed to the constructor. The PEReader is not accessible from the creator and cannot be disposed of elsewhere. This led to some race conditions in the SDK which caused the bundler to later fail to open the apphost.

Context: dotnet/sdk#50784

Customer Impact

  • Customer reported
  • Found internally

Found in SDK tests.

Regression

  • Yes
  • No

[If yes, specify when the regression was introduced. Provide the PR or commit if known.]

Testing

There is a unit test to verify the disposal behavior. The race condition appeared in a few sdk tests after updates to host writer.

Risk

Low. This fixes a simple Dispose bug in a codepath that wasn't exercised until recently.

IMPORTANT: If this backport is for a servicing release, please verify that:

  • The PR target branch is release/X.0-staging, not release/X.0.

@jtschuster jtschuster requested review from agocke and sbomer September 26, 2025 04:29
@jtschuster jtschuster added this to the 10.0.0 milestone Sep 26, 2025
@jtschuster jtschuster added the area-HostModel Microsoft.NET.HostModel issues label Sep 26, 2025
@jtschuster jtschuster self-assigned this Sep 26, 2025
Copy link
Contributor

Tagging subscribers to this area: @vitek-karas, @agocke
See info in area-owners.md if you want to be subscribed.

@agocke agocke added the Servicing-consider Issue for next servicing release review label Sep 26, 2025
Copy link
Member

@JulieLeeMSFT JulieLeeMSFT left a comment

Choose a reason for hiding this comment

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

LGTM.

@agocke agocke added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Sep 26, 2025
@agocke agocke merged commit e04af3c into release/10.0 Sep 26, 2025
87 of 93 checks passed
@agocke agocke deleted the backport/pr-120029-to-release/10.0 branch September 26, 2025 20:48
@jtschuster
Copy link
Member

/backport to release/10.0-rc2

Copy link
Contributor Author

Started backporting to release/10.0-rc2: https://github.com/dotnet/runtime/actions/runs/18139609347

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-HostModel Microsoft.NET.HostModel issues Servicing-approved Approved for servicing release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants