podman-container-tools/podman · warning
pause.pid file refers to PID %ld which is not a pause proces
Error message
pause.pid file refers to PID %ld which is not a pause process, the process may have exited and the PID been recycled. Removing %s
What it means
Rootless podman keeps a 'pause' process holding the user and mount namespaces alive between invocations; its PID is cached in $XDG_RUNTIME_DIR/libpod/tmp/pause.pid. check_stale_pause_pid() validates the cached PID by reading /proc/<pid>/environ for _PODMAN_PAUSE=1 (is_pause_process); on mismatch it prints this warning and unlinks the stale file (pkg/rootless/rootless_linux.c:684-691). This is self-healing recovery, not a fatal error - podman then falls back to creating a fresh pause process / re-exec path.
Source
Thrown at pkg/rootless/rootless_linux.c:689
/* environ entries are separated by '\0'. Search for "_PODMAN_PAUSE=1". */
for (char *p = buf; p < buf + n; )
{
if (strcmp (p, "_PODMAN_PAUSE=1") == 0)
return 1;
p += strlen (p) + 1;
}
return 0;
}
/* If the process referred to by pause.pid is not actually a pause process,
it means the PID was recycled. Warn the user and remove the stale file. */
static void
check_stale_pause_pid (long pid, const char *path)
{
if (!is_pause_process (pid))
{
fprintf (stderr, "pause.pid file refers to PID %ld which is not a pause process, the process may have exited and the PID been recycled. Removing %s\n", pid, path);
unlink (path);
}
}
static int
open_namespace (int pid_to_join, const char *ns_file)
{
char ns_path[PATH_MAX];
int ret;
ret = snprintf (ns_path, PATH_MAX, "/proc/%d/ns/%s", pid_to_join, ns_file);
if (ret == PATH_MAX)
{
fprintf (stderr, "internal error: namespace path too long\n");
return -1;
}
return open (ns_path, O_CLOEXEC | O_RDONLY);View on GitHub (pinned to a2409076ef)
Solutions
- Treat it as benign - the stale file is removed automatically and the next podman command recreates the pause process
- If it recurs, find why the pause process dies: 'journalctl --user' and 'dmesg | grep -i oom'
- Reset rootless state cleanly: 'podman system reset' or remove $XDG_RUNTIME_DIR/libpod/tmp manually after logging out
- Ensure XDG_RUNTIME_DIR points at a tmpfs (/run/user/$UID) that systemd recreates per login
Defensive patterns
Strategy: fallback
Validate before calling
# Optionally detect the stale state before podman warns about it
p="$XDG_RUNTIME_DIR/libpod/tmp/pause.pid"
if [ -r "$p" ]; then
pid=$(cat "$p")
if [ -r "/proc/$pid/environ" ] && ! tr '\0' '\n' < "/proc/$pid/environ" | grep -qx '_PODMAN_PAUSE=1'; then
rm -f "$p" # proactively remove the stale file podman would remove anyway
fi
fi
podman "$@"
Prevention
- Rely on podman's built-in recovery - it unlinks the stale pause.pid and recreates the pause process
- Do not kill the pause/catatonit process unless you also remove $XDG_RUNTIME_DIR/libpod/tmp
- Log out fully or run 'podman system reset' when tearing down a rootless environment
- Keep XDG_RUNTIME_DIR on the systemd-managed tmpfs so stale state cannot survive reboots
When it happens
Trigger: The pause process died (OOM-killed, manually killed via pkill, killed by 'podman system migrate/reset') and the kernel recycled its PID for an unrelated process; /run/user/$UID contents survived while the pause process did not (crash, forced logout); PID collision after reboot when XDG_RUNTIME_DIR is on persistent storage.
Common situations: Right after an OOM kill of 'catatonit'/'podman pause'; after the user or a cleanup script killed the pause process; in environments where /run/user is not cleaned at logout; on fast-PID-cycling busy hosts.
Related errors
- unable to print to string
- error creating temporary file: %m
- cannot write to file descriptor: %m
- cannot write to pipe: %m
- cannot save namespace handles: %m
AI-assisted analysis of podman-container-tools/podman@a2409076ef (2026-08-15).
Data as JSON: /api/errors/22aae93d63e4680d.
Report an issue: GitHub.