watchdog/trigger-system-reset not triggering a reset

Bug #1802459 reported by Kristin Chuang
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Provider for Plainbox - Snappy
Fix Released
High
Jonathan Cave

Bug Description

[Symptom]
The test case "watchdog/trigger-system-reset" does not trigger a system reset.

[Details]
Looking into the jobs file[1], the command for this case is:
command:
  echo 0 > /proc/sys/kernel/panic
  echo c > /proc/sysrq-trigger

However, the commands will not take effect due to the fact that default value of /proc/sys/kernel/sysrq in Ubuntu core & ubuntu desktop is currently 176, meaning that only certain sysrq features are enabled and allowing a reboot after a kernel panic is not one of them. (Details referenced from https://linuxconfig.org/how-to-enable-all-sysrq-functions-on-linux)

To make this test case work, the full set of commands should be:
  echo 1 > /proc/sys/kernel/sysrq #this enables all sysrq functions
  echo 0 > /proc/sys/kernel/panic
  echo c > /proc/sysrq-trigger

[1] https://git.launchpad.net/plainbox-provider-snappy/tree/units/watchdog/jobs.pxu#n33

Hardware: Intel NUC
Checkbox: checkbox-snappy 1426
OS: UC18

Related branches

Revision history for this message
Pierre Equoy (pieq) wrote :

I also ran into the same issue while running another project.

Changed in plainbox-provider-snappy:
assignee: nobody → Jonathan Cave (jocave)
status: New → Confirmed
Revision history for this message
Jonathan Cave (jocave) wrote :

So the question is: is this a bug in the test or in the classic images? Given these classic images are still running on a IoT device should the image be configured such that the same SysRq features are enabled as for Ubuntu Core (think of the use case here i.e. devices should always attempt to reset on errors)?

Pierre Equoy (pieq)
information type: Public → Private
information type: Private → Public
Revision history for this message
Jonathan Cave (jocave) wrote :

Discussed this with Darren. The command suggested allows the manual triggering of a kernel panic from userspace rather than indicating that a kernel panic should result in watchdog trigger event.

As such is seems reasonable to just add the command to the test. I will create another bug to indicate that we should add an after job to clear this setting once the watchdog reset has finished.

Changed in plainbox-provider-snappy:
importance: Undecided → High
Revision history for this message
Jonathan Cave (jocave) wrote :

In a test on my laptop I found that the sysrq setting was returned to default when the system rebooted. Hence, I think an after job should not be required.

Changed in plainbox-provider-snappy:
status: Confirmed → In Progress
status: In Progress → Fix Committed
Changed in plainbox-provider-snappy:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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