[neon/neon/settings/Neon/unstable] etc/xdg/plasma-workspace/env: disable just in time debugging when systemd-coredump is installed

Harald Sitter null at kde.org
Wed May 26 13:51:59 BST 2021


Git commit 1e810b3a233c29637900bc19ee37604270b8d76b by Harald Sitter.
Committed on 26/05/2021 at 12:51.
Pushed by sitter into branch 'Neon/unstable'.

disable just in time debugging when systemd-coredump is installed

with master kcrash and drkonqi we can now route crashes through
coredumpd instead of catching them just in time by attaching drkonqi to
the running process.
coredumpd has the advantage that there is less opportunity for process
racing (other threads aren't stopped on most signals so they can produce
secondary crashes that may result in immediate aborts - preventing
tracing). It can also catch crashes that happen on logout/shutdown
though we don't have UI backing for this yet, so this isn't functional
right now. It also generally should be able to catch compositor crashes.

we only enable this when systemd-coredump is set up as core pattern
handler. otherwise we default to just in time debugging, same as before

A  +17   -0    etc/xdg/plasma-workspace/env/neon_kcrash_dump_only.sh

https://invent.kde.org/neon/neon/settings/commit/1e810b3a233c29637900bc19ee37604270b8d76b

diff --git a/etc/xdg/plasma-workspace/env/neon_kcrash_dump_only.sh b/etc/xdg/plasma-workspace/env/neon_kcrash_dump_only.sh
new file mode 100644
index 0000000..afbd324
--- /dev/null
+++ b/etc/xdg/plasma-workspace/env/neon_kcrash_dump_only.sh
@@ -0,0 +1,17 @@
+# SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
+# SPDX-FileCopyrightText: 2021 Harald Sitter <sitter at kde.org>
+
+# Disable just in time debugging. With drkonqi master we can dump into systemd-coredump
+# instead of attaching drkonqi to the running process.
+# Only applied when systemd-coredump is used, which currently isn't generally the case but
+# we may opt to go down that route eventually.
+
+# The user may override this behavior by explicitly setting
+# KCRASH_DUMP_ONLY=0 in ~/.config/environment.d/*.conf
+# (or a system-wide location, naturally).
+
+if [ -z "$KCRASH_DUMP_ONLY" ]; then # don't override a user's choice
+  if grep --quiet systemd-coredump /proc/sys/kernel/core_pattern; then
+    export KCRASH_DUMP_ONLY=1
+  fi
+fi


More information about the Neon-commits mailing list