Bug 331291

Summary: Pluging in an USB device resulting to possible data/filesystem corruption on USB attached storage
Product: [Fedora] Fedora Reporter: Vaclav Fiala <fedex>
Component: kernelAssignee: Pete Zaitcev <zaitcev>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: low    
Version: 7CC: cebbert, chris.brown, davej, fedex
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-01-14 18:43:47 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Vaclav Fiala 2007-10-14 11:56:47 UTC
Description of problem:
Lost/corruption of data on external USB attached disk drive after plugging in a 
new usb device.

Version-Release number of selected component (if applicable):
2.6.22.9-91.fc7

How reproducible:
Mount a filesystem on external USB disk. Run some processes writing to/working 
with this filesystem. Plug in some other USB device IE flash-disk. Than things 
can go terribly wrong. Example - log mesages:

Oct 14 11:07:52 proper kernel: usb 3-5: new high speed USB device using 
ehci_hcd and address 3
Oct 14 11:07:52 proper kernel: usb 3-5: unable to read config index 0 
descriptor/all
Oct 14 11:07:52 proper kernel: usb 3-5: can't read configurations, error -71
Oct 14 11:07:52 proper kernel: usb 3-3: reset high speed USB device using 
ehci_hcd and address 2
Oct 14 11:07:52 proper kernel: usb 3-5: new high speed USB device using 
ehci_hcd and address 4
Oct 14 11:07:52 proper kernel: usb 3-5: unable to read config index 0 
descriptor/start
Oct 14 11:07:53 proper kernel: usb 3-5: chopping to 0 config(s)
Oct 14 11:07:53 proper kernel: usb 3-5: string descriptor 0 read error: -71
Oct 14 11:07:53 proper kernel: usb 3-5: string descriptor 0 read error: -71
Oct 14 11:07:53 proper kernel: usb 3-5: no configuration chosen from 0 choices
Oct 14 11:07:53 proper kernel: usb 3-3: reset high speed USB device using 
ehci_hcd and address 2
Oct 14 11:08:39 proper kernel: usb 3-5: USB disconnect, address 4
Oct 14 11:08:41 proper kernel: usb 3-6: new high speed USB device using 
ehci_hcd and address 5
Oct 14 11:08:41 proper kernel: usb 3-6: unable to read config index 0 
descriptor/all
Oct 14 11:08:41 proper kernel: usb 3-6: can't read configurations, error -71
Oct 14 11:08:41 proper kernel: usb 3-3: reset high speed USB device using 
ehci_hcd and address 2
Oct 14 11:08:41 proper kernel: usb 3-6: new high speed USB device using 
ehci_hcd and address 6
Oct 14 11:08:42 proper kernel: usb 3-6: unable to read config index 0 
descriptor/start
Oct 14 11:08:42 proper kernel: usb 3-6: chopping to 0 config(s)
Oct 14 11:08:42 proper kernel: usb 3-6: string descriptor 0 read error: -71
Oct 14 11:08:42 proper kernel: usb 3-6: string descriptor 0 read error: -71
Oct 14 11:08:42 proper kernel: usb 3-6: no configuration chosen from 0 choices
Oct 14 11:08:42 proper kernel: usb 3-3: reset high speed USB device using 
ehci_hcd and address 2
Oct 14 11:09:42 proper kernel: usb 3-3: reset high speed USB device using 
ehci_hcd and address 2
Oct 14 11:09:52 proper kernel: usb 3-3: reset high speed USB device using 
ehci_hcd and address 2
Oct 14 11:10:33 proper kernel: FAT: Filesystem panic (dev sdc2)
Oct 14 11:10:33 proper kernel:     invalid access to FAT (entry 0x03edb034)
Oct 14 11:10:33 proper kernel:     File system has been set read-only
Oct 14 11:10:34 proper kernel: FAT: Filesystem panic (dev sdc2)
Oct 14 11:10:34 proper kernel:     invalid access to FAT (entry 0x03edb034)
Oct 14 11:10:34 proper kernel: FAT: Filesystem panic (dev sdc2)
Oct 14 11:10:34 proper kernel:     invalid access to FAT (entry 0x03edb034)
Oct 14 11:10:34 proper kernel: FAT: Filesystem panic (dev sdc2)


Steps to Reproduce:
1.Mount a filesystem on external USB harddisk.
2.Run some processes writing to/working with this filesystem
3.Plug in various usb devices
4.Expect bad things to happen.
  
Actual results:
File system corruption. Data loss.

Expected results:
None of above.

Additional info:
More than willing to submit additional information about system if required.
There were two filesystems on the disk drive (ext3 and vfat) both ended up 
corrupted. According to /sbin/blkid file system type of ext3 volume was changed 
to ext2 and UUID information was lost.

Comment 1 Vaclav Fiala 2007-10-14 12:15:19 UTC
Other type of log entries:

Oct 14 11:10:47 proper kernel: attempt to access beyond end of device
Oct 14 11:10:47 proper kernel: sdc1: rw=0, want=21369400136, limit=614405862
Oct 14 11:10:47 proper kernel: attempt to access beyond end of device
Oct 14 11:10:47 proper kernel: sdc1: rw=0, want=21369400136, limit=614405862
Oct 14 11:10:47 proper kernel: attempt to access beyond end of device
Oct 14 11:10:47 proper kernel: sdc1: rw=0, want=21369400136, limit=614405862
Oct 14 11:10:47 proper kernel: attempt to access beyond end of device
Oct 14 11:10:47 proper kernel: sdc1: rw=0, want=21369400136, limit=614405862
Oct 14 11:10:47 proper kernel: attempt to access beyond end of device
Oct 14 11:10:47 proper kernel: sdc1: rw=0, want=21369400136, limit=614405862
Oct 14 11:10:47 proper kernel: attempt to access beyond end of device
Oct 14 11:10:47 proper kernel: sdc1: rw=0, want=21369400136, limit=614405862
Oct 14 11:10:47 proper kernel: attempt to access beyond end of device
Oct 14 11:10:47 proper kernel: sdc1: rw=0, want=21369400136, limit=614405862
Oct 14 11:10:47 proper kernel: attempt to access beyond end of device
Oct 14 11:10:47 proper kernel: sdc1: rw=0, want=21369400136, limit=614405862
Oct 14 11:10:47 proper kernel: attempt to access beyond end of device
Oct 14 11:10:47 proper kernel: sdc1: rw=0, want=21369400136, limit=614405862
Oct 14 11:10:47 proper kernel: attempt to access beyond end of device
Oct 14 11:10:47 proper kernel: sdc1: rw=0, want=21369400136, limit=614405862

Comment 2 Pete Zaitcev 2007-10-15 22:27:16 UTC
I don't think I can do anything about this. It's just a bad device which
disrupts the bus. Obviously the other devices are going to be affected.

Comment 3 Vaclav Fiala 2007-10-17 19:36:31 UTC
It's definitely a possibility, but this actualy happend twice to me. First time 
it was with DVB-T USB Dongle, this time a regular USB flash disk. First time i 
just blamed the linux driver for that dongle (my fault). I would realy like to 
identyfy the faulty device. Now I'm mostly suspecting a disk enclosure (AKASA 
Integral P2 E-SATA) or USB host controler itself. If it's just a one faulty 
device it's OK, but if it's a design flaw it could actualy save a lots of 
people some headache.

Comment 4 Christopher Brown 2008-01-14 18:43:47 UTC
Hello Vaclav,

I'm reviewing this bug as part of the kernel bug triage project, an attempt to
isolate current bugs in the Fedora kernel.

http://fedoraproject.org/wiki/KernelBugTriage

I'm closing this NOTABUG as the kernel is not at fault here. Thank you for
taking the time to file originally anyway.