You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Failed to create CoreCLR, HRESULT: 0x8007000E on linux-musl-x86 #83509
I'm getting an execution failure when trying to run the resulting SDK. Running dotnet --info with the following SDK in linux-musl-x86 chroot yields a freeze, and then eventually a Failed to create CoreCLR, HRESULT: 0x8007000E. It seems like CoreCLR tries to allocate all of the available memory for some reason. @am11 I see that you got the build-rootfs.sh script working for linux-musl-x86, have you managed a successful crossbuild to linux-musl-x86?
I tried stracing it, but could only attach the process after execution. strace.txt
Thanks @ayakael. I created a HyperV VM on Windows x64 and installed alpine 32 bit to rule out the emulation factor:
dotnet --info with your SDK build is failing in this VM as well.
@janvorli, this seems like a memory mapping issue on 32-bit Alpine, where DOTNET_EnableWriteXorExecute=0 and/or DOTNET_GCHeapHardLimit=... do not help.
Thanks @ayakael. I created a HyperV VM on Windows x64 and installed alpine 32 bit to rule out the emulation factor:
dotnet --info with your SDK build is failing in this VM as well.
@janvorli, this seems like a memory mapping issue on 32-bit Alpine, where DOTNET_EnableWriteXorExecute=0 and/or DOTNET_GCHeapHardLimit=... do not help.
Awesome, thank you for creating the issue. Note that this is the product of a crossbuild from Alpine x86_64 to Alpine x86 via a rootfs dir. I use this method to build the s390x and ppc64le bootstraps, so it is a tested methdology. But as usually crossbuilding to x86 is done via -m32 (which for some reason didn't work when attempted), maybe some bits are being built in 64-bit mode?
Turns out setting -m32 works, but makes no difference. Maybe relevant, without setting add_linker_flag(-Wl,-z,notext), I get the following error:
ld.lld: error: relocation R_386_PC32 cannot be used against symbol 'CONTEXT_CaptureContext'; recompile with -fPIC
>>> defined in ../../../pal/src/libcoreclrpal.a(context2.S.o)
>>> referenced by context2.S:92 (/var/build/dotnet-stage0/src/dotnet-v8.0.100-preview.2/src/runtime/src/coreclr/pal/src/arch/i386/context2.S:92)
>>> context2.S.o:(RtlCaptureContext) in archive ../../../pal/src/libcoreclrpal.a
clang-15: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [tools/superpmi/superpmi-shim-simple/CMakeFiles/superpmi-shim-simple.dir/build.make:425: tools/superpmi/superpmi-shim-simple/libsuperpmi-shim-simple.so] Error 1
make[1]: *** [CMakeFiles/Makefile2:4511: tools/superpmi/superpmi-shim-simple/CMakeFiles/superpmi-shim-simple.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
Nice, can we remove conditions around -m32 from #83464 since it doesn't break the build?
Another difference is linkage of libucontext library on linux-musl-x86 for libunwind, which we don't need on linux-musl-x64. But that too seem unrelated to memory map issue.
I think the issue is that PAL doesn't handle some case and we run into infinite recursion (the strace posted above is way too many > 10 MB of mremap / munmap lines which suggests lack of error handling somewhere in PAL). It could be that we can make PAL resilient against this system state as a general improvement. Similar issues are reported previously: #79612, #13027 etc. but their resolution is mostly about lifting virtual memory limit. In this case, we have that unlimited so it could be a bug in 32-bit specific branch code somewhere. I haven't investigated with debug build.
Nice, can we remove conditions around -m32 from #83464 since it doesn't break the build?
Another difference is linkage of libucontext library on linux-musl-x86 for libunwind, which we don't need on linux-musl-x64. But that too seem unrelated to memory map issue.
I think the issue is that PAL doesn't handle some case and we run into infinite recursion (the strace posted above is way too many > 10 MB of mremap / munmap lines which suggests lack of error handling somewhere in PAL). It could be that we can make PAL resilient against this system state as a general improvement. Similar issues are reported previously: #79612, #13027 etc. but their resolution is mostly about lifting virtual memory limit. In this case, we have that unlimited so it could be a bug in 32-bit specific branch code somewhere. I haven't investigated with debug build.
Yeah, we could. The following patch after toolchain changes works:
.NET requires SSE/SSE2 and cmov (on x86/x64 based CPUs), which have been around for well over 20 years now and are guaranteed available on any 64-bit capable CPU (regardless of whether the OS is running as 32-bit or 64-bit).
.NET requires SSE/SSE2 and cmov (on x86/x64 based CPUs), which have been around for well over 20 years now and are guaranteed available on any 64-bit capable CPU (regardless of whether the OS is running as 32-bit or 64-bit).
Right, so why would running an x86 SDK in a x86 Alpine chroot on x86_64 hardware cause this error, when indeed the CPU has it?
@agocke, when someone has time, they can look into it and solve the issue. This is how we are handling community platform issues for several years. Why do you we want to paper over and close a clearly stated issue when there is no evidence that it is fixed?
The issue can always be reopened if we have concrete evidence of the problem and someone actively working on it. As it is, there's not really any direction this can go and its just going to sit around for another X years, churning the bot that exists explicitly to close stale issues that no one is looking at.
Leaving the unresolved issue (with no clean 'we are dropping x86 support and here is the PR deleting everything-x86') opened is a pretty normal thing.
Yes, but at a certain point its clear nothing is going to be done (i.e. 3 years in with zero updates).
we are dropping x86 support and here is the PR deleting everything-x86
windows-x86 is officially supported, so all x86 code won't go away. linux-x86 is not officially supported and is dependent on community maintainers keeping it updated. If there aren't people working on the it, then it risks bitrot. There's then issues like this where there is no concrete evidence of the problem and it may even be completely external to the repo, so it seems inactionable and is just being noisy by remaining open.
I do not think this particular issue is inactionable. Someone needs to build runtime for linux-must-x86, test if coreclr initialization still fail and most likely fix the stack limit, double memory map thing or related feature flags so coreclr doesn’t crash. If, e.g., you don’t have time to work on it, leave this for someone who does. There is no defined contract that we have to respond in X amount of time.
Reacted by Clinton Ingram and Mr Beedell, Roke Julian Lockhart
Activity
am11 commentedon Mar 16, 2023
@ayakael, I have only tried building runtime, didn't test the binaries.
I don't have permission to download it. :)
BTW, were you testing under VM / baremetal install or QEMU? CoreCLR-PAL has some issues with QEMU (even on 64-bit archs).
am11 commentedon Mar 16, 2023
From @ayakael #77667 (comment)
Woops, here is a functional link: dotnet-sdk-8.0.100-preview.2.23157.25-r1-linux-musl-x86.tar.xz
I tested first within a chroot of alpine-x86 that was in LXC, and then within a chroot in a qemu based env. Both behave the same.
am11 commentedon Mar 16, 2023
Thanks @ayakael. I created a HyperV VM on Windows x64 and installed alpine 32 bit to rule out the emulation factor:
dotnet --infowith your SDK build is failing in this VM as well.@janvorli, this seems like a memory mapping issue on 32-bit Alpine, where
DOTNET_EnableWriteXorExecute=0and/orDOTNET_GCHeapHardLimit=...do not help.strace -f dotnet --info-> http://sprunge.us/S9saN5ayakael commentedon Mar 16, 2023
Awesome, thank you for creating the issue. Note that this is the product of a crossbuild from Alpine x86_64 to Alpine x86 via a rootfs dir. I use this method to build the s390x and ppc64le bootstraps, so it is a tested methdology. But as usually crossbuilding to x86 is done via -m32 (which for some reason didn't work when attempted), maybe some bits are being built in 64-bit mode?
ayakael commentedon Mar 16, 2023
Turns out setting
-m32works, but makes no difference. Maybe relevant, without settingadd_linker_flag(-Wl,-z,notext), I get the following error:am11 commentedon Mar 16, 2023
Nice, can we remove conditions around -m32 from #83464 since it doesn't break the build?
Another difference is linkage of libucontext library on linux-musl-x86 for libunwind, which we don't need on linux-musl-x64. But that too seem unrelated to memory map issue.
I think the issue is that PAL doesn't handle some case and we run into infinite recursion (the strace posted above is way too many > 10 MB of
mremap/munmaplines which suggests lack of error handling somewhere in PAL). It could be that we can make PAL resilient against this system state as a general improvement. Similar issues are reported previously: #79612, #13027 etc. but their resolution is mostly about lifting virtual memory limit. In this case, we have thatunlimitedso it could be a bug in 32-bit specific branch code somewhere. I haven't investigated with debug build.ayakael commentedon Mar 16, 2023
Yeah, we could. The following patch after toolchain changes works:
edit Updated both PRs with above change
ayakael commentedon Aug 24, 2023
Circling back on this, I now get the following error on 8.0.0-preview.7:
tannergooding commentedon Aug 24, 2023
.NET requires SSE/SSE2 and cmov (on x86/x64 based CPUs), which have been around for well over 20 years now and are guaranteed available on any 64-bit capable CPU (regardless of whether the OS is running as 32-bit or 64-bit).
ayakael commentedon Aug 24, 2023
Right, so why would running an x86 SDK in a x86 Alpine chroot on x86_64 hardware cause this error, when indeed the CPU has it?
27 remaining items
am11 commentedon Apr 30, 2026
@agocke, when someone has time, they can look into it and solve the issue. This is how we are handling community platform issues for several years. Why do you we want to paper over and close a clearly stated issue when there is no evidence that it is fixed?
tannergooding commentedon Apr 30, 2026
The issue can always be reopened if we have concrete evidence of the problem and someone actively working on it. As it is, there's not really any direction this can go and its just going to sit around for another X years, churning the bot that exists explicitly to close stale issues that no one is looking at.
am11 commentedon Apr 30, 2026
The conversation gets locked after few days and limit the access for original author. They cannot reopen the issue.
Leaving the unresolved issue (with no clean 'we are dropping x86 support and here is the PR deleting everything-x86') opened is a pretty normal thing.
tannergooding commentedon Apr 30, 2026
Yes, but at a certain point its clear nothing is going to be done (i.e. 3 years in with zero updates).
windows-x86is officially supported, so all x86 code won't go away.linux-x86is not officially supported and is dependent on community maintainers keeping it updated. If there aren't people working on the it, then it risks bitrot. There's then issues like this where there is no concrete evidence of the problem and it may even be completely external to the repo, so it seems inactionable and is just being noisy by remaining open.am11 commentedon Apr 30, 2026
I do not think this particular issue is inactionable. Someone needs to build runtime for linux-must-x86, test if coreclr initialization still fail and most likely fix the stack limit, double memory map thing or related feature flags so coreclr doesn’t crash. If, e.g., you don’t have time to work on it, leave this for someone who does. There is no defined contract that we have to respond in X amount of time.
agocke commentedon Apr 30, 2026
Fine with me — I’m ok leaving it around.
Delete linux-x86 code and infra (dotnet#137008)