Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception thrown in GC callback while walking native object wrappers on AOT #104582

Closed
manodasanW opened this issue Jul 9, 2024 · 1 comment · Fixed by #104583
Closed

Exception thrown in GC callback while walking native object wrappers on AOT #104582

manodasanW opened this issue Jul 9, 2024 · 1 comment · Fixed by #104583
Assignees
Labels
area-NativeAOT-coreclr in-pr There is an active PR which will close this issue when it is merged
Milestone

Comments

@manodasanW
Copy link
Contributor

Description

Running WinUI Gallery published for AOT using latest WinAppSDK and CsWinRT preview will result in a hang randomly after navigating numerous pages.

Reproduction Steps

  • Build and run AOT compatible version of WinUI gallery with the below versions updated in standalone.props.
  • Navigate through the different pages and eventually it will hang

WindowsAppSDK: 1.6.240701003-experimental2
CsWinRT: 2.1.0-prerelease.240602.1
WindowsSdkPackageVersion: 10.0.22621.35-preview

Expected behavior

App doesn't hang

Actual behavior

It looks like the app just hangs but debugging it, this is really an exception being thrown on the GC thread. This exception is being thrown because the collection being iterated on got into a bad state and has entries that have been freed but are still in the list. This is the result of a missing lock during removal which happens when running the finalizer as that can race with adding to the list.

Regression?

No response

Known Workarounds

No response

Configuration

.NET 8 x64 AOT

Other information

No response

@dotnet-issue-labeler dotnet-issue-labeler bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Jul 9, 2024
@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged by the area owner label Jul 9, 2024
@manodasanW manodasanW self-assigned this Jul 9, 2024
Copy link
Contributor

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

@MichalStrehovsky MichalStrehovsky removed untriaged New issue has not been triaged by the area owner needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners labels Jul 10, 2024
@MichalStrehovsky MichalStrehovsky added this to the 9.0.0 milestone Jul 10, 2024
@agocke agocke modified the milestones: 9.0.0, 10.0.0 Aug 14, 2024
@dotnet-policy-service dotnet-policy-service bot added the in-pr There is an active PR which will close this issue when it is merged label Sep 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-NativeAOT-coreclr in-pr There is an active PR which will close this issue when it is merged
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants