I'm using Debian 2.6.8. I connected and mounted my iRiver USB as a UMS device, copied some files, and unmounted the driver, and disconnected the device. I'm having some problems, not just using the device but figuring out how to debug the problem.

The file /proc/bus/usb/device can't be read. "lsusb" hangs forever, but of course that's just trying to read the same file.

kill -KILL of "lsusb" doesn't work. Trying to remove the usb_storage or sd_mod modules also fails.

Any suggestions on how to release these modules?

I suspect that what happened is a race condition -- the command "umount" completed on the terminal but not on the device itself.

two attachments: lsmod, and some odd stuff in /var/log/messages:

# lsmod
Module                  Size  Used by
ipt_TCPMSS              4480  0
iptable_filter          2944  0
nls_iso8859_1           4096  1
vfat                   14656  1
fat                    46720  1 vfat
nls_cp437               5760  1
isofs                  37752  0
usb_storage            68608  4294967292
bcm5700               137900  0
ipt_mark                1792  1
ipt_length              1792  1
ipt_dscp                1792  1
ipt_MARK                2176  17
cls_fw                  4992  7
sch_sfq                 5568  7
sch_htb                25344  1
iptable_mangle          2944  1
ip_tables              18368  7 
ipt_TCPMSS,iptable_filter,ipt_mark,ipt_length,ipt_dscp,ipt_MARK,iptable_mangle
smbfs                  69560  2
ide_cd                 42528  0
sr_mod                 17444  0
cdrom                  40284  2 ide_cd,sr_mod
sg                     38880  0
radeon                130916  2
lp                     10920  0
apm                    21036  2
ipv6                  262340  21
snd_via82xx            29604  3
snd_ac97_codec         69572  1 snd_via82xx
snd_pcm_oss            54312  0
snd_mixer_oss          19904  1 snd_pcm_oss
snd_pcm                97480  3 snd_via82xx,snd_pcm_oss
snd_timer              25540  1 snd_pcm
snd_page_alloc         11720  2 snd_via82xx,snd_pcm
gameport                4736  1 snd_via82xx
snd_mpu401_uart         8000  1 snd_via82xx
snd_rawmidi            25380  1 snd_mpu401_uart
snd_seq_device          8264  1 snd_rawmidi
snd                    57380  14 
snd_via82xx,snd_ac97_codec,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_timer,snd_mpu401_uart,snd_rawmidi,snd_seq_devicesoundcore
              10400  1 snd
via_ircc               26448  0
irda                  195712  1 via_ircc
crc_ccitt               2176  1 irda
ehci_hcd               31364  0
uhci_hcd               32784  0
usbcore               118308  5 usb_storage,ehci_hcd,uhci_hcd
sata_promise           10052  0
ohci1394               35588  0
ieee1394              111352  1 ohci1394
pci_hotplug            34352  0
via_agp                 9088  1
agpgart                34536  2 via_agp
pcspkr                  3688  0
tsdev                   7360  0
mousedev               10444  2
psmouse                20232  0
parport_pc             35328  1
parport                41544  2 lp,parport_pc
evdev                   9600  0
dm_mod                 59580  0
capability              4616  0
commoncap               7296  1 capability
af_packet              22600  0
rtc                    12728  0
ext2                   71720  2
ext3                  126760  0
jbd                    61784  1 ext3
mbcache                 9220  2 ext2,ext3
ide_generic             1472  0
via82cxxx              14044  1
ide_disk               19264  4
ide_core              138788  5 usb_storage,ide_cd,ide_generic,via82cxxx,ide_disk
sd_mod                 21632  1
ata_piix                8196  0
libata                 41348  2 sata_promise,ata_piix
scsi_mod              124748  6 usb_storage,sr_mod,sg,sata_promise,sd_mod,libata
unix                   28596  744
font                    8448  0
vesafb                  6688  0
cfbcopyarea             3776  1 vesafb
cfbimgblt               3072  1 vesafb
cfbfillrect             3712  1 vesafb

