How do I trigger a panic on a s390x system?

Solution Unverified - Updated

Environment

  • Red Hat Enterprise Linux on IBM z/VM

Issue

The kernel provides the panic_on_nmi, panic_on_unrecovered_nmi, or unknown_nmi_panic sysctls for x86 systems only (such as Intel and AMD processors).

Resolution

Send the following command from the CP program to manually panic the guest.

CP system restart
cp system restart
cp system restart

Root Cause

Kernels built for s390x systems do not have a sysctl to panic the system when an NMI is sent. As a result triggering a panic via an NMI is not an available troubleshooting option.

If the kdump service is enabled and has a sound configuration, a vmcore will be created as a result of the system restart command.

Diagnostic Steps

From the source code where sysctls are defined:

 $ kernel/sysctl.c 
 963 #if defined(CONFIG_X86_LOCAL_APIC) && defined(CONFIG_X86)
 964     {
 965         .procname       = "unknown_nmi_panic",
 966         .data           = &unknown_nmi_panic,
 967         .maxlen         = sizeof (int),
 968         .mode           = 0644,
 969         .proc_handler   = proc_dointvec,
 970     },
 971 #endif
 972 #if defined(CONFIG_X86)
 973     {
 974         .procname   = "panic_on_unrecovered_nmi",
 975         .data       = &panic_on_unrecovered_nmi,
 976         .maxlen     = sizeof(int),
 977         .mode       = 0644,
 978         .proc_handler   = proc_dointvec,
 979     },
 980     {
 981         .procname   = "panic_on_io_nmi",
 982         .data       = &panic_on_io_nmi,
 983         .maxlen     = sizeof(int),
 984         .mode       = 0644,
 985         .proc_handler   = proc_dointvec,
 986     },

The above sections define the /proc file names, permissions of those files, and the internal kernel variables where the values are stored. Preprocessor directives indicate the above sysctls are to be compiled in only when compiling for an x86 kernel.

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.