Skip to content

Conversation

@lambdageek
Copy link
Member

If we try to get the ALC of an assembly from the default context before the
managed default ALC object has been created, the native gchandle has a null
target.
Ensure it is not null by explicitly referencing the Default ALC.

Fixes #60348

If we try to get the ALC of an assembly from the default context before the
managed default ALC object has been created, the native gchandle has a null
target.
Ensure it is not null by explicitly referencing the Default ALC.

Fixes dotnet#60348
@ghost
Copy link

ghost commented Oct 13, 2021

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

@lambdageek lambdageek added the area-VM-reflection-mono Reflection issues specific to MonoVM label Oct 13, 2021
@ghost
Copy link

ghost commented Oct 13, 2021

Tagging subscribers to this area:
See info in area-owners.md if you want to be subscribed.

Issue Details

If we try to get the ALC of an assembly from the default context before the
managed default ALC object has been created, the native gchandle has a null
target.
Ensure it is not null by explicitly referencing the Default ALC.

Fixes #60348

Author: lambdageek
Assignees: -
Labels:

area-System.Reflection-mono

Milestone: -

@marek-safar
Copy link
Contributor

@lambdageek worth the backport?

@uweigand
Copy link
Contributor

@lambdageek worth the backport?

If possible, I'd like to see this fix backported, since it fixes a serious problem - without that patch, the github runner crashes on startup, and the runner is definitely one of the apps we want to run on s390x. Also, that pattern of installing an Unloading handler (which is triggering the crash) seems one that is probably used elsewhere too.

@lambdageek
Copy link
Member Author

/backport to release/6.0

@github-actions
Copy link
Contributor

Started backporting to release/6.0: https://github.com/dotnet/runtime/actions/runs/1341836876

@lambdageek lambdageek merged commit 3e98517 into dotnet:main Oct 14, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Nov 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-VM-reflection-mono Reflection issues specific to MonoVM

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[mono] Crash in github runner due to null AssemblyLoadContext.GetLoadContext result

6 participants