-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Open
Labels
Milestone
Description
Description
I am investigating the current state of .NET on RISC-V and started by trying to build CoreCLR on a board. So I created a simple Hello World .NET app and tried to run it with corerun. I am currently getting the following error:
GC heap initialization failed with error 0x8007000E
BEGIN: coreclr_initialize failed - Error: 0x8007000e
Exe path: /home/ubuntu/git/runtime/artifacts/bin/coreclr/linux.riscv64.Debug/corerun
Properties:
TRUSTED_PLATFORM_ASSEMBLIES = /home/ubuntu/git/runtime/artifacts/bin/coreclr/linux.risc
v64.Debug//System.Private.CoreLib.dll:
APP_PATHS = /home/ubuntu/hello-world/
NATIVE_DLL_SEARCH_DIRECTORIES = /home/ubuntu/hello-world/:
HOST_RUNTIME_CONTRACT = 0x3fcdc1f718
Managed assembly: /home/ubuntu/hello-world/HelloWorld.dll
Arguments (0):
END: coreclr_initialize failed - Error: 0x8007000e
As the error code indicates an OOM error, I ran strace on this and got the following output:
36823 sysinfo({uptime=1576, loads=[66528, 43648, 29120], totalram=7523438592, freeram=6651424768, sharedram=1163264, bufferram=39895040, totalswap=0, freeswap=0, procs=131, totalhigh=0, freehigh=0, mem_unit=1}) = 0
36823 mmap(NULL, 274877911040, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = -1 ENOMEM (Cannot allocate memory)
Apparently, it's trying to allocate 274 GB of memory if I understood this correctly?
Reproduction Steps
./src/coreclr/build-runtime.sh- On an amd64 machine, built the CoreCLR managed parts from inside the
System.Private.CoreLibdirectory with../../../.dotnet/dotnet build -r linux-riscv64 -c Debug --no-self-contained /p:PlatformTarget=AnyCpu System.Private.CoreLib.csproj - Created a Hello World app on another machine (with .NET 8 latest preview):
2.1.dotnet new console -o HelloWorld
2.2.dotnet build
2.3. Copied theHelloWorld.dllfile over to the board - Went into the artifacts folder and ran
./corerun HelloWorld.dll - Error happened
Expected behavior
Should output Hello, World!
Actual behavior
Outputs the error included in the description.
Regression?
No response
Known Workarounds
No response
Configuration
corerunbuilt from themainbranch CoreCLR- StarFive VisionFive v1 board
lscpuoutput
Architecture: riscv64
Byte Order: Little Endian
CPU(s): 2
On-line CPU(s) list: 0,1
NUMA:
NUMA node(s): 1
NUMA node0 CPU(s): 0,1
/etc/os-releaseinfo
PRETTY_NAME="Ubuntu 23.04"
NAME="Ubuntu"
VERSION_ID="23.04"
VERSION="23.04 (Lunar Lobster)"
VERSION_CODENAME=lunar
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=lunar
LOGO=ubuntu-logo
ulimit -voutput
unlimited
- Specs:
OS: Ubuntu 23.04 riscv64
Host: StarFive VisionFive V1
Kernel: 5.19.0-1014-starfive
Uptime: 1 hour, 49 mins
Packages: 801 (dpkg), 5 (snap)
Shell: bash 5.2.15
Terminal: tmux
CPU: (2)
Memory: 173MiB / 7174MiB
Other information
No response
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
No status