Open vitek-karas opened 3 years ago
Tagging subscribers to this area: @vitek-karas, @agocke, @coffeeflux See info in area-owners.md if you want to be subscribed.
Author: | vitek-karas |
---|---|
Assignees: | - |
Labels: | `area-AssemblyLoader-coreclr` |
Milestone: | - |
/cc @CoffeeFlux - for mono side of things
are there any updates on this issue, in one of my projects we are relying on assembly unload to reload fresh assemblies dynamically built by roslyn on runtime. and sometimes it randomly stops refreshing, so in order to find the cause i did some digging and came here btw i'm using dotnet 8.
The unloading support in .NET Core is reliant on GC and very "asynchronous". The app typically only asks for unload by calling
ALC.Unload
but then has to wait across multiple GC runs until the unload actually happens. There's also not a simple way to get notified that unload actually happened. (One can poll using a weak ref though).To make this process easier to diagnose it would be helpful to have tracing events which can be used to detect the start and end of an unload operation. Maybe we can add some more detail if there are intermediate steps in the process which would make sense as well.
See https://github.com/dotnet/runtime/issues/44679 for an example of a discussion on this topic.