-
Notifications
You must be signed in to change notification settings - Fork 5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kernel panic when serial device resets #4120
Comments
I don't see any Pi-specific software in that stack trace - have you tried in a different Linux system such as a PC? |
I can set up a PC to try it on. Any suggestions for best (most approximate to Raspbian) distribution to use? Just a vanilla Buster install? |
Testing on a Lenovo M93p PC:
On both Pi 3s I have I get a panic after at most 20-25 resets, so I'm fairly sure the problem won't happen on the other hardware. What can I do/test on the Pi to gather more information? |
If building a debug kernel (or anything similar) would be useful, I'm happy to give it a go. I'm willing to do whatever is helpful to dig into this, but I need some pointers. |
Another data point - I can also make the crash occur on a Pi 4 Model B using the same script. |
Work around M997 sometimes causing a kernel panic on the host when sent from a Raspbery Pi, the root cause is currently unknown.
Seeing this as well. |
Describe the bug
I maintain a plugin for the 3D printer host software OctoPrint which is used to update printer firmware. One of the types of printer is updated by resetting the serial device. I have observed that resetting this serial device will periodically cause a kernel panic.
I have reproduced this problem on two different Pi 3 Model B including one which was a clean install of Raspbian, fully updated this morning.
To reproduce
Running this shell script with the printer board plugged in will eventually crash the Pi (typically after 5-15 resets):
'M997' is the command that triggers the board to reset. It resets almost immediately on receiving the command. My last test took 20 resets before it crashed but it's been as few as 1. I can reproduce the problem at will by running the code above for a few minutes
The board in this case is a BTT SKR v1.4 Turbo, which has an LPC1769 MCU. The board presents its on-board SD card as a USB storage device and a cdc_acm serial port to the host. I've had the same problem with other boards of a similar configuration.
Expected behaviour
A kernel panic should not occur after resetting the serial device
Actual behaviour
The system crashes with a kernel panic.
Kernel panic output captured from the serial console:
https://pastebin.com/zSiAAZCg
System
raspinfo output
https://pastebin.com/FyhjskHU
Which model of Raspberry Pi? e.g. Pi3B+, PiZeroW
Pi 3 model B
Which OS and version (
cat /etc/rpi-issue
)?vcgencmd version
)?uname -a
)?The text was updated successfully, but these errors were encountered: