Skip to content
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

[Bug]: Freetube on KDE uses too many inotify instances #6750

Open
5 of 6 tasks
ramonls8 opened this issue Feb 4, 2025 · 2 comments
Open
5 of 6 tasks

[Bug]: Freetube on KDE uses too many inotify instances #6750

ramonls8 opened this issue Feb 4, 2025 · 2 comments
Labels
B: inconsistent behavior bug Something isn't working

Comments

@ramonls8
Copy link

ramonls8 commented Feb 4, 2025

Guidelines

  • I have encountered this bug in the latest release of FreeTube.
  • I have encountered this bug in the official downloads of FreeTube.
  • I have searched the issue tracker for open and closed issues that are similar to the bug report I want to file, without success.
  • I have searched the documentation for information that matches the description of the bug I want to file, without success.
  • 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

@ramonls8 ramonls8 added the bug Something isn't working label Feb 4, 2025
@github-project-automation github-project-automation bot moved this to To assign in Bug Reports Feb 4, 2025
@absidue
Copy link
Member

absidue commented Feb 4, 2025

What files is Linux claiming that FreeTube is watching, as none of FreeTube's JavaScript code should be causing that.

@ramonls8
Copy link
Author

ramonls8 commented Feb 5, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B: inconsistent behavior bug Something isn't working
Projects
Status: To assign
Development

No branches or pull requests

3 participants