- 
                Notifications
    
You must be signed in to change notification settings  - Fork 1.7k
 
Description
USB Drive Resetting Raspberry Pi 3A+
Is this the right place for my bug report?
Hopefully? I got here by searching on google for other issues like mine, and there were a few similar ones on this GitHub issues page. Let me know if this is the wrong place and I'll move/remove it
Describe the bug
When doing IO reads and writes to a USB drive connected to my Pi 3A+, it will often "reset", and eventually stop working altogether
To reproduce
My original use case was to mount the USB drive, and then run yt-dlp inside that folder. The ffmpeg merging process is the most disk intensive part
It can be reproduced relatively easily with fio however:
fio --name=usbseq --filename=test.test --size=1G --rw=readwrite --bs=1M --direct=1 --numjobs=1 --iodepth=16 --group_reporting --time_based --runtime=3600
Expected behaviour
No resets or freezes
Actual behaviour
There will periodically be USB resets in dmesg:
[ 1989.644713] WARN::dwc_otg_hcd_urb_dequeue:639: Timed out waiting for FSM NP transfer to complete on 4
[ 1989.644818] Indeed it is in host mode hprt0 = 00001101
[ 1989.824290] usb 1-1: reset high-speed USB device number 2 using dwc_otg
[ 1989.824400] Indeed it is in host mode hprt0 = 00001101
[ 1990.020861] sd 0:0:0:0: [sda] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x03 driverbyte=DRIVER_OK cmd_age=31s
[ 1990.020883] sd 0:0:0:0: [sda] tag#0 CDB: opcode=0x28 28 00 00 58 06 40 00 00 f0 00
[ 1990.020890] I/O error, dev sda, sector 5768768 op 0x0:(READ) flags 0x84700 phys_seg 16 prio class 0
And eventually it stops working altogether as can be seen in journalctl:
Aug 20 21:25:18 raspberrypi kernel: I/O error, dev sda, sector 201982016 op 0x0:(READ) flags 0x84700 phys_seg 16 prio class 0
System
- Pi 3A+
 Raspberry Pi reference 2025-05-13Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, 5dabc7dc940059dfbc46af5d97b60a1e812523dd, stage2- Firmware: 
5560078dcc8591a00f57b9068d13e5544aeef3aa - Kernel: 
Linux raspberrypi 6.12.34+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.12.34-1+rpt1~bookworm (2025-06-26) aarch64 GNU/Linux 
Logs
dmesg: https://pastecode.io/s/nfcwk4zf
journalctl: https://pastecode.io/s/6xs8r5e2
Additional context
- I don't believe it's a power issue as running badblocks didn't cause any issues, also it's just a USB flash drive, not an external HDD or SSD
 - I ruled out the USB drive being the issue by running badblocks on it, which found no errors.
 - It doesn't appear to happen on my Raspberry Pi 3B+, the same 
fiotest ran for 2 hours with no resets - At the end of my journalctl dump, there is a crash/stack trace. That's not related to this issue, I caused that by trying to reset the USB port remotely