{"record":{"id":"e42affae2ac0419f","repo":"podman-container-tools/podman","slug":"failed-to-reexec-m","errorCode":null,"errorMessage":"failed to reexec: %m\n","messagePattern":"failed to reexec: %m\n","errorType":"console","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"pkg/rootless/rootless_linux.c","lineNumber":1261,"sourceCode":"            {\n              if (create_pause_process (state_dir, argv) < 0)\n                _exit (EXIT_FAILURE);\n            }\n          else\n            {\n              fprintf (stderr, \"cannot save namespace handles: %m\\n\");\n              _exit (EXIT_FAILURE);\n            }\n        }\n    }\n  if (sigprocmask (SIG_SETMASK, &oldsigset, NULL) < 0)\n    {\n      fprintf (stderr, \"cannot block signals: %m\\n\");\n      _exit (EXIT_FAILURE);\n    }\n\n  execvp (\"/proc/self/exe\", argv);\n  fprintf (stderr, \"failed to reexec: %m\\n\");\n\n  _exit (EXIT_FAILURE);\n}\n\nstatic void\ncheck_proc_sys_userns_file (const char *path)\n{\n  FILE *fp;\n  fp = fopen (path, \"r\");\n  if (fp)\n    {\n      char buf[32];\n      size_t n_read = fread (buf, 1, sizeof(buf) - 1, fp);\n      if (n_read > 0)\n        {\n          buf[n_read] = '\\0';\n          if (strtol (buf, NULL, 10) == 0)\n            fprintf (stderr, \"user namespaces are not enabled in %s\\n\", path);","sourceCodeStart":1243,"sourceCodeEnd":1279,"githubUrl":"https://github.com/podman-container-tools/podman/blob/a2409076ef2fef60ad9ac046375dedc7d9410ef4/pkg/rootless/rootless_linux.c#L1243-L1279","documentation":"Final step of reexec_userns_join: execvp(\"/proc/self/exe\", argv) re-executes the podman binary inside the new user namespace; if execvp returns at all it failed, the message with %m is printed and the child _exit(EXIT_FAILURE)s. Typical errno: ENOENT when the binary was deleted or replaced (dangling /proc/self/exe), EACCES when the file or its mount is not executable (noexec), ENOEXEC for a corrupt binary, ETXTBSY while the file is being written.","triggerScenarios":"The podman package was upgraded while a long-running rootless process (podman system service / API listener) was mid-reexec; /proc not mounted so /proc/self/exe cannot resolve; /usr/bin/podman perms changed or resides on a noexec mount; concurrent overwrite of the binary.","commonSituations":"Unattended upgrades (dnf/apt) replacing podman under a running user service; podman installed on a noexec /opt or /home mount; container images replacing the binary at runtime.","solutions":["Restart the long-running rootless podman process after any upgrade: systemctl --user restart podman.service podman.socket","Verify the binary and its mount: ls -l /proc/<pid>/exe /usr/bin/podman; mount | grep -w noexec on the binary's filesystem","If /proc/self/exe is dangling (deleted binary), reinstall podman or restart from the new binary","Move podman off noexec mounts or remount with exec"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"# guard long-running rootless services against binary replacement\nls -l /proc/$(pgrep -u $(id -u) podman | head -1)/exe 2>/dev/null  # dangling '(deleted)' = upgrade happened\nmount | grep -w noexec | grep -w /usr   # binary mount must be exec","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Restart rootless podman services (systemctl --user restart podman.socket podman.service) after every podman package upgrade","Never place /usr/bin/podman on a noexec mount","Pin podman versions on long-lived appliances, or schedule post-upgrade service restarts"],"tags":["podman","rootless","exec","package-upgrade","noexec"],"backgroundTag":null,"analyzedSha":"a2409076ef2fef60ad9ac046375dedc7d9410ef4","analyzedAt":"2026-08-15T15:57:05.625Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}