New: USB memory stick moved to different device on error / may be due to problem with high concurrent load on two USB devices
http://bugzilla.kernel.org/show_bug.cgi?id=12730
Summary: USB memory stick moved to different device on error /
may be due to problem with high concurrent load on two USB devices
Product: IO/Storage
Version: 2.5
KernelVersion: 2.6.27.17
Platform: All
OS/Version: Linux
Tree: Mainline
Status: NEW
Severity: normal
Priority: P1
Component: SCSI
AssignedTo: [email protected]
ReportedBy: [email protected]
Latest working kernel version: No idea
Earliest failing kernel version: No idea
Distribution: Debian Lenny
Hardware Environment: USB is EHCI by ATI/AMD SB600. CPU is a single core Sempron LE-1250
Software Environment: dd_rescue and a self-written flash exerciser Problem Description: I have a 2GB flash as /dev/sdd and a 16GB flash as /dev/sde. The 2 GB is exercised by a tester that writes and verifies. (This is intended to be run until there are read errors. I expect that may take up to a year or longer.) The 16GB I wanted to do a speed test using dd_rescue /dev/sde /dev/null. It seems this somehow caused a problem leadung to high volume console output and USB disconnects for both devices (found in the logs).
I have tried the read from the 16GB without the exerciser running, this seems to work. Unfortunately I did not find any error diagnotics in the logs besides the USB disconnect, at least not anythign I recognized. What I did should not have caused USB disconnects in the first place, so this may also be an USB driver problem or the like.
Now the interesting thing is that the kernel seems to have disabled /dev/sdd and used the 16GB flash as new /dev/sdd. The 2GB flash did not turn up again. Not good, devices should not change without an explicit re-plug.
If an USB disconnect is indistinguishable in software from a physical unplug and replug, I understand that nothing can be done. But if it can be distinguished, devices should be prevented from moving around on error.
Steps to reproduce: I tried to run this again. Just a reading of the 16GB flash with dd_rescue did not produce any problems. Starting the flash exerciser again after replugging both flash devices to get them to their original devices worked. I could not recreate the original situation, since the port with the 2GB device was now only using OHCI and a reboot on this machine causes some effort. This may therefore also be an USB driver issue with the EHCI driver being crashy.
Signature · 3 lines
Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.
[Bug 12730] USB memory stick moved to different device on error / may be due to problem with high concurrent load on two USB devices
http://bugzilla.kernel.org/show_bug.cgi?id=12730
------- Comment #1 from [email protected] 2009-02-17 14:26 ------- from /var/log/messages. Sorry for the line mangling.
Feb 17 21:04:10 gate kernel: usb 1-1: new high speed USB device using ehci_hcd and address 4 Feb 17 21:04:10 gate kernel: usb 1-1: configuration #1 chosen from 1 choice Feb 17 21:04:10 gate kernel: scsi5 : SCSI emulation for USB Mass Storage devices Feb 17 21:04:16 gate kernel: scsi 5:0:0:0: Direct-Access TDKMedia Trans-It Drive PMAP PQ: 0 ANSI: 0 CCS Feb 17 21:04:17 gate kernel: sd 5:0:0:0: [sde] 31260672 512-byte hardware sectors (16005 MB) Feb 17 21:04:17 gate kernel: sd 5:0:0:0: [sde] Write Protect is off Feb 17 21:04:20 gate kernel: sd 5:0:0:0: [sde] 31260672 512-byte hardware sectors (16005 MB) Feb 17 21:04:20 gate kernel: sd 5:0:0:0: [sde] Write Protect is off Feb 17 21:04:20 gate kernel: sde: sde1 Feb 17 21:04:20 gate kernel: sd 5:0:0:0: [sde] Attached SCSI removable disk Feb 17 21:04:20 gate kernel: sd 5:0:0:0: Attached scsi generic sg4 type 0 Feb 17 22:07:04 gate kernel: usb 1-1: USB disconnect, address 4 Feb 17 22:07:04 gate kernel: sd 5:0:0:0: [sde] Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK,SUGGEST_OK Feb 17 22:07:05 gate last message repeated 9 times Feb 17 22:07:05 gate kernel: usb 1-2: reset high speed USB device using ehci_hcd and address 3 Feb 17 22:07:09 gate kernel: __ratelimit: 24335 callbacks suppressed Feb 17 22:07:10 gate kernel: sd 4:0:0:0: [sdd] Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK,SUGGEST_OK Feb 17 22:07:10 gate last message repeated 4 times Feb 17 22:07:10 gate kernel: usb 1-1: new high speed USB device using ehci_hcd and address 5 Feb 17 22:07:10 gate kernel: usb 1-1: configuration #1 chosen from 1 choice Feb 17 22:07:10 gate kernel: scsi6 : SCSI emulation for USB Mass Storage devices Feb 17 22:07:10 gate kernel: usb 1-2: USB disconnect, address 3 Feb 17 22:07:14 gate kernel: __ratelimit: 24767 callbacks suppressed Feb 17 22:07:15 gate kernel: scsi 6:0:0:0: Direct-Access TDKMedia Trans-It Drive PMAP PQ: 0 ANSI: 0 CCS Feb 17 22:07:15 gate kernel: sd 6:0:0:0: [sdd] 31260672 512-byte hardware sectors (16005 MB) Feb 17 22:07:15 gate kernel: sd 6:0:0:0: [sdd] Write Protect is off Feb 17 22:07:15 gate kernel: sd 6:0:0:0: [sdd] 31260672 512-byte hardware sectors (16005 MB) Feb 17 22:07:15 gate kernel: sd 6:0:0:0: [sdd] Write Protect is off Feb 17 22:07:15 gate kernel: sdd: unknown partition table Feb 17 22:07:15 gate kernel: sd 6:0:0:0: [sdd] Attached SCSI removable disk Feb 17 22:07:15 gate kernel: sd 6:0:0:0: Attached scsi generic sg3 type 0 Feb 17 22:07:19 gate kernel: __ratelimit: 24396 callbacks suppressed Feb 17 22:07:24 gate kernel: __ratelimit: 23645 callbacks suppressed Feb 17 22:07:29 gate kernel: __ratelimit: 21585 callbacks suppressed
Signature · 3 lines
Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.
[Bug 12730] USB memory stick moved to different device on error / may be due to problem with high concurrent load on two USB devices
In reply to [email protected]http://bugzilla.kernel.org/show_bug.cgi?id=12730
[email protected] changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |[email protected]
------- Comment #2 from [email protected] 2009-02-18 07:19 ------- Unfortunately, a lot of EHCI hardware seems to have trouble carrying out transfers over different ports concurrently.
Your log doesn't contain enough information to tell just what happened. If you want more information, you can build a kernel with CONFIG_USB_DEBUG enabled. There may or may not have been an actual USB disconnect. (Such an electronic disconnect is indeed indistinguishable from a physical unplug.)
The log shows that the 1-2 drive got into an error state requiring a reset; quite possibly the reset failed. This leaves the kernel no choice but to carry out a "logical" disconnect. While it's not exactly the same as a physical disconnect, it is treated the same way and so it is indistinguishable as far as most of the kernel is concerned.
It's impossible to tell whether the error state was caused by the drive or by the EHCI controller. To find out for certain, you'd have to use a USB bus analyzer.
Signature · 3 lines
Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.
[Bug 12730] USB memory stick moved to different device on error / may be due to problem with high concurrent load on two USB devices
In reply to [email protected]http://bugzilla.kernel.org/show_bug.cgi?id=12730
------- Comment #3 from [email protected] 2009-02-18 10:32 ------- Ok, so this is a known issue with AHCI hardware. I think I till pass on the debug-kernel.
Anyways, thanks for the info. I will just be careful with raw access to USB devices. Mounted ones should not be that critical, since they will not remount themselves.
Signature · 3 lines
Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.
[Bug 12730] USB memory stick moved to different device on error / may be due to problem with high concurrent load on two USB devices
In reply to [email protected]http://bugzilla.kernel.org/show_bug.cgi?id=12730
------- Comment #4 from [email protected] 2009-03-12 08:55 ------- A patch was accepted recently which just might have some effect on this problem:
Signature · 3 lines
Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.
[Bug 12730] USB memory stick moved to different device on error / may be due to problem with high concurrent load on two USB devices
In reply to [email protected]http://bugzilla.kernel.org/show_bug.cgi?id=12730
Alan <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |[email protected]
Resolution| |INSUFFICIENT_DATA
Regression|--- |No--- Comment #5 from Alan <[email protected]> 2010-01-25 14:49:37 --- Closing old stale bugs
Signature · 3 lines
Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug.
[Bug 12730] USB memory stick moved to different device on error / may be due to problem with high concurrent load on two USB devices
In reply to [email protected]http://bugzilla.kernel.org/show_bug.cgi?id=12730
Alan <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |CLOSED
Signature · 3 lines
Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug.