On Thu, 12 Jan 2017 at 13:07:49 +0000, Simon McVittie wrote:
> * On systems with dbus-user-session installed, `systemd --user` restarts
> tracker-extract on failure, as requested by the systemd unit.
> This is easy to avoid by adding SIGSYS to RestartPreventExitStatus,
> and I'm trying a patch that does that.
See attached. On my system, this delays the restart by a couple of
seconds, which hopefully mitigates the load issue.
S
>From 8655eb4d4891a8276d5443d36ce0d2e1de70bf4b Mon Sep 17 00:00:00 2001
From: Simon McVittie <[email protected]>
Date: Thu, 12 Jan 2017 12:50:46 +0000
Subject: [PATCH 3/4] Don't immediately restart tracker-extract on SIGSYS
Mitigates: #851148
---
debian/changelog | 1 +
...mediately-restart-tracker-extract-on-SIGSYS.patch | 20 ++++++++++++++++++++
debian/patches/series | 1 +
3 files changed, 22 insertions(+)
create mode 100644 debian/patches/Don-t-immediately-restart-tracker-extract-on-SIGSYS.patch
diff --git a/debian/changelog b/debian/changelog
index e999c4aa2..5dc1f9047 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,6 +6,7 @@ tracker (1.10.3-1.1) UNRELEASED; urgency=medium
introduced in 1.10.2.
* Add patches from upstream to make the sandbox allow more harmless
syscalls (Closes: #848842, #849936, LP: #1649035, LP: #1649004)
+ * Don't immediately restart tracker-extract on SIGSYS. Mitigates: #851148
-- Simon McVittie <[email protected]> Thu, 12 Jan 2017 12:11:44 +0000
diff --git a/debian/patches/Don-t-immediately-restart-tracker-extract-on-SIGSYS.patch b/debian/patches/Don-t-immediately-restart-tracker-extract-on-SIGSYS.patch
new file mode 100644
index 000000000..528b8ead7
--- /dev/null
+++ b/debian/patches/Don-t-immediately-restart-tracker-extract-on-SIGSYS.patch
@@ -0,0 +1,20 @@
+From: Simon McVittie <[email protected]>
+Date: Thu, 12 Jan 2017 12:42:38 +0000
+Subject: Don't immediately restart tracker-extract on SIGSYS
+
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=851148
+---
+ src/tracker-extract/tracker-extract.service.in | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/tracker-extract/tracker-extract.service.in b/src/tracker-extract/tracker-extract.service.in
+index b7bc6c140..415e130e1 100644
+--- a/src/tracker-extract/tracker-extract.service.in
++++ b/src/tracker-extract/tracker-extract.service.in
+@@ -7,4 +7,5 @@ BusName=org.freedesktop.Tracker1.Miner.Extract
+ ExecStart=@libexecdir@/tracker-extract
+ Restart=on-failure
+ # Don't restart after tracker daemon -k (aka tracker-control -k)
+-RestartPreventExitStatus=SIGKILL
++# Don't restart after seccomp raises SIGSYS either
++RestartPreventExitStatus=SIGKILL SIGSYS
diff --git a/debian/patches/series b/debian/patches/series
index 99e36a328..d3e275326 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -3,3 +3,4 @@ libtracker-common-Whitelist-dup-dup2-dup3.patch
libtracker-common-Whitelist-umask.patch
libtracker-common-Handle-mlock-munlock-syscalls.patch
libtracker-common-Allow-querying-process-stats-limits.patch
+Don-t-immediately-restart-tracker-extract-on-SIGSYS.patch
--
2.11.0