{"record":{"id":"ed752946a3bf59af","repo":"jdx/mise","slug":"engine-bin-exited-abnormally-status","errorCode":null,"errorMessage":"{engine_bin} exited abnormally: {status:?}","messagePattern":"(.+?) exited abnormally: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/cli/oci/run.rs","lineNumber":216,"sourceCode":"                Ok(out) if out.status.success() => {}\n                Ok(out) => {\n                    // Don't fail the overall command — just note it; a\n                    // failing rmi usually means the image is still in use\n                    // (e.g. another concurrent run) or was already deleted.\n                    let stderr = String::from_utf8_lossy(&out.stderr);\n                    debug!(\"{engine_bin} rmi {image_ref} failed: {stderr}\");\n                }\n                Err(e) => debug!(\"failed to spawn {engine_bin} rmi: {e}\"),\n            }\n        }\n\n        let status = run_result?;\n        if let Some(code) = status.code() {\n            if code != 0 {\n                return Err(crate::request_exit(code));\n            }\n        } else if !status.success() {\n            bail!(\"{engine_bin} exited abnormally: {status:?}\");\n        }\n        Ok(())\n    }\n}\n\nfn select_engine(requested: Engine) -> Result<Engine> {\n    match requested {\n        Engine::Podman => {\n            if file::which(\"podman\").is_some() {\n                Ok(Engine::Podman)\n            } else {\n                bail!(\"--engine podman requested but `podman` was not found on PATH\")\n            }\n        }\n        Engine::Docker => {\n            if file::which(\"docker\").is_none() {\n                bail!(\"--engine docker requested but `docker` was not found on PATH\");\n            }","sourceCodeStart":198,"sourceCodeEnd":234,"githubUrl":"https://github.com/jdx/mise/blob/9dcfcaa0dc8747a2577d3270b69bb9d8313b2807/src/cli/oci/run.rs#L198-L234","documentation":"After the container finishes, mise inspects the exit status of the `podman run`/`docker run` it spawned. A normal non-zero exit code is propagated as mise's own exit code (request_exit). This bail fires only when the status has NO code and is not successful — on Unix that means the engine client itself was terminated by a signal (OOM-kill, SIGKILL, SIGSEGV), and the message Debug-formats the ExitStatus.","triggerScenarios":"The kernel OOM-killer sends SIGKILL to the podman/docker client during a heavy container run; someone runs `kill -9` on the mise or engine process; the engine binary crashes (segfault) mid-run. The container's own non-zero exit does NOT produce this error.","commonSituations":"CI runners with tight memory limits where large tool layers + container exhaust RAM; flaky sandboxed environments killing long processes; disk-full conditions crashing container storage code.","solutions":["Check for an OOM kill: `dmesg | grep -i 'killed process'` or `journalctl -k`","Free memory/disk (`podman system prune`, `docker system prune`) and rerun","If reproducible, run the container directly (`podman run ...`) to isolate whether the engine itself crashes"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":"// Rust: narrow an ExitStatus to 'killed by signal' (no exit code, not success)\nfn terminated_by_signal(status: &std::process::ExitStatus) -> bool {\n    status.code().is_none() && !status.success()\n}","tryCatchPattern":"# bash wrapper: distinguish signal death from task failure\nif ! mise oci run img -- ./task; then\n  code=$?\n  if [ \"$code\" -ge 128 ]; then\n    echo \"engine/mise killed by signal $((code-128)); checking OOM...\" >&2\n    dmesg -T | grep -i 'killed process' || true\n  fi\n  exit \"$code\"\nfi","preventionTips":["Give CI runners headroom above the container's memory request so the engine client is never OOM-killed","Exit codes >= 128 in wrappers mean signals — treat them as infrastructure failures, not test failures"],"tags":["oci","run","container","signal","process-exit"],"backgroundTag":"process-killed-by-signal","analyzedSha":"9dcfcaa0dc8747a2577d3270b69bb9d8313b2807","analyzedAt":"2026-08-17T14:28:50.624Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}