Page MenuHomeSolus

Tracker extract fails because of seccomp
Open, NormalPublic

Description

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 :)

Event Timeline

So I tried building the last few releases of the [tracker-miners Solus package](https://dev.getsol.us/source/tracker-miners/) locally with solbuild, and releases 32 and 33 (which correspond to version 3.1.0 of tracker-miners) work fine, whereas 34 and 35 (version 3.1.2) lead to the crash I described above.

FWIW, the version of tracker-miners that works fine on Fedora 34 (as noted in OP) is 3.1.1.

Unknown Object (User) added a subscriber: Unknown Object (User).Aug 23 2021, 5:41 PM
DataDrake triaged this task as Normal priority.Feb 21 2022, 3:54 PM
DataDrake moved this task from Backlog to Package Fixes on the Software board.

@dlukes is this still an issue? It has been a long time since there was an update to this task, and there have been many updates since this issue was opened. Thanks.