[Bug]: Freetube on KDE uses too many inotify instances
Guidelines
- [x] I have encountered this bug in the latest release of FreeTube.
- [x] I have encountered this bug in the official downloads of FreeTube.
- [x] I have searched the issue tracker for open and closed issues that are similar to the bug report I want to file, without success.
- [x] I have searched the documentation for information that matches the description of the bug I want to file, without success.
- [x] This issue contains only one bug.
Describe the bug
When using Freetube on Fedora KDE, this notification appears in the system tray after watching some videos:
Inotify Instance Capacity Low
You have too many applications wanting to monitor file changes! When the capacity
is exhausted it will prevent further file monitoring from working correctly.
Either close some applications or increase the limit. Currently using 94% of
instances and 0% of watches.
In Debian with KDE, the bug also occurs.
The number of inotify instances used by the program can be seen with the kde-inotify-survey command.
In Linux distributions that do not have this command, it can be seen with lsof -p <process ID> | grep inotify, where <process ID> is the first ID that appears when you run ps aux | grep freetube.
When this bug occurs, Freetube starts with 4 inotify instances, and it increases by 1 each time you play a new video. When the bug does not occur (in desktop environments other than KDE), it starts with 1 and does not increase.
In Fedora KDE, when it reaches about 50 instances, it shows the previous notification.
I have tested it in different Linux distributions with different desktop environments and these are the results:
The bug DOES occur:
- Fedora 41 with KDE 6 (with Wayland): in both rpm and flatpak packages.
- Debian 12 with KDE 5 (with X11 and with Wayland): in both deb and flatpak packages (Although the bug occurs and Freetube uses many inotify instances, Debian does not show the notification).
The bug does NOT occur:
- Fedora 41 with Xfce: in both rpm and flatpak packages.
- Debian 12 with Xfce: in both deb and flatpak packages.
So the conclusion is that it happens in KDE, and is not related to the Linux distribution, the use of Wayland or X11, and the type of download.
Expected Behavior
It should use only 1 inotify instance, and not increase it every time you play a new video, as happens when using Xfce.
Issue Labels
inconsistent behavior
FreeTube Version
v0.23.1
Operating System Version
Fedora 41 KDE (using Wayland), Debian 12 with KDE (using X11 and Wayland)
Installation Method
Flathub
Primary API used
Local API
Last Known Working FreeTube Version (If Any)
No response
Additional Information
No response
Nightly Build
- [ ] I have encountered this bug in the latest nightly build.
What files is Linux claiming that FreeTube is watching, as none of FreeTube's JavaScript code should be causing that.
user@fedora:~$ lsof -p 5185 | grep inotify
lsof: WARNING: can't stat() tracefs file system /sys/kernel/debug/tracing
Output information may be incomplete.
freetube 5185 user 56r a_inode 0,16 0 2099 inotify
freetube 5185 user 57r a_inode 0,16 0 2099 inotify
freetube 5185 user 69r a_inode 0,16 0 2099 inotify
freetube 5185 user 78r a_inode 0,16 0 2099 inotify
freetube 5185 user 112r a_inode 0,16 0 2099 inotify
freetube 5185 user 114r a_inode 0,16 0 2099 inotify
freetube 5185 user 116r a_inode 0,16 0 2099 inotify
freetube 5185 user 118r a_inode 0,16 0 2099 inotify
freetube 5185 user 128r a_inode 0,16 0 2099 inotify
freetube 5185 user 133r a_inode 0,16 0 2099 inotify
user@fedora:~$ cat /proc/5185/fdinfo/118
pos: 0
flags: 04000
mnt_id: 17
ino: 2099
user@fedora:~$ cat /proc/5185/fdinfo/128
pos: 0
flags: 04000
mnt_id: 17
ino: 2099
user@fedora:~$ cat /proc/5185/fdinfo/133
pos: 0
flags: 04000
mnt_id: 17
ino: 2099
user@fedora:~$ sudo find / -inum 2099 2>/dev/null
/sys/devices/system/memory/memory141/power/autosuspend_delay_ms
/etc/environment
It seems to be the /etc/environment folder.
This issue is stale because it has been open 28 days with no activity. Remove stale label or comment or this will be closed in 7 days.
This issue is stale because it has been open 28 days with no activity. Remove stale label or comment or this will be closed in 7 days.
This issue is stale because it has been open 28 days with no activity. Remove stale label or comment or this will be closed in 7 days.
I see the same issue on fedora 41 kde spin with freetube v0.23.5 Beta
This issue is stale because it has been open 28 days with no activity. Remove stale label or comment or this will be closed in 7 days.
This issue is stale because it has been open 28 days with no activity. Remove stale label or comment or this will be closed in 7 days.
This issue is stale because it has been open 28 days with no activity. Remove stale label or comment or this will be closed in 7 days.
This issue is stale because it has been open 28 days with no activity. Remove stale label or comment or this will be closed in 7 days.
This issue is stale because it has been open 28 days with no activity. Remove stale label or comment or this will be closed in 7 days.
This issue is stale because it has been open 28 days with no activity. Remove stale label or comment or this will be closed in 7 days.