From 10719e664e55aff31e3f7924b7c793112d943363 Mon Sep 17 00:00:00 2001 From: "Guilherme G. Piccoli" Date: Wed, 26 Jan 2022 12:35:37 -0300 Subject: [PATCH] Keep track of panic sysctls in the kdump-steamos package Before this patch, the sysctl parameters for panic on oops, lockups, etc were tracked in the "image-recipes/jupiter" gitlab repositories. After MR [0] this changed and now we must keep track of the sysctls inside the kdump-steamos package. Hence, this commit adds the sysctl config file into "/usr/lib/sysctl.d", also introducing the "panic_print" sysctl, to enable dumping more info on panic events. [0] https://gitlab.steamos.cloud/jupiter/jupiter/-/merge_requests/1 Signed-off-by: Guilherme G. Piccoli --- 20-kdump-steamos.conf | 31 +++++++++++++++++++++++++++++++ PKGBUILD | 7 +++++-- 2 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 20-kdump-steamos.conf diff --git a/20-kdump-steamos.conf b/20-kdump-steamos.conf new file mode 100644 index 0000000..3a7f45b --- /dev/null +++ b/20-kdump-steamos.conf @@ -0,0 +1,31 @@ +# SPDX-License-Identifier: LGPL-2.1+ +# +# Copyright (c) 2022 Valve. +# Maintainer: Guilherme G. Piccoli +# +# This file sets the sysctl parameters that are used by the +# kdump-steamos package, in order to panic and reboot on +# severe events, like oops or soft/hard lockups. +# Also, we set panic_print in order to collect more info. + +kernel.panic_on_oops = 1 + +kernel.panic_on_rcu_stall = 1 + +kernel.softlockup_panic = 1 + +kernel.hardlockup_panic = 1 + +# reboot as soon as possible after a panic event. +kernel.panic = -1 + +# dump more information when facing a panic event: +# bit 0 - print all tasks info +# bit 1 - print system memory info +# bit 2 - print timer info +# bit 6 - print all CPUs backtrace (currently on linux-next) +kernel.panic_print = 71 + +# Currently disabled, since SteamOS might get stuck while +# doing installation on drive using calamares. +kernel.hung_task_panic = 0 diff --git a/PKGBUILD b/PKGBUILD index 4a51e30..62af08f 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -12,7 +12,8 @@ arch=('x86_64') license=('GPL2') install=kdump-steamos.install -source=('kdump_collect.sh' +source=('20-kdump-steamos.conf' + 'kdump_collect.sh' 'kdump.etc' 'kdump_load.sh' 'kdump-steamos.install' @@ -22,7 +23,8 @@ source=('kdump_collect.sh' 'submit_report.sh' 'submitter_load.sh') -sha256sums=('2514f79a496f76af847e262eadd55a5c2f8d95375cc513efa8cadd4cd98fe1d2' +sha256sums=('dbedff54addfb5dce51614c73df04c90fca9f27d0d3a690243259ccbbfcca07c' + '2514f79a496f76af847e262eadd55a5c2f8d95375cc513efa8cadd4cd98fe1d2' 'd0ac5e7e38fa1d3355eacdf70188483456f53d3e2b18cd161dea3df87b0b8f9c' '8a556a9ebbda88dfd29b9620a0f2e7dbea19cd5fc019eb5dc4ebf7c80e4bf238' '06b38bd9f09da5fb22a765b6f1945fc349cc5f9d13cd32c9218b9b60b40a9010' @@ -36,6 +38,7 @@ package() { install -D -m0644 kdump.etc "$pkgdir/etc/default/kdump" install -D -m0644 kdump-steamos.service "$pkgdir/usr/lib/systemd/system/kdump-steamos.service" + install -D -m0644 20-kdump-steamos.conf "$pkgdir/usr/lib/sysctl.d/20-kdump-steamos.conf" install -D -m0755 kdump_collect.sh "$pkgdir/usr/lib/dracut/modules.d/55kdump/kdump_collect.sh" install -D -m0755 module-setup.sh "$pkgdir/usr/lib/dracut/modules.d/55kdump/module-setup.sh"