{"record":{"id":"fc8befa92aced0f7","repo":"podman-container-tools/podman","slug":"cannot-sigdelset-sigchld-m-n","errorCode":null,"errorMessage":"cannot sigdelset(SIGCHLD): %m\\n","messagePattern":"cannot sigdelset\\(SIGCHLD\\): %m\\\\n","errorType":"console","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"pkg/rootless/rootless_linux.c","lineNumber":1344,"sourceCode":"              for (f = 3; f < num_fds + 3; f++)\n                if (is_fd_inherited (f))\n                  close (f);\n            }\n          unsetenv (\"LISTEN_PID\");\n          unsetenv (\"LISTEN_FDS\");\n          unsetenv (\"LISTEN_FDNAMES\");\n        }\n      return pid;\n    }\n\n  if (sigfillset (&sigset) < 0)\n    {\n      fprintf (stderr, \"cannot fill sigset: %m\\n\");\n      _exit (EXIT_FAILURE);\n    }\n  if (sigdelset (&sigset, SIGCHLD) < 0)\n    {\n      fprintf (stderr, \"cannot sigdelset(SIGCHLD): %m\\n\");\n      _exit (EXIT_FAILURE);\n    }\n  if (sigdelset (&sigset, SIGTERM) < 0)\n    {\n      fprintf (stderr, \"cannot sigdelset(SIGTERM): %m\\n\");\n      _exit (EXIT_FAILURE);\n    }\n  if (sigprocmask (SIG_BLOCK, &sigset, &oldsigset) < 0)\n    {\n      fprintf (stderr, \"cannot block signals: %m\\n\");\n      _exit (EXIT_FAILURE);\n    }\n\n  argv = get_cmd_line_args (NULL);\n  if (argv == NULL)\n    {\n      fprintf (stderr, \"cannot read argv: %m\\n\");\n      _exit (EXIT_FAILURE);","sourceCodeStart":1326,"sourceCodeEnd":1362,"githubUrl":"https://github.com/podman-container-tools/podman/blob/a2409076ef2fef60ad9ac046375dedc7d9410ef4/pkg/rootless/rootless_linux.c#L1326-L1362","documentation":"Printed in the child branch of reexec_in_user_namespace() in pkg/rootless/rootless_linux.c:1344 after a successful sigfillset(). sigdelset(&sigset, SIGCHLD) is removing SIGCHLD from the just-filled signal set so the child can still receive child-exit notifications; the only documented failure is EINVAL for an invalid signum, and SIGCHLD is always valid on Linux. Hitting this therefore indicates a corrupted sigset_t or a broken libc, not a normal runtime condition.","triggerScenarios":"Calling reexec_in_user_namespace (rootless podman startup, podman unshare, socket-activated rootless podman) on a system where sigfillset() succeeded but the subsequent sigdelset() of the fixed constant SIGCHLD returns -1 — practically only memory corruption of the stack sigset variable or a glibc/platform bug.","commonSituations":"Never observed in normal operation; would appear only with a broken/mismatched libc, a stack-smashing bug in a custom build, or exotic musl/uClibc platforms. Almost always a 'can't happen' defensive branch that aborts the rootless re-exec child with _exit(EXIT_FAILURE).","solutions":["Rule out memory corruption: rebuild podman from clean sources and run under valgrind/ASan to see if the sigset_t was overwritten.","Verify the platform libc is sane: run a tiny C program calling sigfillset()+sigdelset(&s,SIGCHLD) to check it returns 0 on that system.","If it reproduces on a supported distro, report it as a podman/github issue with podman info, glibc version, and architecture.","As an immediate workaround for a broken environment, run podman inside a container or chroot with a known-good glibc."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"# sanity-check signal primitives in the target environment before relying on rootless podman\n# cc -o sigtest sigtest.c: sigfillset(&s); if (sigdelset(&s,SIGCHLD)!=0) abort();\ncommand -v podman >/dev/null || { echo 'podman missing'; exit 1; }\nldd --version | head -1   # known-good glibc/musl release for your distro","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Run podman from distro packages with a matched, supported libc instead of custom toolchains.","Avoid LD_PRELOAD signal wrappers in environments that launch rootless podman.","Treat any appearance of this message as memory corruption and reproduce under ASan before debugging podman itself."],"tags":["podman","rootless","userns","signals","c","libc"],"backgroundTag":null,"analyzedSha":"a2409076ef2fef60ad9ac046375dedc7d9410ef4","analyzedAt":"2026-08-15T15:57:05.625Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}