from /var/log/messages:
Oct 29 10:00:26 bagpipes kernel: usb 4-3: new high speed USB device using address 5
Oct 29 10:00:26 bagpipes kernel: scsi5 : SCSI emulation for USB Mass Storage devices
Oct 29 10:00:26 bagpipes kernel:   Vendor: iriver    Model: MassStorage Disc  Rev:
Oct 29 10:00:26 bagpipes kernel:   Type:   Direct-Access                      ANSI 
SCSI revision: 02
Oct 29 10:00:26 bagpipes kernel: SCSI device sda: 512001 512-byte hdwr sectors (262 MB)
Oct 29 10:00:26 bagpipes kernel: sda: assuming Write Enabled
Oct 29 10:00:26 bagpipes kernel:  /dev/scsi/host5/bus0/target0/lun0:
Oct 29 10:00:26 bagpipes kernel: Attached scsi removable disk sda at scsi5, channel 0, 
id 0, lun 0
Oct 29 10:00:26 bagpipes kernel: Attached scsi generic sg0 at scsi5, channel 0, id 0, 
lun 0,  type 0
Oct 29 10:00:27 bagpipes usb.agent[1716]:      usb-storage: already loaded
Oct 29 10:00:27 bagpipes scsi.agent[1743]: disk at 
/devices/pci0000:00/0000:00:10.3/usb4/4-3/4-3:1.0/host5/5:0:0:0
Oct 29 10:03:56 bagpipes kernel: SCSI error : <5 0 0 0> return code = 0x70000
Oct 29 10:03:56 bagpipes kernel: end_request: I/O error, dev sda, sector 302219

The SCSI error repeats about a million times, and then I get

