# Self-Healing CI: Recovering Exhausted /dev/shm Shared Memory

> A crash from a full /dev/shm is a shared-memory ceiling, not a code bug. See the manual fix and how self-healing CI retries with adequate shared memory.

Source: https://latchkey.dev/learn/self-healing-ci/self-healing-tmpfs-shared-memory-exhausted  
Updated: 2026-06-26

A browser or process that crashes because /dev/shm is full hit a small shared-memory ceiling, not a bug -- more shared memory or a fallback flag fixes it.

## What makes a failure safely retryable

Automatic retry is only correct for failures that are genuinely transient. Retrying a deterministic failure wastes minutes and hides a real defect, so the classification matters more than the retry mechanism.

- Safe to retry: network timeouts, registry 5xx, transient DNS failures, a service container that was not ready, a spot instance reclaimed mid-run.
- Not safe to retry: assertion failures, compile errors, lint violations, anything that fails identically on every attempt.
- Ambiguous, and worth investigating rather than retrying: out-of-memory kills, disk exhaustion, and flaky tests. These repeat under load and a retry only hides the trend.
- Always record that a retry happened. A pipeline that silently retries is a pipeline whose real failure rate you do not know.

## FAQ

### What causes Self-Healing CI: recovering exhausted /dev/shm shared memory?

A step crashes because the shared-memory filesystem (/dev/shm) ran out of space -- common with headless browsers and some databases that default to using it. The code is fine; the runner’s /dev/shm was too small for the workload. A human raises the shared-memory size or sets a fallback flag and the step passes unchanged.

### How do I fix Self-Healing CI: recovering exhausted /dev/shm shared memory manually?

[object Object]

### Can Self-Healing CI: recovering exhausted /dev/shm shared memory be fixed automatically?

A /dev/shm exhaustion has a distinct shared-memory signature separate from a general OOM, and the right response is to provide adequate shared memory and retry. A self-healing CI pipeline detects the shared-memory exhaustion condition, retries the step with the resources it needs, and only escalates if the failure recurs with adequate

---

Latchkey runs CI/CD that repairs its own failures. Agent entry points: https://latchkey.dev/agent.txt, https://latchkey.dev/openapi.json, https://latchkey.dev/llms.txt
