{"record":{"id":"22aae93d63e4680d","repo":"podman-container-tools/podman","slug":"pause-pid-file-refers-to-pid-ld-which-is-not-a-pa","errorCode":null,"errorMessage":"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","messagePattern":"pause\\.pid file refers to PID %ld which is not a pause process, the process may have exited and the PID been recycled\\. Removing (.+?)\n","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"pkg/rootless/rootless_linux.c","lineNumber":689,"sourceCode":"\n  /* environ entries are separated by '\\0'.  Search for \"_PODMAN_PAUSE=1\".  */\n  for (char *p = buf; p < buf + n; )\n    {\n      if (strcmp (p, \"_PODMAN_PAUSE=1\") == 0)\n        return 1;\n      p += strlen (p) + 1;\n    }\n  return 0;\n}\n\n/* If the process referred to by pause.pid is not actually a pause process,\n   it means the PID was recycled.  Warn the user and remove the stale file.  */\nstatic void\ncheck_stale_pause_pid (long pid, const char *path)\n{\n  if (!is_pause_process (pid))\n    {\n      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);\n      unlink (path);\n    }\n}\n\nstatic int\nopen_namespace (int pid_to_join, const char *ns_file)\n{\n  char ns_path[PATH_MAX];\n  int ret;\n\n  ret = snprintf (ns_path, PATH_MAX, \"/proc/%d/ns/%s\", pid_to_join, ns_file);\n  if (ret == PATH_MAX)\n    {\n      fprintf (stderr, \"internal error: namespace path too long\\n\");\n      return -1;\n    }\n\n  return open (ns_path, O_CLOEXEC | O_RDONLY);","sourceCodeStart":671,"sourceCodeEnd":707,"githubUrl":"https://github.com/podman-container-tools/podman/blob/a2409076ef2fef60ad9ac046375dedc7d9410ef4/pkg/rootless/rootless_linux.c#L671-L707","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"# Optionally detect the stale state before podman warns about it\np=\"$XDG_RUNTIME_DIR/libpod/tmp/pause.pid\"\nif [ -r \"$p\" ]; then\n  pid=$(cat \"$p\")\n  if [ -r \"/proc/$pid/environ\" ] && ! tr '\\0' '\\n' < \"/proc/$pid/environ\" | grep -qx '_PODMAN_PAUSE=1'; then\n    rm -f \"$p\"   # proactively remove the stale file podman would remove anyway\n  fi\nfi\npodman \"$@\"\n","typeGuard":null,"tryCatchPattern":null,"preventionTips":["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"],"tags":["rootless","pause-process","pid-recycle","stale-state","warning"],"backgroundTag":null,"analyzedSha":"a2409076ef2fef60ad9ac046375dedc7d9410ef4","analyzedAt":"2026-08-15T15:57:05.625Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}