-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
systemd leaks file descriptors #355205
Comments
This commit seems to fix the issue: |
systemd v257-rc1 fixes it as well. And it is not only ssh, it seems every systemd service unit which restarts leaks FDs. |
I don't understand why this is NixOS-specific. Can you elaborate? It sounds like an upstream bug that should be backported? |
I have tested it with fedora 41 - systemd 256.7, kernel 6.11.7 - this distribution does not suffer from this bug. The package they build does not contain any patches targeting bpf as far as I can tell https://src.fedoraproject.org/rpms/systemd/tree/f41 |
We don't ship any patches targeting bpf either. Hence me aksing if you have any clue why this is only popping up for us https://github.com/NixOS/nixpkgs/blob/master/pkgs/os-specific/linux/systemd/default.nix#L218 |
Describe the bug
Since 89700ef, systemd leaks file descriptors. Those are all of similar form:
Steps To Reproduce
Just run something like this:
watch "ssh [email protected] 'ls /proc/1/fd | wc -l'"
And see the number increase by two FDs for every SSH connect.
Additional context
Because of the nature of these FDs and that AFAIK systemd uses BPF magic to do this cgroup stuff, I assume that dropping this patchset: systemd/systemd#33258 is problematic. But it does not apply cleanly anymore. Also, it seems other Linux distros running the same systemd version as NixOS are not affected.
Notify maintainers
Hi, @arianvp , @flokli and @kloenk !
The text was updated successfully, but these errors were encountered: