Today, I noticed that newly added music files have stopped showing up in GNOME Music. I have only a few albums in my ~/Music directory and add new ones sporadically, so it's hard to pinpoint when exactly this started happening. But today, I tried adding a new album, and I noticed it didn't show up in GNOME Music. The earlier ones from a few years ago were still there though.
So I figured it must be an indexing problem with Tracker, and I reset its database with /usr/lib64/tracker-miners/tracker3/reset -s. Following which GNOME Music is showing no music at all. But the files still show up when searching e.g. from Activities. That told me that Tracker is indexing them, but apparently not identifying them as music. And indeed, searching with Tracker from the command line finds the files when doing a general search, but not when doing a music-specific search with the -m switch:
$ /usr/lib64/tracker-miners/tracker3/search Margery Results: file:///home/david/Music/Vulfpeck%20-%20The%20Beautiful%20Game/Vulfpeck%20-%20The%20Beautiful%20Game%20-%2008%20Margery,%20My%20First%20Car.flac …Game - 08 Margery, My First… file:///home/david/Music/Vulfpeck%20-%20The%20Beautiful%20Game/Vulfpeck%20-%20The%20Beautiful%20Game%20-%2008%20Margery,%20My%20First%20Car.flac …Game - 08 Margery, My First… $ /usr/lib64/tracker-miners/tracker3/search -m Margery Files:
Digging deeper, /usr/lib64/tracker-miners/tracker3/status lists many music files in the log with the message Crash/hang handling file. I tried running /usr/lib64/tracker-miners/tracker3/index --add manually but it didn't help.
Finally, I stumbled upon the following error with Tracker extract:
$ /usr/lib64/tracker-miners/tracker3/extract Vulfpeck\ -\ The\ Beautiful\ Game/Vulfpeck\ -\ The\ Beautiful\ Game\ -\ 08\ Margery,\ My\ First\ Car.flac (tracker-extract-3:31253): Tracker-CRITICAL **: 14:50:53.011: Failed to load seccomp rules. ** Tracker:ERROR:../src/tracker-extract/tracker-extract.c:699:tracker_extract_get_metadata_by_cmdline: code should not be reached Bail out! Tracker:ERROR:../src/tracker-extract/tracker-extract.c:699:tracker_extract_get_metadata_by_cmdline: code should not be reached
This looks like it could be the culprit of the crashes listed by the status command. And it makes sense that if Tracker fails to extract metadata from an audio file, it won't be added to the music database.
I can replicate the issue on a fresh VirtualBox install of Solus 4.3, but not on a fresh VirtualBox install of Fedora 34, where GNOME Music shows everything as expected.
I also checked the upstream issue tracker for Tracker miners and this issue seems somewhat relevant, in that it mentions that seccomp sandboxing is fragile, citing the example of a different project which has entirely removed it for that reason, and sketches plans for using systemd sandboxing instead.
Let me know if I can/should provide additional (e.g. hardware-related) information :)