Bug 121636 - (USB SCSI)Oops when writing to USB memory stick
(USB SCSI)Oops when writing to USB memory stick
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: kernel (Show other bugs)
rawhide
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Pete Zaitcev
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-04-24 06:13 EDT by Pawel Salek
Modified: 2007-11-30 17:10 EST (History)
0 users

See Also:
Fixed In Version: 2.6.5-1.349
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-05-06 14:25:03 EDT
Type: ---
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 Pawel Salek 2004-04-24 06:13:38 EDT
Description of problem:
Writing to an USB memory stick fails: kernel generates an oops. May be
related to not handled error reported by the kernel:
 drivers/usb/core/hub.c: USB device not accepting new address (error=-71)


Version-Release number of selected component (if applicable):
kernel-2.6.5-1.332

How reproducible:
Always

Steps to Reproduce:
1. connect the USB key
2. mount /dev/sda1 /mnt
3. cp -r directory /mnt - this will fail.
4. umount /mnt and disconnect
watch it oops after few seconds.

  
Actual results:
content of /var/log/messages:

Apr 24 11:47:38 pie kernel: USB Universal Host Controller Interface
driver v2.2
Apr 24 11:47:38 pie kernel: PCI: Found IRQ 11 for device 0000:00:07.2
Apr 24 11:47:38 pie kernel: PCI: Sharing IRQ 11 with 0000:00:03.0
Apr 24 11:47:38 pie kernel: PCI: Sharing IRQ 11 with 0000:00:03.1
Apr 24 11:47:38 pie kernel: uhci_hcd 0000:00:07.2: UHCI Host Controller
Apr 24 11:47:38 pie kernel: uhci_hcd 0000:00:07.2: irq 11, io base
0000dce0
Apr 24 11:47:38 pie kernel: uhci_hcd 0000:00:07.2: new USB bus
registered, assigned bus number 1
Apr 24 11:47:38 pie kernel: hub 1-0:1.0: USB hub found
Apr 24 11:47:38 pie kernel: hub 1-0:1.0: 2 ports detected
Apr 24 11:47:39 pie kernel: usb 1-1: new full speed USB device using
address 2
Apr 24 11:47:41 pie kernel: Initializing USB Mass Storage driver...
Apr 24 11:47:41 pie kernel: scsi0 : SCSI emulation for USB Mass
Storage devices
Apr 24 11:47:41 pie usb.agent[1519]: ... no modules for USB product
0/0/206
Apr 24 11:47:41 pie kernel:   Vendor: EXATEL    Model: i-BEAD100     
   Rev: 0001
Apr 24 11:47:41 pie kernel:   Type:   Direct-Access                  
   ANSI SCSI revision: 02
Apr 24 11:47:41 pie kernel: usbcore: registered new driver usb-storage
Apr 24 11:47:41 pie kernel: USB Mass Storage support registered.
Apr 24 11:47:42 pie kernel: SCSI device sda: 505856 512-byte hdwr
sectors (259 MB)
Apr 24 11:47:42 pie kernel: sda: assuming Write Enabled
Apr 24 11:47:42 pie kernel: sda: assuming drive cache: write through
Apr 24 11:47:42 pie kernel:  sda: sda1
Apr 24 11:47:42 pie kernel: Attached scsi removable disk sda at scsi0,
channel 0, id 0, lun 0
Apr 24 11:47:43 pie scsi.agent[1586]: disk at
/devices/pci0000:00/0000:00:07.2/usb1/1-1/1-1:1.0/host0/0:0:0:
0
Apr 24 11:50:15 pie kernel: eth0: New link status: Disconnected (0002)
Apr 24 11:50:16 pie kernel: eth0: New link status: Connected (0001)
Apr 24 11:54:19 pie kernel: drivers/usb/core/hub.c: USB device not
accepting new address (error=-71)
Apr 24 11:54:19 pie kernel: scsi: Device offlined - not ready after
error recovery: host 0 channel 0 id 0 lun 0
Apr 24 11:54:19 pie kernel: SCSI error : <0 0 0 0> return code = 0x50000
Apr 24 11:54:19 pie kernel: end_request: I/O error, dev sda, sector 576
Apr 24 11:54:19 pie kernel: Buffer I/O error on device sda1, logical
block 527
Apr 24 11:54:19 pie kernel: lost page write due to I/O error on sda1
Apr 24 11:54:19 pie kernel: scsi0 (0:0): rejecting I/O to offline device
Apr 24 11:54:19 pie kernel: Buffer I/O error on device sda1, logical
block 528
Apr 24 11:54:19 pie kernel: lost page write due to I/O error on sda1
Apr 24 11:54:19 pie kernel: Buffer I/O error on device sda1, logical
block 529
Apr 24 11:54:19 pie kernel: lost page write due to I/O error on sda1
.....

