| Summary: | plasmashell leaks inotify file descriptor | ||
|---|---|---|---|
| Product: | [Plasma] plasmashell | Reporter: | Andreas Schwab <schwab> |
| Component: | general | Assignee: | Plasma Bugs List <plasma-bugs-null> |
| Status: | RESOLVED UPSTREAM | ||
| Severity: | normal | CC: | johannes+kdebugs, josh, kde, nate, sitter |
| Priority: | NOR | ||
| Version First Reported In: | 5.27.4 | ||
| Target Milestone: | 1.0 | ||
| Platform: | openSUSE | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
Andreas Schwab
2023-05-17 12:02:38 UTC
This also happens when konsole is started from krunner. I can confirm this bug on both Debian 12 and Arch Linux, where it looks like the following: $ ls -l /proc/$$/fd/ total 0 lrwx------ 1 colo colo 64 1. Nov 13:37 0 -> /dev/pts/3 lrwx------ 1 colo colo 64 1. Nov 13:37 1 -> /dev/pts/3 lrwx------ 1 colo colo 64 1. Nov 13:37 2 -> /dev/pts/3 lr-x------ 1 colo colo 64 1. Nov 13:37 24 -> anon_inode:inotify lrwx------ 1 colo colo 64 1. Nov 13:37 255 -> /dev/pts/3 $ pstree -s -p $$ systemd(1)───systemd(616)───plasmashell(754)───konsole(60566)───bash(60581)───pstree(61213) $ ls -l /proc/60566/fd/24 lr-x------ 1 colo colo 64 1. Nov 14:02 /proc/60566/fd/24 -> anon_inode:inotify $ ls -l /proc/754/fd/24 lr-x------ 1 colo colo 64 1. Nov 14:02 /proc/754/fd/24 -> anon_inode:inotify $ sudo ls -l /proc/616/fd/24 lrwx------ 1 colo colo 64 1. Nov 14:03 /proc/616/fd/24 -> 'socket:[18811]' I stumbled over this because the fd broke another project's test suite I was running in my Konsole-spawned shell. I cannot reproduce on my Plasma 6 setup. I think it's here: https://github.com/libimobiledevice/libusbmuxd/blob/master/src/libusbmuxd.c I can't see a fcntl(inot_fd, F_SETFD, FD_CLOEXEC); Will try to build locally to confirm regardless it should really use inotify_init1 which allows setting FD_CLOEXEC without race FWIW https://github.com/libimobiledevice/libusbmuxd/pull/133 If you are able to confirm this fixes the leak that would be appreciated With that patch the leak is gone. Thanks for confirming |