-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
System crash after some heavy usb serial usage #3720
Comments
There was a firmware released yesterday - available using "sudo rpi-update" - which fixed a potential problem with USB interrupts. You can update the firmware and leave the kernel if you use "sudo SKIP_KERNEL=1 rpi-update". Alternatively, download the files |
This is reported against the Ubuntu kernel so should be reported in launchpad. @Tangerino Can you run 'apport-bug linux' on the affected system? |
The system does not exist anymore. I'll rebuild the device and test it again. |
We are talking about Ubuntu here, right? |
|
@Tangerino rpi-update is not available on Ubuntu and even if it were it wouldn't work. Ubuntu uses flash-kernel (and u-boot) which wants the firmware in /boot/firmware and not /boot. I've confirmed the problem (on Ubuntu) and there is already another bug that looks similar/identical: https://bugs.launchpad.net/ubuntu/+source/linux-raspi/+bug/1880388 |
rpi-update is only a curl or wget away:
As the documentation says:
|
@pelwell Ah, nice. Thanks for the info! |
I can reproduce this on Ubuntu but not on the Raspberry Pi OS, both running 5.4 kernels and the same firmware version. @pelwell I think you can close this ticket as Raspberry Pi OS doesn't seem to be affected. However, it looks like it's a config option that we have (or not) set on Ubuntu. Do you have any idea which areas I should be focusing on trying to track this down? |
In rpi-5.4.y we switched from bcm2835-cpufreq to the upstream raspberrypi-cpufreq, on all Pis except those using BCM2835, i.e.
|
Any action for me here? |
It turns out that the preemption model makes a difference. Raspberry Pi OS uses 'Low-latency Desktop' whereas Ubuntu uses 'Desktop'. If I switch Ubuntu to 'Low-level Desktop' the problem goes away. If I switch the Raspberry Pi OS kernel to 'Desktop' it fails as well. I cannot reproduce this on arm 32-bit. It looks like something's not right with the calls of local_fiq_{enable,disable} in dwc_otg_read_common_intr(). These calls are noops on arm 32-bit which would explain why the problem doesn't show there. FWIW, the current Raspberry Pi OS 5.4.51-v8+ kernel spits out the following during boot after enabling DEBUG_ATOMIC_SLEEP. IMO that's a problem that needs fixing. Jul 17 11:34:16 rpi-3b-plus-rev1d3-abfb kernel: [ 2.726241] BUG: sleeping function called from invalid context at kernel/irq/manage.c:137 And with the 'Desktop' preemption model and PROVE_LOCKING enabled I also get: [ 4.937147] ================================ [ 5.344862] CPU0 [ 5.412152] 4 locks held by kworker/1:1/31: This is probably a fallout of the above atomic sleep problem and eventually kills the machine. The above are all reported during boot before any real tests are exercised. To reproduce the hang: Connect a USB/serial adapter to the Pi, run 'minicom -D /dev/ttyUSB0' and send data from another device. With 'Desktop' preemption, the Pi hangs within seconds. |
FWIW, I can get rid of the above warnings when using dwc_otg.fiq_enable=0 and dwc_otg.fiq_fsm_enable=0 and the machine stays up even with 'Desktop' preemption. |
It's probably worth trying |
dwc2 works as well. What's the difference between upstream dwc2 and Raspberry Pi's dwcotg? FIQ acceleration only? |
dwc2 has support for gadget mode and benefits from upstream maintenance and bug fixing, dwc_otg has FIQ acceleration. |
After:
and add to the file
The tests are running for over 12 hours |
Describe the bug
System crashes while using ttyUSB0
To reproduce
Brand new SD card with Ubuntu Focal 20.04 LTS
All packages up to date
This is my test program
Expected behaviour
Keep running forever
Actual behaviour
The systems freeze. I was able to verify some behavior only using a terminal and keyboard
System
Which model of Raspberry Pi? e.g. Pi3B+, PiZeroW
Pi3B V2.1
Which OS and version (
cat /etc/rpi-issue
)?Ubuntu Focal 20.04 LTS
Which firmware version (
vcgencmd version
)?Which kernel version (
uname -a
)?linux Ubuntu 5.4.0-1013-raspi sound/arm/Makefile out of sync with drivers/misc/vc04_services/Makefile #13
DTDI USB driver for /dev/ttyUSB0
Logs
First error was:
Second error, after few seconds
The text was updated successfully, but these errors were encountered: