What Is Exit Code 137? Explained
Exit code 137 means a process was terminated by SIGKILL. It is 128 + 9, and in CI the cause is almost always the out-of-memory killer.
A step that ends in 137 did not return that number; it was killed. Understanding the encoding tells you exactly what happened and why there is usually no stack trace to read, which turns a baffling failure into a clear diagnosis.
The 128 + N encoding
By Unix convention, a process terminated by signal N reports exit code 128 + N. SIGKILL is signal 9, so 128 + 9 = 137. The same scheme gives 143 for SIGTERM (15) and 130 for SIGINT (2). Any code above 128 means a signal, not the program logic, ended the process.
Why it is usually OOM
SIGKILL cannot be caught, blocked, or ignored, so the kernel reserves it for forcing a process to die immediately. On memory-limited runners, the most common source of a forced kill is the out-of-memory killer reclaiming memory. That is why 137 usually arrives with just "Killed" and no traceback.
Confirming the cause
- Check the runner memory usage around the failure, or the kernel log for an oom-kill line.
- In containers, look for an OOMKilled status on the exited container.
- Rule out an external watchdog or a literal kill -9 if memory looks healthy.
Transient or deterministic
If the build always exceeds the runner memory, 137 is deterministic and the fix is mechanical: more memory or lower peak usage. If it only happens under load or marginally, a retry on a fresh runner often clears it, which makes it transient.
The Latchkey angle
Latchkey self-healing managed runners treat an exit-code-137 OOM kill as a mechanical failure and automatically retry, so a one-off memory blip does not fail your build, while consistently over-budget builds still surface for right-sizing.
Key takeaways
- Exit code 137 = killed by SIGKILL (128 + 9).
- In CI it is overwhelmingly the out-of-memory killer.
- There is rarely a stack trace because SIGKILL cannot be trapped.
- A marginal spike is transient and retryable; a real shortfall needs more memory.