Ubuntu-latest, dotnet command exiting with status 143

I am getting some issues with an action that runs dotnet build in our project; sometimes the dotnet command returns exit status 143, and all I see in the output of the command is normal build messages, nothing from stderr at all.

I have verified the dotnet command reaches close to 2GB RAM during a build, and the behavior really looks like the process is killed by OOM Killer or the virtual instance’s hypervisor. But with just a 2GB RAM footprint should be way behind the threshold.

Anybody else having processes killed by the system on actions run? I believe dotnet may be receiving SIGTERM (15) and it returns exit status 128+signal, and I see some docker topics related to this, but I am not running the action under a Docker Container (not explicitly at least).

I have added dmesg output when it fails, and get no OOM message. This may be related with a bug in the dotnet CLI where it was (in previous .NET versions) being stuck when a build succeeded. Maybe now somehow dotnet sends itself a SIGTERM and passes it as 128+15 exit status for uniqueness?

Anyway, I have implemented a code to retry (at most 3 times) the command whenever it fails and it is, consistently, failing the first time I build a project, then works once I retry. Once for every build.

So still, problem not solved.

Turned out I had a timeout set to spawn() call from a Node JS script which fired the dotnet command. As the timeout was reached, Node JS sent the CLI a SIGTERM (15) signal, then it returned with that 128+15=143 exit status.

I had no clue as there was no error on stderr and the Error returned was being ignored by the script. The issue just happened cause our project grew big enough to exceed the timeout. Increasing the timeout resolved the issue.