I figured this is a problem with the USB driver. Fortunately in Linux, we can disable a feature (UAS) and things work fine afterwards. I have not had a single crash since then, nor have I seen any performance impact.
This is not specific to raspberry pi, this is a Linux issue. It happened on all my machines (all GNU/Linux) when doing long data transfer across the USB hub. This should work for any USB device.
Parameters corresponding to each device can be found with the lsusb program, replace with your own identifiers.
In my case here are the devices that caused problems: ORICO 3588US3-V1-EU-BK (SATA to USB enclosure for SATA HDD), X820 V3.0 by Suptronics (more product info here)
One of two solutions here:
1) modprobe options for initramfs building:
2) or directly as a kernel parameter (either in /etc/default/grub.conf or for raspberry pi, in /boot/cmdline.txt)
Code: Select all
-> % cat /etc/modprobe.d/usb_hdd_workaround.conf # Disable UAS for Orico sata to usb adapter options usb-storage quirks=0080:a001:u # Disable UAS for HDD connected through X820 options usb-storage quirks=138c:55aa:u
Code: Select all
As another example, another device that caused problem was the ASMT1051 (ASMedia Technology) SATA to USB adapter, of which the identifiers is 174c:55aa.
Here are some examples of error messages (to ease searching for the issue):
I hope this helps someone else having this problem. It took me days to figure it out. Thankfully, Linux is really flexible and well designed. :)rpi kernel: INFO: task jbd2/dm-0-8:277 blocked for more than 120 seconds.
rpi kernel: Not tainted 4.14.98-v7+ #1200
rpi kernel: "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
rpi kernel: jbd2/dm-0-8 D 0 277 2 0x00000000
rpi kernel: [<807a2ed0>] (__schedule) from [<807a3538>] (schedule+0x50/0xa8)
rpi kernel: [<807a3538>] (schedule) from [<8037bff8>] (jbd2_journal_commit_transaction+0x1fc/0x17f0)
rpi kernel: [<8037bff8>] (jbd2_journal_commit_transaction) from [<803826fc>] (kjournald2+0x110/0x2c0)
rpi kernel: [<803826fc>] (kjournald2) from [<8013de24>] (kthread+0x13c/0x16c)
rpi kernel: [<8013de24>] (kthread) from [<801080ac>] (ret_from_fork+0x14/0x28)