A Pod restarts with `exit code 139` and no stack trace.
AdvancedTroubleshootingPod startup failures
Answer
Likely causes → 139 = 128 + 11 = SIGSEGV. A native crash: buggy C extension, incompatible native library (musl vs glibc), JIT bug, or stack overflow in native code. Not a Kubernetes problem but Kubernetes makes it look like CrashLoopBackOff.
Diagnose →
kubectl get pod app-x -o jsonpath='{.status.containerStatuses[0].lastState.terminated.exitCode}'
kubectl debug -it app-x --image=ubuntu:24.04 --target=app # shares PID namespace
# On the node: dmesg | grep -i segfault
Fix → Reproduce with the same image locally; enable core dumps or language crash handlers (PYTHONFAULTHANDLER=1, -XX:+ShowCodeDetailsInExceptionMessages, Go GOTRACEBACK=crash). Usually fixed by aligning native libraries with the base image.
Prevent → Pin base images and native dependency versions; run integration tests on the exact production image.
More on Pod startup failures
A Pod shows `CrashLoopBackOff` with `RESTARTS 7` and events say `Back-off restarting failed container app`. Where do you start?Beginner`kubectl logs web-0 --previous` returns nothing useful and the container dies in under a second. How do you get inside it?IntermediatePod status is `ImagePullBackOff` and events show `Failed to pull image "registry.example.com/web:1.4.2": rpc error: code = NotFound desc = failed to pull and unpack image ... not found`.BeginnerEvents show `pull access denied for registry.example.com/web, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed`.BeginnerPulls from Docker Hub randomly fail with `toomanyrequests: You have reached your pull rate limit`.IntermediateA private registry with an internal CA fails with `x509: certificate signed by unknown authority` during image pull.Intermediate