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

AssemblyLoadContext failed to unload assembly #76809

Closed
JasonGLYao opened this issue Oct 10, 2022 · 3 comments
Closed

AssemblyLoadContext failed to unload assembly #76809

JasonGLYao opened this issue Oct 10, 2022 · 3 comments

Comments

@JasonGLYao
Copy link

JasonGLYao commented Oct 10, 2022

Description

we want to utilize the feature of uload in AssemblyLoadContext ,we tried the sample and it works fine(the plugin assembly can be unloaded),but if we use System.Text.Json to serialize an object in plugin, then the plugin assembly can not be unloaded any more.

Reproduction Steps

  • using the source code attachment which downloaded and changed from the sample code site

  • Compile and run the host.exe

  • using dotnet-counters to monitor the program ,pay attention to the Number of Assemblies Loaded in the dotnet-counters terminal.

Expected behavior

Number of Assemblies Loaded in dotnet-counters does not increase

Actual behavior

Number of Assemblies Loaded in dotnet-counters increase until the Host.exe being terminated.

Regression?

Netcore3.1,Net6 Both with this issue

Known Workarounds

No response

Configuration

No response

Other information

No response
Unloading.zip

@dotnet-issue-labeler
Copy link

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

@ghost ghost added the untriaged New issue has not been triaged by the area owner label Oct 10, 2022
@ghost
Copy link

ghost commented Oct 10, 2022

Tagging subscribers to this area: @dotnet/area-system-text-json, @gregsdennis
See info in area-owners.md if you want to be subscribed.

Issue Details

Description

we want to utilize the feature of uload in AssemblyLoadContext ,we tried the sample and it works fine(the plugin assembly can be unloaded),but if we use System.Text.Json to serialize an object in plugin, then the plugin assembly can not be unloaded any more.

Reproduction Steps

  • using the source code attachment which downloaded and changed from the sample code site

  • Compile and run the host.exe

  • using dotnet-counters to monitor the program ,pay attention to the Number of Assemblies Loaded in the dotnet-counters terminal.

Expected behavior

Number of Assemblies Loaded in dotnet-counters does not increase

Actual behavior

Number of Assemblies Loaded in dotnet-counters increase until the Host.exe being terminated.

Regression?

Netcore3.1,Net6 Both with this issue

Known Workarounds

No response

Configuration

No response

Other information

No response
Unloading.zip

Author: JasonGLYao
Assignees: -
Labels:

area-System.Text.Json, untriaged

Milestone: -

@teo-tsirpanis
Copy link
Contributor

Duplicate of #65323.

@teo-tsirpanis teo-tsirpanis closed this as not planned Won't fix, can't repro, duplicate, stale Oct 10, 2022
@ghost ghost removed the untriaged New issue has not been triaged by the area owner label Oct 10, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Nov 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants