From c0b52b92d5c8caf52e03d4d332cc06e13a11d3b9 Mon Sep 17 00:00:00 2001 From: Christian Schwarz Date: Mon, 24 Oct 2022 23:20:17 +0200 Subject: [PATCH] systemd: set GOTRACEBACK=crash so that we have core dumps They are useful, not least to debug issues with debugging SIGSYS caused by overly restrictive settings in the unit file. (See previous commit for an example.) --- dist/systemd/zrepl.service | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dist/systemd/zrepl.service b/dist/systemd/zrepl.service index bc80621..58b849c 100644 --- a/dist/systemd/zrepl.service +++ b/dist/systemd/zrepl.service @@ -9,6 +9,9 @@ ExecStart=/usr/local/bin/zrepl --config /etc/zrepl/zrepl.yml daemon RuntimeDirectory=zrepl zrepl/stdinserver RuntimeDirectoryMode=0700 +# Make Go produce coredumps +Environment=GOTRACEBACK='crash' + ProtectSystem=strict #PrivateDevices=yes # TODO ZFS needs access to /dev/zfs, could we limit this? ProtectKernelTunables=yes