Why is triggering a panic using the NMI switch on a machine not working?

Solution Verified - Updated

Environment

  • Red Hat Enterprise Linux 5 and later
  • NMI

Issue

  • Unable to trigger panic using NMI switch on the machine even though kernel.unknown_nmi_panic parameter is set to 1 in sysctl

Resolution

Ensure that kernel.unknown_nmi_panic, kernel.panic_on_unrecovered_nmi and panic_on_io_nmi are all enabled in /etc/sysctl.conf (or a drop-in such as /etc/sysctl.d/01-nmi.conf):

kernel.unknown_nmi_panic = 1
kernel.panic_on_unrecovered_nmi = 1
kernel.panic_on_io_nmi = 1

These settings will take effect after issuing a sysctl -p /etc/sysctl.conf respectively sysctl -p /etc/sysctl.d/01-nmi.conf) or a reboot of the system.

Root Cause

The implementation of the diagnostic NMI feature can vary between chassis and vendors.
In order to best prepare for the various types of NMI that can be delivered when initiated in a diagnostic manner, configuration of each trigger tunable is required.

Diagnostic Steps

  • Check the sysctl "_nmi" parameter current values

    # sysctl -a | grep "_nmi"
    kernel.panic_on_io_nmi = 0
    kernel.panic_on_unrecovered_nmi = 0
    kernel.unknown_nmi_panic = 1
    

    In the example above, some values are 0, which won't trigger a panic, depending on the hardware.

SBR
Components
Category
Tags

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.