Skip to content

Commit

Permalink
Fix kernel panic for irq after fast-reboot (#823)
Browse files Browse the repository at this point in the history
After the change in master branch updating SAI from 3.5.3.1m-25 to 3.7.3.2, we always found kernel panic after running fast-reboot command in testing SONiC with traffic. In the up path of fast-reboot, we can find warning messages like "unhandled irq 16 error" before kernel panic, which implies that some components are not properly closed in the down path.

This fix will unload certain kernel modules by stopping opennsl before fast-reboot, which is suggested by BRCM.

Note that another part of the fix is to add 'ExecStop=-/etc/init.d/opennsl-modules stop' to sonic-buildimage:platform/broadcom/saibcm-modules/systemd/opennsl-modules.service, which will be included in another pull request.
  • Loading branch information
byu343 authored Mar 22, 2020
1 parent 727b499 commit 28ea21a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions scripts/fast-reboot
Original file line number Diff line number Diff line change
Expand Up @@ -529,6 +529,13 @@ then
systemctl stop nps-modules-`uname -r`.service || debug "Ignore stopping nps service error $?"
fi
# Stop opennsl modules for Broadcom platform
if [[ "$sonic_asic_type" = 'broadcom' ]];
then
service_name=$(systemctl list-units --plain --no-pager --no-legend --type=service | grep opennsl | cut -f 1 -d' ')
systemctl stop "$service_name"
fi
# Update the reboot cause file to reflect that user issued this script
# Upon next boot, the contents of this file will be used to determine the
# cause of the previous reboot
Expand Down

0 comments on commit 28ea21a

Please sign in to comment.