-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
.Net 7 preview 7 is broken on linux arm64 via QEMU #27190
Comments
Does it work with only 7 installed? |
With just 7 installed dotnet new xunit gave: Unhandled exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
---> System.NullReferenceException: Object reference not set to an instance of an object.
at InvokeStub_Assembly.get_Location(Object, Object, IntPtr*)
at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
--- End of inner exception stack trace ---
at Microsoft.Build.Shared.BuildEnvironmentHelper.get_Instance()
at Microsoft.Build.CommandLine.MSBuildApp.ConstructArrayArg(String[] args)
at Microsoft.Build.CommandLine.MSBuildApp.Main(String[] args)
at Microsoft.DotNet.Cli.Utils.MSBuildForwardingAppWithoutLogging.ExecuteInProc(String[] arguments)
Restore failed.
Post action failed.
Manual instructions: Run 'dotnet restore' And dotnet test gave: /root/.dotnet/sdk/7.0.100-preview.7.22377.5/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(124,7): error MSB4018: The "ProcessFrameworkReferences" task failed unexpectedly. [/home/runner/work/BetterCallSodium/BetterCallSodium/BetterCallSodium/BetterCallSodium.csproj]
/root/.dotnet/sdk/7.0.100-preview.7.22377.5/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(124,7): error MSB4018: System.NullReferenceException: Object reference not set to an instance of an object. [/home/runner/work/BetterCallSodium/BetterCallSodium/BetterCallSodium/BetterCallSodium.csproj]
/root/.dotnet/sdk/7.0.100-preview.7.22377.5/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(124,7): error MSB4018: at InvokeStub_ProcessFrameworkReferences.get_UnavailableRuntimePacks(Object, Object, IntPtr*) [/home/runner/work/BetterCallSodium/BetterCallSodium/BetterCallSodium/BetterCallSodium.csproj]
/root/.dotnet/sdk/7.0.100-preview.7.22377.5/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(124,7): error MSB4018: at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr) [/home/runner/work/BetterCallSodium/BetterCallSodium/BetterCallSodium/BetterCallSodium.csproj]
/root/.dotnet/sdk/7.0.100-preview.7.22377.5/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(124,7): error MSB4028: The "ProcessFrameworkReferences" task's outputs could not be retrieved from the "UnavailableRuntimePacks" parameter. Object reference not set to an instance of an object. [/home/runner/work/BetterCallSodium/BetterCallSodium/BetterCallSodium/BetterCallSodium.csproj]
/root/.dotnet/sdk/7.0.100-preview.7.22377.5/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(124,7): error MSB4018: The "ProcessFrameworkReferences" task failed unexpectedly. [/home/runner/work/BetterCallSodium/BetterCallSodium/BetterCallSodium/BetterCallSodium.csproj]
/root/.dotnet/sdk/7.0.100-preview.7.22377.5/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(124,7): error MSB4018: System.NullReferenceException: Object reference not set to an instance of an object. [/home/runner/work/BetterCallSodium/BetterCallSodium/BetterCallSodium/BetterCallSodium.csproj]
/root/.dotnet/sdk/7.0.100-preview.7.22377.5/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(124,7): error MSB4018: at InvokeStub_ProcessFrameworkReferences.get_UnavailableRuntimePacks(Object, Object, IntPtr*) [/home/runner/work/BetterCallSodium/BetterCallSodium/BetterCallSodium/BetterCallSodium.csproj]
/root/.dotnet/sdk/7.0.100-preview.7.22377.5/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(124,7): error MSB4018: at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr) [/home/runner/work/BetterCallSodium/BetterCallSodium/BetterCallSodium/BetterCallSodium.csproj]
/root/.dotnet/sdk/7.0.100-preview.7.22377.5/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(124,7): error MSB4028: The "ProcessFrameworkReferences" task's outputs could not be retrieved from the "UnavailableRuntimePacks" parameter. Object reference not set to an instance of an object. [/home/runner/work/BetterCallSodium/BetterCallSodium/BetterCallSodium/BetterCallSodium.csproj] |
Disabling W^X via Starting test execution, please wait...
A total of 1 test files matched the specified pattern.
/home/runner/work/BetterCallSodium/BetterCallSodium/BetterCallSodium.Tests/bin/Debug/net7.0/BetterCallSodium.Tests.dll For reference, the environment is a Docker QEMU container running on GitHub actions. |
@MichalPetryka can you please share steps to create a docker qemu container so that I can debug the problem? |
That's right, it doesn't work with W^X both enabled and disabled, with it enabled it throws random errors that look like GC holes and with it disabled there's no message. And yeah, the issue is not alpine specific (which I've originally thought). For the container I use the run-on-arch action, you can find my full script here (I've removes all oses other than debian there to avoid actions getting cancelled due to other jobs failing). |
This is basically a dup of dotnet/runtime#13648, also discussed in dotnet/runtime#72227. I can repro it thanks to your instructions, but debugging in qemu emulated container is tricky. I am still trying. |
Worth noting is that .Net 6 works fine with arm64 and s390x. (arm32 fails for both 6 and 7 but with different issues) |
@MichalPetryka thank you for the info, it is important to know it is a regression. |
Not sure if this is related but I tried building a .NET 7 container image with QEMU for my ARM64 server with github actions (sadly there still are no native runners) and I ran into the following issue (.NET 6 works perfectly)
EDIT: can confirm this seems to be another issue related to QEMU and .NET 7. |
Above Jan reports this as a duplicate of another issue that's fixed. Since this is a few months old, closing out. Please reactivate or file a new issue if this is still happening on 7.0.100 |
Seems to still be broken:
and with
and nothing after that. @marcpopMSFT @janvorli |
@marcpopMSFT the issue link was wrongly pointing to sdk repo instead of the runtime one. The one in the runtime repo is still open. I am reactivating this issue and updating my comment so that the issue links are correct. |
Closing this in favor of NuGet/Home#12227, dotnet/runtime#13648, and https://gitlab.com/qemu-project/qemu/-/issues/249. |
Describe the bug
Changing
to
made my test script error out on alpine arm64. Looks like something broke in the SDK for that platform in .Net 7, since it works fine with just .Net 6.
To Reproduce
This error seems to happen on
dotnet test
.Exceptions (if any)
1st run
2nd run:
Further technical details
The text was updated successfully, but these errors were encountered: