Bug 1289012 - usb reset causes data corruption bug
usb reset causes data corruption bug
Status: CLOSED INSUFFICIENT_DATA
Product: Fedora
Classification: Fedora
Component: kernel (Show other bugs)
23
x86_64 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Kernel Maintainer List
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-12-07 03:52 EST by Giovanni Campagna
Modified: 2016-10-18 10:35 EDT (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-10-18 10:35:07 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Giovanni Campagna 2015-12-07 03:52:54 EST
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):
4.2.6-301.fc23.x86_64

How reproducible:
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
Comment 1 Giovanni Campagna 2016-04-11 14:11:05 EDT
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).
Comment 2 Laura Abbott 2016-09-23 15:24:39 EDT
*********** 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.
Comment 3 Giovanni Campagna 2016-10-18 00:34:39 EDT
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.
Comment 4 Laura Abbott 2016-10-18 10:35:07 EDT
Thank you for letting us know. I am going to close the bug. If you see the problem again, please reopen.

Note You need to log in before you can comment on or make changes to this bug.