SIGFPE (Signal 8): Meaning, Exit Code 136 & Fix
SIGFPE is Unix signal 8. A process terminated by it reports exit code 136 (128 + 8).
SIGFPE is raised on a fatal arithmetic error, most often integer division by zero. When it kills a process, the shell reports exit code 136 - the 128 + signal-number convention.
What it means
A deterministic arithmetic bug - integer divide-by-zero or overflow with traps enabled.
When it happens in CI
- Integer division by zero.
- Integer overflow with
-ftrapv.
How to handle it
This reproduces every time - it is a code bug. Guard the divisor/operation and add a regression test.
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.