Skip to content

[release/10.0-rc2] Fix ResourceUpdater.Dispose() - #120269

Closed
github-actions[bot] wants to merge 5 commits into
release/10.0-rc2from
backport/pr-120136-to-release/10.0-rc2
Closed

github-actions[bot] wants to merge 5 commits into
release/10.0-rc2from
backport/pr-120136-to-release/10.0-rc2

Conversation

@github-actions

@github-actions github-actions Bot commented Sep 30, 2025 •

Copy link
Copy Markdown
Contributor

Backport of #120029 to release/10.0-rc2

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 (no code previously constructed the type with leaveOpen).

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 changed the title [release/10.0-rc2] [release/10.0] Fix ResourceUpdater.Dispose() [release/10.0-rc2] Fix ResourceUpdater.Dispose() Sep 30, 2025
@jtschuster
jtschuster requested review from agocke and sbomer September 30, 2025 18:26
@jtschuster jtschuster self-assigned this Sep 30, 2025
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

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

@jtschuster jtschuster added the Servicing-consider Issue for next servicing release review label Sep 30, 2025
@agocke

agocke commented Sep 30, 2025

Copy link
Copy Markdown
Member

rc2 is closed

@agocke agocke closed this Sep 30, 2025
@agocke
agocke deleted the backport/pr-120136-to-release/10.0-rc2 branch September 30, 2025 23:30
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 31, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Servicing-consider Issue for next servicing release review

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

3 participants