THE USB MEMORY KEY IS BEING PHYSICALLY DISCONNECTED HERE:
Apr 24 12:11:08 pie kernel: usb 1-1: USB disconnect, address 2
Apr 24 12:11:08 pie kernel: sd 0:0:0:0: Illegal state transition
offline->cancel
Apr 24 12:11:08 pie kernel: Badness in scsi_device_set_state at
drivers/scsi/scsi_lib.c:1640
Apr 24 12:11:08 pie kernel: Call Trace:
Apr 24 12:11:08 pie kernel:  [<0a852683>]
scsi_device_set_state+0xb4/0xbf [scsi_mod]
Apr 24 12:11:08 pie kernel:  [<0a84c601>]
scsi_device_cancel+0x26/0x1aa [scsi_mod]
Apr 24 12:11:08 pie kernel:  [<0221d0e3>] device_for_each_child+0x48/0x70
Apr 24 12:11:08 pie kernel:  [<0a84c7c2>]
scsi_device_cancel_cb+0x0/0xc [scsi_mod]
Apr 24 12:11:08 pie kernel:  [<0a84c7f1>] scsi_host_cancel+0x23/0x95
[scsi_mod]
Apr 24 12:11:08 pie kernel:  [<0225d2a0>] usb_buffer_free+0x23/0x26
Apr 24 12:11:08 pie kernel:  [<0a84c86d>] scsi_remove_host+0xa/0x3d
[scsi_mod]
Apr 24 12:11:08 pie kernel:  [<0a8f7bd2>] storage_disconnect+0x29/0x31
[usb_storage]
Apr 24 12:11:08 pie kernel:  [<0225c335>] usb_unbind_interface+0x2c/0x50
Apr 24 12:11:08 pie kernel:  [<0221dbfc>] device_release_driver+0x3c/0x46
Apr 24 12:11:08 pie kernel:  [<0221dcfc>] bus_remove_device+0x47/0x80
Apr 24 12:11:08 pie kernel:  [<0221d06a>] device_del+0x66/0x87
Apr 24 12:11:10 pie kernel:  [<0221d093>] device_unregister+0x8/0x10
Apr 24 12:11:11 pie kernel:  [<0226276d>] usb_disable_device+0x62/0x8a
Apr 24 12:11:11 pie kernel:  [<0225ccae>] usb_disconnect+0x9d/0xd2
Apr 24 12:11:12 pie kernel:  [<0225ec9a>]
hub_port_connect_change+0x4b/0x210
Apr 24 12:11:13 pie kernel:  [<0225f031>] hub_events+0x1d2/0x3fd
Apr 24 12:11:13 pie kernel:  [<0225f27a>] hub_thread+0x1e/0xd0
Apr 24 12:11:14 pie kernel:  [<0211a4f6>] default_wake_function+0x0/0xc
Apr 24 12:11:15 pie kernel:  [<0225f25c>] hub_thread+0x0/0xd0
Apr 24 12:11:15 pie kernel:  [<021041d9>] kernel_thread_helper+0x5/0xb
Apr 24 12:11:33 pie kernel: 
Apr 24 12:11:33 pie kernel: sd 0:0:0:0: Illegal state transition
offline->cancel
Apr 24 12:11:33 pie kernel: Badness in scsi_device_set_state at
drivers/scsi/scsi_lib.c:1640
Apr 24 12:11:33 pie kernel: Call Trace:
Apr 24 12:11:33 pie kernel:  [<0a852683>]
scsi_device_set_state+0xb4/0xbf [scsi_mod]
Apr 24 12:11:33 pie kernel:  [<0a854629>] scsi_remove_device+0xe/0x7c
[scsi_mod]
Apr 24 12:11:34 pie kernel:  [<0a853d28>] scsi_forget_host+0x107/0x206
[scsi_mod]
Apr 24 12:11:34 pie kernel:  [<0a84c87b>] scsi_remove_host+0x18/0x3d
[scsi_mod]
Apr 24 12:11:34 pie kernel:  [<0a8f7bd2>] storage_disconnect+0x29/0x31
[usb_storage]
Apr 24 12:11:34 pie kernel:  [<0225c335>] usb_unbind_interface+0x2c/0x50
Apr 24 12:11:34 pie kernel:  [<0221dbfc>] device_release_driver+0x3c/0x46
Apr 24 12:11:34 pie kernel:  [<0221dcfc>] bus_remove_device+0x47/0x80
Apr 24 12:11:34 pie kernel:  [<0221d06a>] device_del+0x66/0x87
Apr 24 12:11:34 pie kernel:  [<0221d093>] device_unregister+0x8/0x10
Apr 24 12:11:34 pie kernel:  [<0226276d>] usb_disable_device+0x62/0x8a
Apr 24 12:11:34 pie kernel:  [<0225ccae>] usb_disconnect+0x9d/0xd2
Apr 24 12:11:34 pie kernel:  [<0225ec9a>]
hub_port_connect_change+0x4b/0x210
Apr 24 12:11:34 pie kernel:  [<0225f031>] hub_events+0x1d2/0x3fd
Apr 24 12:11:34 pie kernel:  [<0225f27a>] hub_thread+0x1e/0xd0
Apr 24 12:11:34 pie kernel:  [<0211a4f6>] default_wake_function+0x0/0xc
Apr 24 12:11:34 pie kernel:  [<0225f25c>] hub_thread+0x0/0xd0
Apr 24 12:11:34 pie kernel:  [<021041d9>] kernel_thread_helper+0x5/0xb


Expected results:
The copy should be successful as it was with 2.4.x kernels.
Comment 1 Pawel Salek 2004-05-01 17:18:50 EDT
FWIW, the same happens with kernel-2.6.5-1.327.
Comment 2 Pawel Salek 2004-05-06 14:25:03 EDT
Appears to be fixed in kernel-2.6.5-1.349. Well done!

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