Hi, On Thu, Jun 24, 2021 at 11:40:04AM +0200, Guido Günther wrote: > Hi, > On Sat, Feb 27, 2021 at 05:16:04PM +0100, Julian Andres Klode wrote: > > Package: tracker-miners > > Version: 2.3.5-2 > > Severity: normal > > Tags: patch > > User: ubuntu-de...@lists.ubuntu.com > > Usertags: origin-ubuntu hirsute ubuntu-patch > > X-Debbugs-Cc: juli...@ubuntu.com > > > > In Ubuntu, the attached patch was applied to achieve the following: > > > > Fix tracker-extract crashing constantly with new glibc. > > I somehow missed this bug when preparing > > https://salsa.debian.org/gnome-team/tracker-miners/-/merge_requests/14 > > but i can confirm missing 'newfsstat` crashes the miner constantly like > > Program terminated with signal SIGSYS, Bad system call. > #0 __GI___xstat (vers=<optimized out>, name=0xffff803cd178 "/etc/localtime", > buf=0xffff4ae26bd0) at ../sysdeps/unix/sysv/linux/generic/xstat.c:36 > 36 ../sysdeps/unix/sysv/linux/generic/xstat.c: No such file or directory. > [Current thread is 1 (Thread 0xffff4ae28050 (LWP 3217))] > (gdb) bt > #0 __GI___xstat (vers=<optimized out>, name=0xffff803cd178 "/etc/localtime", > buf=0xffff4ae26bd0) at ../sysdeps/unix/sysv/linux/generic/xstat.c:36 > #1 0x0000ffff8033411c in __tzfile_read (file=file@entry=0xffff803cd178 > "/etc/localtime", extra=extra@entry=0, extrap=extrap@entry=0x0) at > tzfile.c:155 > #2 0x0000ffff80333cd0 in tzset_internal (always=always@entry=1) at > tzset.c:405 > #3 0x0000ffff80333e14 in __tzset () at tzset.c:551 > #4 0x0000ffff80332b14 in __GI_mktime (tp=tp@entry=0xffff4ae26d00) at > mktime.c:529 > #5 0x0000ffff8094e7a0 in tracker_date_format_to_iso8601 > (date_string=date_string@entry=0xffff4ae26d68 "2021:04:26 16:10:14", > format=format@entry=0xffff80952200 "%Y:%m:%d %H:%M:%S") > at ../src/libtracker-extract/tracker-utils.c:464 > #6 0x0000ffff8094a4a8 in get_date (exif=exif@entry=0xffff2c00ff20, > tag=tag@entry=EXIF_TAG_DATE_TIME) at > ../src/libtracker-extract/tracker-exif.c:83 > #7 0x0000ffff8094b154 in parse_exif (buffer=buffer@entry=0xffff2c014840 > "Exif", len=len@entry=342, data=data@entry=0xffff2c00f6e0, uri=0xffff2c0105d0 > "file:///home/purism/Pictures/IMG20210426161014.jpg") > at ../src/libtracker-extract/tracker-exif.c:478 > #8 0x0000ffff8094bc7c in tracker_exif_new > (buffer=buffer@entry=0xffff2c014840 "Exif", len=len@entry=342, > uri=uri@entry=0xffff2c0105d0 > "file:///home/purism/Pictures/IMG20210426161014.jpg") > at ../src/libtracker-extract/tracker-exif.c:614 > #9 0x0000ffff7c32faec in tracker_extract_get_metadata (info=0xaaaad820b040) > at ../src/tracker-extract/tracker-extract-jpeg.c:230 > #10 0x0000aaaab303f620 in get_file_metadata (task=task@entry=0xaaaad850f590, > info_out=info_out@entry=0xffff4ae277e0) at > ../src/tracker-extract/tracker-extract.c:302 > #11 0x0000aaaab303fd80 in get_metadata (task=0xaaaad850f590) at > ../src/tracker-extract/tracker-extract.c:511 > #12 0x0000aaaab303fdd4 in single_thread_get_metadata (queue=0xaaaad8515200) > at ../src/tracker-extract/tracker-extract.c:539 > #13 0x0000ffff805468f4 in g_thread_proxy (data=0xaaaad8522a40) at > ../../../glib/gthread.c:820 > #14 0x0000ffff80419628 in start_thread (arg=0xffff4ae27950) at > pthread_create.c:477 > #15 0x0000ffff8037101c in thread_start () at > ../sysdeps/unix/sysv/linux/aarch64/clone.S:78 > > and with the above it fixes it for me. The bug should likely have a > higher priority since when e.g. systemd-coredump is installed as well > the crash every 2s and writing the core file is a real battery drain.
Attached is a diff I'd be happy to NMU to unstable and then ask for an unblock request. Cheers, -- Guido
diff --git a/debian/changelog b/debian/changelog index 353d69ddf..4fa33a6bd 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,13 @@ +tracker-miners (2.3.5-2.1) unstable; urgency=medium + + * Non-maintainer upload. + * libtracker-miners-common: Add newstatat/statat64 syscalls. + Backport upstream commit b3fdbaf to avoid constant crashes every 2s. + Thanks Julian Andres Klode for forwarding this initially. + (Closes: #983637) + + -- Guido Günther <a...@sigxcpu.org> Mon, 05 Jul 2021 12:40:50 +0200 + tracker-miners (2.3.5-2) unstable; urgency=medium * Make the 'audio' tests non-fatal on powerpc and sparc64 as well diff --git a/debian/patches/libtracker-miners-common-Add-newstatat-statat64-syscalls.patch b/debian/patches/libtracker-miners-common-Add-newstatat-statat64-syscalls.patch new file mode 100644 index 000000000..832386d2c --- /dev/null +++ b/debian/patches/libtracker-miners-common-Add-newstatat-statat64-syscalls.patch @@ -0,0 +1,24 @@ +From: Carlos Garnacho <carl...@gnome.org> +Date: Sun, 25 Oct 2020 15:37:13 +0100 +Subject: libtracker-miners-common: Add newstatat/statat64 syscalls + +These are done in recent glib versions, should be observed here. + +(cherry picked from commit b3fdbaf1ab23ce7191ace6db79575dfce5f90881) +--- + src/libtracker-miners-common/tracker-seccomp.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/libtracker-miners-common/tracker-seccomp.c b/src/libtracker-miners-common/tracker-seccomp.c +index c0327eb..01887e8 100644 +--- a/src/libtracker-miners-common/tracker-seccomp.c ++++ b/src/libtracker-miners-common/tracker-seccomp.c +@@ -91,6 +91,8 @@ tracker_seccomp_init (void) + /* Basic filesystem access */ + ALLOW_RULE (fstat); + ALLOW_RULE (fstat64); ++ ALLOW_RULE (fstatat64); ++ ALLOW_RULE (newfstatat); + ALLOW_RULE (stat); + ALLOW_RULE (stat64); + ALLOW_RULE (statfs); diff --git a/debian/patches/series b/debian/patches/series index a9bd2953d..f56af3a1f 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -5,3 +5,4 @@ prefer_systemd_activation.patch dont_start_for_root.patch Don-t-immediately-restart-tracker-extract-on-SIGSYS.patch debian/Revert-build-Include-libdir-in-rpath.patch +libtracker-miners-common-Add-newstatat-statat64-syscalls.patch