dotnet / runtimelab

This repo is for experimentation and exploring new ideas that may or may not make it into the main dotnet/runtime repo.
MIT License
1.41k stars 197 forks source link

Linux build exited with code 137 #1928

Closed jamsoft closed 2 years ago

jamsoft commented 2 years ago

I'm running into an error on Linux that I can't find much info on. The error is:

error MSB3073: The command ""/home/<>/.nuget/packages/runtime.linux-x64.microsoft.dotnet.ilcompiler/7.0.0-preview.5.22301.12/tools/ilc" @"obj/Release/net6.0/linux-x64/native/MyApp.ilc.rsp"" exited with code 137

The only mention of this I can find is on the old CoreRT repo where the compilation was running out of memory running in a container. My build is running on a real box running PopOS with 16GB RAM.

Would it be worth trying it in a VM with 32 GB RAM allocated?

It gets really close to the end of the process but then bombs.

jkotas commented 2 years ago

Yes, exit code 137 on Linux is usually out of memory.

jamsoft commented 2 years ago

This is super confusing and I've no idea what do to.

I run this command on my real linux box:

dotnet publish MyApp.csproj -c:Release --runtime linux-x64 -v:m --self-contained true

And it runs the normal compilation then does the AOT and bombs with 137.

I've cloned the same repo onto a VM running the same version of PopOS with 32Gb RAM. Run the same command and it just stops after the normal compilation process. It just doesn't even try to do the AOT compilation. Doesn't error either.

I've gone through all the pre-reqs on both boxes, clang is installed. I have to sudo the commands on the VM but that's the only difference.

What would/could cause that? I'm stumped.