SIGTERM (Signal 15): Meaning, Exit Code 143 & Fix
SIGTERM is Unix signal 15. A process terminated by it reports exit code 143 (128 + 15).
SIGTERM asks a process to terminate, allowing cleanup (the polite default of kill). When it kills a process, the shell reports exit code 143 - the 128 + signal-number convention.
What it means
A graceful shutdown - cancellation, a step timeout, spot-instance preemption, or orchestrated shutdown.
When it happens in CI
- A step
timeout-minuteselapsed. - A spot/preemptible instance was reclaimed.
- A graceful
killor orchestrator scale-down.
How to handle it
If from preemption or a transient timeout, a retry usually succeeds - Latchkey retries these automatically. If from a real timeout, speed up the job.
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.