The only runtime trigger for registry cleanup is the BPF kprobe that fires on user namespace destruction; when it is missed (ring buffer overflow, kprobe missing, fdstore entry dropped), the dead namespace's registry entry survives and keeps its UID/GID ranges blocked until the manager restarts and its startup sweep runs. The allocation hot path checked whether a candidate range was already taken but never whether the namespace holding it was still alive, so a single dead namespace could permanently starve an allocation. This is most visible when a parent delegates its entire container UID window to a child that then dies: every subsequent allocation from the parent fails with NoDynamicRange even though the ranges are reclaimable. Add userns_registry_reap_if_dead(), which probes a registered namespace's liveness via the kernel namespace identifier recorded at allocation time and, if it is authoritatively dead, releases its registry entry — restoring any ranges it received via delegation to their ancestors. Call it from the allocation availability check for both transient registrations and delegated ranges, walking a chain of dead ancestors in the delegation case. This mirrors the existing inode-slot stale cleanup and makes allocation self-healing without waiting for a restart. The startup sweep grew the same load-probe-release logic, so route it through the new helper too; its errno return distinguishes alive, no-recorded-id, and unprobeable-environment cases so the sweep keeps its early-out when lookup by id isn't possible at all. Co-developed-by: Claude Opus 4.8 <noreply@anthropic.com>
System and Service Manager
Details
Most documentation is available on systemd's web site.
Assorted, older, general information about systemd can be found in the systemd Wiki.
Information about build requirements is provided in the README file.
Consult our NEWS file for information about what's new in the most recent systemd versions.
Please see the Code Map for information about this repository's layout and content.
Please see the Hacking guide for information on how to hack on systemd and test your modifications.
Please see our Contribution Guidelines for more information about filing GitHub Issues and posting GitHub Pull Requests.
When preparing patches for systemd, please follow our Coding Style Guidelines.
If you are looking for support, please contact our mailing list, join our IRC channel #systemd on libera.chat or Matrix channel
Stable branches with backported patches are available in the stable repo.
We have a security bug bounty program sponsored by the Sovereign Tech Fund hosted on YesWeHack
Repositories with distribution packages built from git main are available on OBS, and also repositories with packages built from the latest stable release
