One of my Raspberry Pi 4's was crashing mysteriously every few weeks. I'd get this error message
kex_exchange_identification: Connection closed by remote host
when trying to log in. It would respond to pings, though,
so something was still up.
That particular Pi is booting from a USB device. I
had reason to believe that the device was going into
read-only mode when it crashed. This led me to detailed
examination of the dmesg
logs after a reboot - usually
nothing untoward was showing up.
Lately though I have seen something like this in the dmesg
log:
uas_eh_abort_handler 0 uas-tag 6 inflight: CMD OUT
If you go down the UAS rabbit hole, you'll find that
some devices support it well, and other devices have
buggy hardware/firmware/drivers that will trigger errors.
This list from the Sunxi wiki
is a useful reference. If you don't want to go down the rabbit
hole, the relatively straightforward thing to try is
to disable the UAS driver using a usb-storage.quirks
setting in your blacklists or in cmdline.txt.
The Raspberry Pi Forum post on USB3.0 SSDs
will be what you want to look at - it goes into lots of
detail for describing how to determine the parameters
for the quirks setting. I used lsusb
myself. What
matters is that you may need to disable UAS and
replace it with the older usb-storage driver which
is said to be a bit slower but more reliable on some
hardware.
The Pi was only locking up every month or so - as a consequence I am not 100% sure yet that this fix is the only change I'll need to make. But it does look like progress!
Comments