Skip to content

libtracker-miners-common: Allow rt_sigreturn on all glibcs

According to Fedora retrace service, there is a growing amount of SIGSYS backtraces in tracker-extract-3 like https://retrace.fedoraproject.org/faf/reports/853135/, with the same mysterious backtrace:

 [1] __restore_rt
 [2] _dl_call_fini
 [3] _dl_fini
 [4] __run_exit_handlers
 [5] ???
 [6] __libc_start_call_main
 [7] __libc_start_main@@GLIBC_2.34
 [8] _start

It would seem that something (a library we depend on) did set up an atexit() handler, and the error happens while/after running that code.

And what does that __restore_rt symbol do? Looking at libc_sigaction.c code in glibc sources, underneath this will perform (in ASM, for reasons) the __NR_rt_sigreturn syscall. There is this note in sigreturn(2) man page:

  sigreturn() exists only to allow the implementation of signal handlers.
  It should never be called directly. (Indeed, a simple sigreturn() wrapper
  in the GNU C library simply returns -1, with errno set to ENOSYS.)

So this is indeed the code where glibc interacts with that system call on our behalf. With that in mind, the picture is somewhat less blurry: some library set up an atexit() handler, which directly or indirectly raises an unix signal we do fail to restore from.

Our seccomp sandbox allows tgkill on tracker-extract-3 own process, and these crashes demonstrate that the seccomp sandbox is also effective during the handling of unix signals. It makes sense to allow rt_sigreturn in addition, in order to allow glibc correct operation.

Edited by Carlos Garnacho

Merge request reports