Oct 29 10:03:56 bagpipes kernel: SCSI error : <5 0 0 0> return code = 0x70000
Oct 29 10:03:56 bagpipes kernel: end_request: I/O error, dev sda, sector 308172
Oct 29 10:04:26 bagpipes kernel: scsi: Device offlined - not ready after error 
recovery: host 5 channel 0 id 0 lun 0
Oct 29 10:04:26 bagpipes kernel: Badness in scsi_device_set_state at 
drivers/scsi/scsi_lib.c:1643
Oct 29 10:04:26 bagpipes kernel:  [__crc_sleep_on+1978839/6521320] 
scsi_device_set_state+0xc6/0x120 [scsi_mod]
Oct 29 10:04:26 bagpipes kernel:  [__crc_sleep_on+1968917/6521320] 
scsi_eh_offline_sdevs+0x64/0x80 [scsi_mod]
Oct 29 10:04:26 bagpipes kernel:  [__crc_sleep_on+1970493/6521320] 
scsi_unjam_host+0xcc/0x200 [scsi_mod]
Oct 29 10:04:26 bagpipes kernel:  [default_wake_function+0/32] 
default_wake_function+0x0/0x20
Oct 29 10:04:26 bagpipes kernel:  [__crc_sleep_on+1971060/6521320] 
scsi_error_handler+0x103/0x1c0 [scsi_mod]
Oct 29 10:04:26 bagpipes kernel:  [__crc_sleep_on+1970801/6521320] 
scsi_error_handler+0x0/0x1c0 [scsi_mod]
Oct 29 10:04:26 bagpipes kernel:  [kernel_thread_helper+5/20] 
kernel_thread_helper+0x5/0x14
Oct 29 10:04:26 bagpipes kernel: SCSI error : <5 0 0 0> return code = 0x70000
Oct 29 10:04:26 bagpipes kernel: end_request: I/O error, dev sda, sector 308173
Oct 29 10:04:26 bagpipes kernel: printk: 280 messages suppressed.
Oct 29 10:04:26 bagpipes kernel: lost page write due to I/O error on sda
Oct 29 10:04:36 bagpipes kernel: ------------[ cut here ]------------
Oct 29 10:04:36 bagpipes kernel: PREEMPT
Oct 29 10:04:36 bagpipes kernel: Modules linked in: ipt_TCPMSS iptable_filter 
nls_iso8859_1 vfat fat nls_cp437 isofs usb_storage bcm5700 ipt_mark
ipt_length ipt_dscp ipt_MARK cls_fw sch_sfq sch_htb iptable_mangle ip_tables smbfs 
ide_cd sr_mod cdrom sg radeon lp apm ipv6 snd_via82xx snd_ac97_codec snd_pcm_oss 
snd_mixer_oss snd_pcm snd_timer snd_page_alloc gameport snd_mpu401_uart snd_rawmidi 
snd_seq_device snd soundcore via_ircc irda crc_ccitt ehci_hcd uhci_hcd usbcore 
sata_promise ohci1394 ieee1394 pci_hotplug via_agp agpgart pcspkr tsdev mousedev 
psmouse parport_pc parport evdev dm_mod capability commoncap af_packet rtc ext2 ext3 
jbd mbcache ide_generic via82cxxx ide_disk ide_core sd_mod ata_piix libata scsi_mod 
unix font vesafb cfbcopyarea cfbimgblt cfbfillrect
Oct 29 10:04:36 bagpipes kernel: CPU:    0
Oct 29 10:04:36 bagpipes kernel: EIP:    0060:[as_exit+101/128]    Not tainted
Oct 29 10:04:36 bagpipes kernel: EFLAGS: 00010297   (2.6.8-1-k7)
Oct 29 10:04:36 bagpipes kernel: EIP is at as_exit+0x65/0x80
Oct 29 10:04:36 bagpipes kernel: eax: dfdb774c   ebx: dfdb7740   ecx: cce246c0   edx: 
c514fe7c
Oct 29 10:04:36 bagpipes kernel: esi: cfe83eb8   edi: 00000286   ebp: df8242b4   esp: 
c514feb8
Oct 29 10:04:36 bagpipes kernel: ds: 007b   es: 007b   ss: 0068
Oct 29 10:04:36 bagpipes kernel: Process scsi_eh_5 (pid: 1713, threadinfo=c514e000 
task=cce246c0)
Oct 29 10:04:36 bagpipes kernel: Stack: dfdb77c8 cfe83e2c c01f6bfe cfe83e2c cfe83e38 
c01f8d08 cfe83e2c df82470c
Oct 29 10:04:36 bagpipes kernel:        c3033024 c3033000 e085eb32 cfe83e2c c30331a8 
c02f81a8 c02f81c0 df8242d8
Oct 29 10:04:36 bagpipes kernel:        c01f2458 c3033184 c514ff28 00000082 c514ff30 
c01a2be8 c30331a8 c3033000
Oct 29 10:04:36 bagpipes kernel: Call Trace:
Oct 29 10:04:36 bagpipes kernel:  [elevator_exit+30/32] elevator_exit+0x1e/0x20
Oct 29 10:04:36 bagpipes kernel:  [blk_cleanup_queue+56/144] 
blk_cleanup_queue+0x38/0x90
Oct 29 10:04:36 bagpipes kernel:  [__crc_sleep_on+1986803/6521320] 
scsi_device_dev_release+0xf2/0x110 [scsi_mod]
Oct 29 10:04:36 bagpipes kernel:  [device_release+88/96] device_release+0x58/0x60
Oct 29 10:04:36 bagpipes kernel:  [kobject_cleanup+152/160] kobject_cleanup+0x98/0xa0
Oct 29 10:04:36 bagpipes kernel:  [__crc_sleep_on+1955393/6521320] 
__scsi_iterate_devices+0x70/0x90 [scsi_mod]
Oct 29 10:04:36 bagpipes kernel:  [__crc_sleep_on+1967205/6521320] 
scsi_eh_stu+0xb4/0x170 [scsi_mod]
Oct 29 10:04:36 bagpipes kernel:  [__crc_sleep_on+1969932/6521320] 
scsi_eh_ready_devs+0x2b/0xa0 [scsi_mod]
Oct 29 10:04:36 bagpipes kernel:  [__crc_sleep_on+1970493/6521320] 
scsi_unjam_host+0xcc/0x200 [scsi_mod]
Oct 29 10:04:36 bagpipes kernel:  [default_wake_function+0/32] 
default_wake_function+0x0/0x20
Oct 29 10:04:36 bagpipes kernel:  [__crc_sleep_on+1971060/6521320] 
scsi_error_handler+0x103/0x1c0 [scsi_mod]
Oct 29 10:04:36 bagpipes kernel:  [__crc_sleep_on+1970801/6521320] 
scsi_error_handler+0x0/0x1c0 [scsi_mod]
Oct 29 10:04:36 bagpipes kernel:  [kernel_thread_helper+5/20] 
kernel_thread_helper+0x5/0x14
Oct 29 10:04:36 bagpipes kernel: Code: 0f 0b 3d 07 e9 66 29 c0 eb c2 0f 0b 3c 07 e9 66 
29 c0 eb b0

Since that time, even with plugs and unplugs, I don't see anything.

Let's see... "rmmod sr_mod" also hangs, indefinitely, and it depends on scsi_mod. Nothing in /var/log. Could this be a kernel problem?


-- Moshe Yudkowsky * [EMAIL PROTECTED] * www.pobox.com/~moshe "Life is hard, then you die, then they throw dirt in your face, then the worms eat you. Be grateful it happens in that order." -- David Gerrold


------------------------------------------------------- This SF.Net email is sponsored by: Sybase ASE Linux Express Edition - download now for FREE LinuxWorld Reader's Choice Award Winner for best database on Linux. http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-users

Reply via email to