Exit Code 137 in CI: OOM-Killed (SIGKILL) and How to Fix It
Exit code 137 means SIGKILL (128 + 9) terminated the process - on memory-limited runners this is overwhelmingly the OOM killer.
When a step exits 137, the kernel forcibly killed it. The most common cause in CI is the cgroup out-of-memory killer reclaiming memory under pressure.
What it means
SIGKILL cannot be caught or ignored. 137 = 128 + 9. On CI runners the killer is usually the OOM killer; it can also be docker stop past its grace period or a kill -9.
Common causes
- The job exceeded the runner or container memory limit.
- A build (webpack, tsc, gradle) or test suite spiked peak RSS.
- A Docker container hit its
--memorycap.
How to fix it
Give the job more memory or lower peak usage (reduce parallelism, cap heap sizes). This is a mechanical, transient failure class: self-healing managed runners like Latchkey detect an OOM-kill and automatically retry the job with the right resources.
Reading exit codes in CI
- A shell reports
128 + Nwhen a process is terminated by signal N: 137 is SIGKILL (usually the out-of-memory killer), 143 is SIGTERM, 130 is SIGINT. - Exit code 137 in a container almost always means the kernel killed it for memory. Nothing in the application log will explain it.
- A pipeline reports the exit status of its LAST command unless
pipefailis set, which is how a failing command piped toteeproduces a green build. - Some tools use non-zero codes for non-failure outcomes. Check the tool documentation before treating any non-zero code as an error.