Ubuntu18.10:ppc64:s390x - Sysrq trigger disabled when writing to /proc/sysrq-trigger

Bug #1793369 reported by bugproxy
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
The Ubuntu-power-systems project
Invalid
Medium
Canonical Kernel Team
linux (Ubuntu)
Invalid
Medium
Ubuntu on IBM Power Systems Bug Triage
Cosmic
Invalid
Medium
Ubuntu on IBM Power Systems Bug Triage
systemd (Ubuntu)
Invalid
Undecided
Unassigned
Cosmic
Won't Fix
Undecided
Unassigned

Bug Description

== Comment: #0 - Praveen K. Pandey <email address hidden> - 2018-09-19 04:49:39 ==
---Problem Description---
 [Witherspoon-DD2.2][Ubu 18.10] [4.18.0-7-generic ] : Sysrq trigger disabled when writing to /proc/sysrq-trigger

while testing kdump trying trigger kdump panic via /proc/sysrq-trigger it failed as : SysRq : This sysrq operation is disabled
LOG:

root@test:~# cat /proc/sys/kernel/sysrq
176
root@test:~# echo c > /proc/sysrq-trigger
root@test:~# dmesg
[ 380.340051] mlx5_core 0000:01:00.1 enp1s0f1: Self test out: status flags(0x2)
[ 389.404239] sysrq: SysRq : This sysrq operation is disabled.
root@test~# cat /boot/config-4.18.0-7-generic | grep CONFIG_MAGIC_SYSRQ
CONFIG_MAGIC_SYSRQ=y
CONFIG_MAGIC_SYSRQ_DEFAULT_ENABLE=0x01b6
CONFIG_MAGIC_SYSRQ_SERIAL=y
root@test:~# cat /etc/sysctl.conf | grep kernel.sysrq
#kernel.sysrq=438
root@test:~# kdump-config show
DUMP_MODE: kdump
USE_KDUMP: 1
KDUMP_SYSCTL: kernel.panic_on_oops=1
KDUMP_COREDIR: /var/crash
crashkernel addr:
   /var/lib/kdump/vmlinuz: symbolic link to /boot/vmlinux-4.18.0-7-generic
kdump initrd:
   /var/lib/kdump/initrd.img: symbolic link to /var/lib/kdump/initrd.img-4.18.0-7-generic
current state: ready to kdump

kexec command:
  /sbin/kexec -p --command-line="root=UUID=c0302064-c5a3-49a7-8bd4-402283e6fcbe ro quiet splash nr_cpus=1 systemd.unit=kdump-tools.service irqpoll noirqdistrib nousb" --initrd=/var/lib/kdump/initrd.img /var/lib/kdump/vmlinuz
root@test:~#

Regards
Praveen

== Comment: #2 - Praveen K. Pandey <email address hidden> - 2018-09-19 05:16:11 ==
when i enable in /etc/sysctl.conf it works . i append below value in sysctl.conf

echo "kernel.sysrq = 1" >> /etc/sysctl.conf

I think this is should be enable by default in ubuntu 18.10 as earlier ubuntu distro it has , not sure why it got removed as kdump mechanism require this .

Praveen
Regards

bugproxy (bugproxy)
tags: added: architecture-ppc64le bugnameltc-171577 severity-medium targetmilestone-inin1810
Changed in ubuntu:
assignee: nobody → Ubuntu on IBM Power Systems Bug Triage (ubuntu-power-triage)
affects: ubuntu → linux (Ubuntu)
Changed in linux (Ubuntu):
status: New → Triaged
importance: Undecided → Medium
tags: added: kernel-da-key
Revision history for this message
Frank Heimes (fheimes) wrote :

This is not limited to ppc64el and at least applies to s390x, too.

Changed in ubuntu-power-systems:
status: New → Triaged
importance: Undecided → Medium
assignee: nobody → Canonical Kernel Team (canonical-kernel-team)
summary: - Ubuntu18.10:Witherspoon:DD2.2 - Sysrq trigger disabled when writing to
+ Ubuntu18.10:ppc64:s390x - Sysrq trigger disabled when writing to
/proc/sysrq-trigger
Revision history for this message
Thadeu Lima de Souza Cascardo (cascardo) wrote :

The sysrq mechanism allows someone with physical access to the system to easily cause it to boot by just pressing some keys. That's why the sysrq default allows only very few commands to be issued. kdump is for real crashes. kdump testing may require using the sysrq-trigger mechanism, but that could just as well write to /proc/sys/kernel/sysrq before causing the crash. In fact, that's just what kdump-tools autopkgtest does.

echo 1 > /proc/sys/kernel/sysrq
echo c > /proc/sysrq-trigger

So, not a bug here.

Changed in systemd (Ubuntu Cosmic):
status: New → Won't Fix
Changed in linux (Ubuntu Cosmic):
status: Triaged → Invalid
Frank Heimes (fheimes)
Changed in ubuntu-power-systems:
status: Triaged → Invalid
bugproxy (bugproxy)
tags: added: targetmilestone-inin---
removed: targetmilestone-inin1810
Changed in systemd (Ubuntu):
status: New → Invalid
bugproxy (bugproxy)
tags: added: targetmilestone-inin1810
removed: targetmilestone-inin---
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

The default sysctl setting for kernel.sysrq in Ubuntu is 176 (and was in bionic and xenial) and it is shipped in /etc/sysctl.d/10-magic-sysrq.conf file. This file is provided by a required package from the minimal task, called `procps`.

176 enables:
128 - allow reboot/poweroff
32 - enable remount read-only
16 - enable sync command

Do you have `procps` package installed on your system?

Is anything else overriding that setting?

If that setting is not suitable for you, I recommend to either modify /etc/sysctl.d/10-magic-sysrq.conf or to add another .conf drop in, with a higher number in /etc/sysctl.d directory to suit your system better.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.