-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
[mono] Crash in github runner due to null AssemblyLoadContext.GetLoadContext result #60348
Comments
Tagging subscribers to this area: Issue DetailsDescriptionAttempting to run the GitHub action runner on linux-s390x (using the Mono runtime) crashes on startup. Reproduction StepsBuilding the code base from here: Expected behaviorProgram starts up without crashing. Actual behavior
This happens at https://github.com/actions/runner/blob/main/src/Runner.Common/HostContext.cs#L81
because the Regression?Likely yes - this looks like another instance of the problem introduced by #53308. A similar case was already fixed here: #55921. Known WorkaroundsAdd the following line before the
Configuration.NET RC1 rebuilt for linux-s390x (Mono runtime based). Other informationCC @CoffeeFlux, @vargaz, @lambdageek
|
@uweigand What if we add var _ = AssemblyLoadContext.Default; before runtime/src/mono/System.Private.CoreLib/src/System/Runtime/Loader/AssemblyLoadContext.Mono.cs Line 83 in 0cb73e8
|
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
That looks like it should work, I'll rebuild my runtime and try it. |
Yes, this fixes the problem for me, thanks! |
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 #60348
Reopening until the backport is merged |
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 Co-authored-by: Aleksey Kliger <[email protected]>
This is now fixed everywhere. |
Description
Attempting to run the GitHub action runner on linux-s390x (using the Mono runtime) crashes on startup.
Reproduction Steps
Building the code base from here:
https://github.com/actions/runner
and starting theRunner.Worker
binary.Expected behavior
Program starts up without crashing.
Actual behavior
This happens at https://github.com/actions/runner/blob/main/src/Runner.Common/HostContext.cs#L81
because the
GetLoadContext
call returnsnull
.Regression?
Likely yes - this looks like another instance of the problem introduced by #53308. A similar case was already fixed here: #55921.
Known Workarounds
Add the following line before the
GetLoadContext
call to ensure the default ALC was initialized:Configuration
.NET RC1 rebuilt for linux-s390x (Mono runtime based).
Other information
CC @vargaz, @lambdageek
The text was updated successfully, but these errors were encountered: