Uh oh!
There was an error while loading. Please reload this page.
Don't wait for finalizers in 'IReferenceTrackerHost::ReleaseDisconnectedReferenceSources' - #110551
Conversation
Tagging subscribers to this area: @dotnet/interop-contrib |
Sergio0694
commented
Dec 9, 2024
@jkotas I'm targeting |
jkotas
commented
Dec 9, 2024
Yes, the right workflow for this repo is to merge the change into main first. |
jkoritzinsky
left a comment
There was a problem hiding this comment.
Just a comment wording nit, otherwise LGTM
Uh oh!
There was an error while loading. Please reload this page.
jkotas
commented
Dec 10, 2024
/backport to release/9.0-staging |
Started backporting to release/9.0-staging: https://github.com/dotnet/runtime/actions/runs/12247939420 |
…tedReferenceSources' (dotnet#110551) This PR updates the IReferenceTrackerHost::ReleaseDisconnectedReferenceSources implementation for CoreCLR and NativeAOT to match what .NET Native was doing, and not wait for finalizers, to avoid deadlocks in ASTA scenarios (UWP). Finalizers will just continue running normally, and if the process is suspended (which can only happen on UWP anyway), they'll resume when the process is resumed later on. Worst case scenario this would only cause a non-optimal memory use cleanup before suspension (which is better than a deadlock anyway). Can be revisited and improved for .NET 10 if needed. Contributes to dotnet#109538
…tedReferenceSources' (dotnet#110551) This PR updates the IReferenceTrackerHost::ReleaseDisconnectedReferenceSources implementation for CoreCLR and NativeAOT to match what .NET Native was doing, and not wait for finalizers, to avoid deadlocks in ASTA scenarios (UWP). Finalizers will just continue running normally, and if the process is suspended (which can only happen on UWP anyway), they'll resume when the process is resumed later on. Worst case scenario this would only cause a non-optimal memory use cleanup before suspension (which is better than a deadlock anyway). Can be revisited and improved for .NET 10 if needed. Contributes to dotnet#109538
Contributes to #109538
This PR updates the
IReferenceTrackerHost::ReleaseDisconnectedReferenceSourcesimplementation for CoreCLR and NativeAOT to match what .NET Native was doing, and not wait for finalizers, to avoid deadlocks in ASTA scenarios (UWP). Finalizers will just continue running normally, and if the process is suspended (which can only happen on UWP anyway), they'll resume when the process is resumed later on. Worst case scenario this would only cause a non-optimal memory use cleanup before suspension (which is better than a deadlock anyway). Can be revisited and improved for .NET 10 if needed.