Mailinglist Archive: opensuse-bugs (4655 mails)

< Previous Next >
[Bug 1042933] kernel panic due to nmi caused by systemd-watchdog test
  • From: bugzilla_noreply@xxxxxxxxxx
  • Date: Tue, 13 Jun 2017 16:13:23 +0000
  • Message-id: <>

--- Comment #6 from Borislav Petkov <bpetkov@xxxxxxxx> ---
(In reply to Thomas Blume from comment #5)
Hm, the goal of the test is to talk to the watchdog.
So, removing the watchdog driver prevents the crash, but also fails the
test, because it cannot open the watchdog.

Well, someone had the brilliant idea to panic the system unconditionally
in the hpwdt driver:

|-> nmi_panic

nmi_panic(regs, "An NMI occurred. Depending on your system the reason "
"for the NMI is logged in any one of the following "
"1. Integrated Management Log (IML)\n"
"2. OA Syslog\n"
"3. OA Forward Progress Log\n"
"4. iLO Event Log");

Apparently, that driver goes down into the BIOS to ask what the NMI
reason was but since the test is causing the NMI and doesn't do any
special dancing to tell the BIOS that it is a test running and that when
asked, the BIOS should reply something so that the watchdog doesn't
panic the system, this happens.

But from looking at your testcase again, you only want to ping it once:

ioctl(watchdog_fd, WDIOC_KEEPALIVE, 0);

and then close it. Right?

If so, from looking at the code, it apparently expects a magical 'V'
written to /dev/watchdog so that when you close /dev/watchdog (or your
test exists) it will stop the timer and won't trigger an NMI.

So, IINM, if you write a 'V' at the end of open_watchdog(), it should

Alternatively, you can simply send it WDIOS_DISABLECARD flag with
WDIOC_SETOPTIONS and it'll stop the watchdog timer too.

I still fail to see what this is then even testing but whatever...

You are receiving this mail because:
You are on the CC list for the bug.
< Previous Next >