Skip to content

SIGABRT wrong exit code #5994

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

Open
alexnu opened this issue May 29, 2025 · 0 comments
Open

SIGABRT wrong exit code #5994

alexnu opened this issue May 29, 2025 · 0 comments

Comments

@alexnu
Copy link

alexnu commented May 29, 2025

When the process is killed by the heap limiter, the exit code is incorrectly shown as 0.

Steps to reproduce

Create a test.js file:

const numbers = [];
for (let i = 0; i < 100000000; i++) {
  numbers.push(i);
  if (i % 10000 === 0) console.log(i);
}

Execute the following command to trigger the heap limiter:

pm2 start test.js --no-autorestart --no-daemon --node-args="--max-old-space-size=10"

Expected behaviour

The process should exit with SIGABRT signal and a non-zero code (usually 134).

Actual behaviour

The process exits with SIGABRT signal and 0 code. This makes it impossible to determine whether the process exited normally or with an error:

Image
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant