Tracker-Miner service causing high CPU usage

Hi!

I recently updated from f39 to fedora 40 and noticed that my laptop was running noticeably hotter than usual. I checked resource manager and it turned out that the process “tracker-miner-fs-3” was constantly using more CPU than any other process.
As far as I understand, this service is responsible for indexing the fs which should not be causing high CPU load.
Checking the logs with systemctl --user status tracker-miner-fs-3.service showed that it was causing a bunch or warnings. I restarted the service and the temps/CPU usage went back to the values I would usually expect.
Can someone explain why this could be?

the log entries looked like this, they repeated over and over:

logs

Mai 02 13:20:20 name-fedora-laptop tracker-miner-fs-3[18268]: (tracker-extract-3:18268): Tracker-WARNING **: 13:20:20.057: Task for ‘file:///home/name/Videos/filename.temp.webm’ finished with error: Error when getting information for file “filename.temp.webm”: No such file or directory

Mai 02 13:20:20 name-fedora-laptop tracker-miner-fs-3[18268]: (tracker-extract-3:18268): Tracker-WARNING **: 13:20:20.067: Could not get mimetype, Error when getting information for file “filename.temp.webm”: No such file or directory

Added f40, tracker3

It seems quite obvious to me.
Tracker miner got the file name early on, then before it got to that file the file was removed so it was looping and trying to get data about a file that no longer existed.
Not a common occurrance, but in a dynamic file system it does happen.

Maybe tracker miner should be updated to prevent getting caught in this type of loop. A bug report with part of those logs could help.

Seems feasible. where would i report this? on the gnome gitlab?

I am not sure where the proper place would be.
A bug filed at bugzilla.redhat.com should get pushed to the proper place for the developers. Tracker-miner is a part of nautilus.

bug submitted here: 2278649 – tracker-miner high CPU usage

3 Likes

Thanks for reporting the issue and creating a bug report. My Fedora 40 SilverBlue system was hanging 6 times in past weeks and the issue is due to tracker-miner that triggered oom-killer to kill Firefox, Nautilus and VLC.
In addition it filled logs with messages related to files downloaded with yt-dlp.
I hope the bug will be solved soon.

Hi, since you also used yt-dlp to download the file, could you add your logs to the gnome gitlab thread? I think it they could be helpful to figure out what the issue is: Constant high CPU usage (#340) · Issues · GNOME / tracker-miners · GitLab

For some reason, this issue seems to happen with yt-dlp specifically, so any information on that is probably helpful

Also, if you want to ““fix”” this issue temporarily, you can just restart tracker-miner-fs-3 with the command systemctl --user restart tracker-miner-fs-3

Hi Eric.
Comment added to the bug report.
I see there is a new package version released recently (3.7.3) :

But so far I disabled completely tracker-miner through :

sudo systemctl --global mask tracker-miner-fs-3.service
sudo systemctl --global mask tracker-xdg-portal-3.service

With KDE or Gnome I always faced issues with indexing software. I’ve had enough …

For those using yt-dlp who want to continue to use Gnome Tracker/tracker-miner, a solution is to have temporary files created by yt-dlp outside $HOME directory. Just create ~/yt-dlp.conf with a content such as :
-P "temp:/var/tmp/"
Another option is to use a specific directory under $HOME marked as ignored by tracker-miner (need to create a file .nomedia or .trackerignore
You can otherwise configure Gnome Tracker to ignore *.temp.* files but it is less efficient and may not meet all users requirements (maybe some users want to index some documents with a .temp. pattern not created by yt-dlp)

Reminder about Gnome Tracker default list of ignored files/directories :

# gsettings list-recursively |grep -i 'org.freedesktop.tracker3.miner.files'  | grep  ignored
org.freedesktop.Tracker3.Miner.Files ignored-directories ['po', 'CVS', 'core-dumps', 'lost+found']
org.freedesktop.Tracker3.Miner.Files ignored-directories-with-content ['.trackerignore', '.git', '.hg', '.nomedia']
org.freedesktop.Tracker3.Miner.Files ignored-files ['*~', '*.o', '*.la', '*.lo', '*.loT', '*.in', '*.m4', '*.rej', '*.gmo', '*.orig', '*.pc', '*.omf', '*.aux', '*.tmp', '*.vmdk', '*.vm*', '*.nvram', '*.part', '*.rcore', '*.lzo', 'autom4te', 'conftest', 'confstat', 'Makefile', 'SCCS', 'ltmain.sh', 'libtool', 'config.status', 'confdefs.h', 'configure', '#*#', '~$*.doc?', '~$*.dot?', '~$*.xls?', '~$*.xlt?', '~$*.xlam', '~$*.ppt?', '~$*.pot?', '~$*.ppam', '~$*.ppsm', '~$*.ppsx', '~$*.vsd?', '~$*.vss?', '~$*.vst?', '*.directory']
1 Like

I had the same “fan whining” problem this morning, the first google result took me to a askubuntu thread where i found the tracker3 reset -s command which gave relief

~$ tracker3 reset -s
Found 1 PID…
  Killed process 7787 — “tracker-miner-fs-3”

I had this high CPU usage problem caused by the process “tracker-miner-fs-3” yesterday. Is it still not fixed?

looks like this is scheduled to be fixed with version 3.8, however it has not been released yet (Constant high CPU usage (#340) · Issues · GNOME / LocalSearch · GitLab)

edit: looks like it is not in rawhide yet, so probably will take some time first (tracker-miners - Fedora Packages)