Red Hat Bugzilla – Bug 1289012
usb reset causes data corruption bug
Last modified: 2016-10-18 10:35:07 EDT
Description of problem:
I have a MacBook Pro from 2015, which has a SD card reader attached off a USB3 internal port.
Unfortunately, it seems this is not playing well with the usb subsystem in the kernel: every few seconds the device resets, which interrupts and truncates the block ongoing operation, which in turns causes e2fsck and the ext4 fs to report spurious block errors or even corrupt the filesystem.
I see this in the logs:
Dec 07 00:39:48 giovanni-macbook kernel: usb 2-4: Disable of device-initiated U1 failed.
Dec 07 00:39:53 giovanni-macbook kernel: usb 2-4: Disable of device-initiated U2 failed.
Dec 07 00:39:54 giovanni-macbook kernel: usb 2-4: reset SuperSpeed USB device number 3 using xhci_hcd
Dec 07 00:39:54 giovanni-macbook kernel: sd 2:0:0:0: [sdb] FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK
Dec 07 00:39:54 giovanni-macbook kernel: sd 2:0:0:0: [sdb] CDB: Read(10) 28 00 00 02 00 10 00 00 08 00
Dec 07 00:39:54 giovanni-macbook kernel: blk_update_request: I/O error, dev sdb, sector 131088
Repeated every about 30s for random blocks. Every usb reset is followed by a sd failure and a IO error, which causes e2fsck to prompt
Version-Release number of selected component (if applicable):
Always, with this SD card.
Steps to Reproduce:
1. Insert SD card
2. Watch USB errors in the logs
3. Cry for corrupted filesystem from bogus attempts to replay the journal
For the record, this has gotten worse with kernel 4.4.6-301.fc23.x86_64, now it resets before the userspace has even a chance to see the device (but right after corrupting the fs, just in case).
*********** MASS BUG UPDATE **************
We apologize for the inconvenience. There is a large number of bugs to go through and several of them have gone stale. Due to this, we are doing a mass bug update across all of the Fedora 23 kernel bugs.
Fedora 23 has now been rebased to 4.7.4-100.fc23. Please test this kernel update (or newer) and let us know if you issue has been resolved or if it is still present with the newer kernel.
If you have moved on to Fedora 24 or 25, and are still experiencing this issue, please change the version to Fedora 24 or 25.
If you experience different issues, please open a new bug report for those.
I have moved to Fedora 25 meanwhile, and I cannot verify if this is fixed on recent kernels, because the kernel no longer sees the card reader at all.
Thank you for letting us know. I am going to close the bug. If you see the problem again, please reopen.