LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices

Reply
 
Search this Thread
Old 07-07-2006, 01:54 PM   #1
ewlabonte
Member
 
Registered: Mar 2005
Distribution: Slackware 14.1
Posts: 66

Rep: Reputation: 15
Unplugging USB cdrom drive


I am running sarge with the 2.6.8 kernel. I'm running it on a Dell Inspiron 1100 laptop. When I plug my usb cd/dvd rw drive in, it works fine. When I umount it it unmounts. But when I then unplug it, the system freezes. It doesn't happen immediately, it seems to happen as I am accessing the Applications or Actions menu. I don't know how to troubleshoot this. Is there a log file that would record this?

Last edited by ewlabonte; 07-07-2006 at 01:57 PM.
 
Old 07-07-2006, 01:58 PM   #2
nadroj
Senior Member
 
Registered: Jan 2005
Location: Canada
Distribution: ubuntu
Posts: 2,539

Rep: Reputation: 58
you unplug after you unmount you said, right?
when you mount the drive check 'dmesg | tail'.. then go open a file on the drive or something and check the same command.. unmount it and check the same command.. then finally unplug it and check the same command. or post the output of the last two here if it doesnt say anything logical.
after unplugging, if you dont touch anything and leave it for awhile, will it still freeze?
 
Old 07-07-2006, 03:02 PM   #3
ewlabonte
Member
 
Registered: Mar 2005
Distribution: Slackware 14.1
Posts: 66

Original Poster
Rep: Reputation: 15
The device mounts automatically when I plug it in. When I plug it in, access a file an unmount it, dmesg | tail is the same:

usb 4-3: new high speed USB device using address 4
scsi1 : SCSI emulation for USB Mass Storage devices
Vendor: DVDRW Model: USB 16X Rev: A087
Type: CD-ROM ANSI SCSI revision: 02
USB Mass Storage device found at 4
sr0: scsi3-mmc drive: 48x/48x writer cd/rw xa/form2 cdda tray
Attached scsi CD-ROM sr0 at scsi1, channel 0, id 0, lun 0
Attached scsi generic sg0 at scsi1, channel 0, id 0, lun 0, type 5
ISO 9660 Extensions: Microsoft Joliet Level 3
ISO 9660 Extensions: RRIP_1991A

When I unplug it, I get the following (dmesg | tail doesn't catch it all, so I saved dmesg):

usb 4-3: USB disconnect, address 4
scsi: Device offlined - not ready after error recovery: host 1 channel 0 id 0 lun 0
sr 1:0:0:0: Illegal state transition cancel->offline
Badness in scsi_device_set_state at drivers/scsi/scsi_lib.c:1643
[<d0e225ea>] scsi_device_set_state+0xc4/0xcf [scsi_mod]
[<d0e2075d>] scsi_eh_offline_sdevs+0x47/0x60 [scsi_mod]
[<d0e20d3d>] scsi_unjam_host+0x18d/0x1a2 [scsi_mod]
[<d0e20e68>] scsi_error_handler+0x116/0x15a [scsi_mod]
[<d0e20d52>] scsi_error_handler+0x0/0x15a [scsi_mod]
[<c01041e1>] kernel_thread_helper+0x5/0xb
Badness in kobject_get at lib/kobject.c:433
[<c018c93a>] kobject_get+0x2e/0x38
[<c01d3ecc>] get_device+0x13/0x1a
[<d0e21ebd>] scsi_request_fn+0x20/0x35b [scsi_mod]
[<c01d8d2c>] blk_insert_request+0x87/0xa9
[<d0e21155>] scsi_queue_insert+0x84/0x8e [scsi_mod]
[<d0e20b58>] scsi_eh_flush_done_q+0x7e/0xd6 [scsi_mod]
[<d0e20d4a>] scsi_unjam_host+0x19a/0x1a2 [scsi_mod]
[<d0e20e68>] scsi_error_handler+0x116/0x15a [scsi_mod]
[<d0e20d52>] scsi_error_handler+0x0/0x15a [scsi_mod]
[<c01041e1>] kernel_thread_helper+0x5/0xb
Unable to handle kernel paging request at virtual address 00100104
printing eip:
d0e23ceb
*pde = 06e15067
*pte = 00000000
Oops: 0002 [#1]
PREEMPT
Modules linked in: sg sr_mod nls_iso8859_1 nls_cp437 vfat fat sd_mod usb_storage scsi_mod thermal fan button processor ac battery i830 parport_pc lp parport ipv6 isofs ds af_packet pcspkr snd_intel8x0m snd_intel8x0 snd_ac97_codec snd_pcm snd_timer snd_page_alloc gameport snd_mpu401_uart snd_rawmidi snd_seq_device snd pci_hotplug hw_random intel_agp agpgart ehci_hcd usblp uhci_hcd usbcore i810_audio ac97_codec soundcore b44 mii yenta_socket pcmcia_core tsdev mousedev joydev evdev capability commoncap psmouse ide_cd cdrom genrtc ext3 jbd ide_generic piix ide_disk ide_core unix font vesafb cfbcopyarea cfbimgblt cfbfillrect
CPU: 0
EIP: 0060:[<d0e23ceb>] Not tainted
EFLAGS: 00010002 (2.6.8-2-386)
EIP is at scsi_device_dev_release+0x2d/0xf9 [scsi_mod]
eax: 00100100 ebx: cf406008 ecx: 00200200 edx: cf406184
esi: cf406000 edi: 00000286 ebp: cfb054b4 esp: c35efef0
ds: 007b es: 007b ss: 0068
Process scsi_eh_1 (pid: 26283, threadinfo=c35ee000 task=ce50a6c0)
Stack: cf4061a8 c02cbc08 c02cbc20 cfb054d8 c01d3c89 cf406184 c018c984 cf4061a8
c35ee000 ca7dcb00 cf406000 c286fe2c d0e221ed cf4061a8 cfb05400 cfb058b0
ca7dcb00 c286fe2c 00000202 c01d8d2c c286fe2c cf406000 ca7dcb00 cfb05400
Call Trace:
[<c01d3c89>] device_release+0x14/0x44
[<c018c984>] kobject_cleanup+0x40/0x65
[<d0e221ed>] scsi_request_fn+0x350/0x35b [scsi_mod]
[<c01d8d2c>] blk_insert_request+0x87/0xa9
[<d0e21155>] scsi_queue_insert+0x84/0x8e [scsi_mod]
[<d0e20b58>] scsi_eh_flush_done_q+0x7e/0xd6 [scsi_mod]
[<d0e20d4a>] scsi_unjam_host+0x19a/0x1a2 [scsi_mod]
[<d0e20e68>] scsi_error_handler+0x116/0x15a [scsi_mod]
[<d0e20d52>] scsi_error_handler+0x0/0x15a [scsi_mod]
[<c01041e1>] kernel_thread_helper+0x5/0xb
Code: 89 48 04 89 01 c7 43 04 00 02 20 00 8d 9a 8c fe ff ff 8b 4b
<6>note: scsi_eh_1[26283] exited with preempt_count 1
Badness in kobject_get at lib/kobject.c:433
[<c018c93a>] kobject_get+0x2e/0x38
[<c01d3ecc>] get_device+0x13/0x1a
[<d0e21ebd>] scsi_request_fn+0x20/0x35b [scsi_mod]
[<c01d858e>] __generic_unplug_device+0x2c/0x2f
[<c01d85a7>] generic_unplug_device+0x16/0x2a
[<c01d85df>] blk_unplug_work+0xb/0xd
[<c0124c52>] worker_thread+0x19c/0x22a
[<c01d85d4>] blk_unplug_work+0x0/0xd
[<c01161b1>] default_wake_function+0x0/0x12
[<c01161b1>] default_wake_function+0x0/0x12
[<c0124ab6>] worker_thread+0x0/0x22a
[<c0127b06>] kthread+0x6d/0x97
[<c0127a99>] kthread+0x0/0x97
[<c01041e1>] kernel_thread_helper+0x5/0xb
Unable to handle kernel paging request at virtual address 00100104
printing eip:
d0e23ceb
*pde = 06e15067
*pte = 00000000
Oops: 0002 [#2]
PREEMPT
Modules linked in: sg sr_mod nls_iso8859_1 nls_cp437 vfat fat sd_mod usb_storage scsi_mod thermal fan button processor ac battery i830 parport_pc lp parport ipv6 isofs ds af_packet pcspkr snd_intel8x0m snd_intel8x0 snd_ac97_codec snd_pcm snd_timer snd_page_alloc gameport snd_mpu401_uart snd_rawmidi snd_seq_device snd pci_hotplug hw_random intel_agp agpgart ehci_hcd usblp uhci_hcd usbcore i810_audio ac97_codec soundcore b44 mii yenta_socket pcmcia_core tsdev mousedev joydev evdev capability commoncap psmouse ide_cd cdrom genrtc ext3 jbd ide_generic piix ide_disk ide_core unix font vesafb cfbcopyarea cfbimgblt cfbfillrect
CPU: 0
EIP: 0060:[<d0e23ceb>] Not tainted
EFLAGS: 00010002 (2.6.8-2-386)
EIP is at scsi_device_dev_release+0x2d/0xf9 [scsi_mod]
eax: 00100100 ebx: cf406008 ecx: 00200200 edx: cf406184
esi: cf406000 edi: 00000286 ebp: cfb054b4 esp: cf4ebef8
ds: 007b es: 007b ss: 0068
Process kblockd/0 (pid: 33, threadinfo=cf4ea000 task=cf4e96f0)
Stack: cf4061a8 c02cbc08 c02cbc20 cfb054d8 c01d3c89 cf406184 c018c984 cf4061a8
cf4ea000 cf4ea000 cf406000 c286fe2c d0e221ed cf4061a8 cfb05400 c286fe2c
cf4ea000 c286ff1c 00000293 c01d858e c286fe2c cf4ea000 c01d85a7 c286fe2c
Call Trace:
[<c01d3c89>] device_release+0x14/0x44
[<c018c984>] kobject_cleanup+0x40/0x65
[<d0e221ed>] scsi_request_fn+0x350/0x35b [scsi_mod]
[<c01d858e>] __generic_unplug_device+0x2c/0x2f
[<c01d85a7>] generic_unplug_device+0x16/0x2a
[<c01d85df>] blk_unplug_work+0xb/0xd
[<c0124c52>] worker_thread+0x19c/0x22a
[<c01d85d4>] blk_unplug_work+0x0/0xd
[<c01161b1>] default_wake_function+0x0/0x12
[<c01161b1>] default_wake_function+0x0/0x12
[<c0124ab6>] worker_thread+0x0/0x22a
[<c0127b06>] kthread+0x6d/0x97
[<c0127a99>] kthread+0x0/0x97
[<c01041e1>] kernel_thread_helper+0x5/0xb
Code: 89 48 04 89 01 c7 43 04 00 02 20 00 8d 9a 8c fe ff ff 8b 4b
<6>note: kblockd/0[33] exited with preempt_count 1


This time it didn't freeze up when I accessed the menu, I actually logged out of gnome. It dumped me at the command line, which was unresponsive.
 
Old 07-07-2006, 03:31 PM   #4
nadroj
Senior Member
 
Registered: Jan 2005
Location: Canada
Distribution: ubuntu
Posts: 2,539

Rep: Reputation: 58
when the device is plugged in post the output of 'mount', 'lsusb', and 'lsmod'. what is the name of the device? do you have problems with it on any other distro or OS?
 
Old 07-07-2006, 04:31 PM   #5
ewlabonte
Member
 
Registered: Mar 2005
Distribution: Slackware 14.1
Posts: 66

Original Poster
Rep: Reputation: 15
output of mount:

/dev/hdc1 on / type ext3 (rw,errors=remount-ro)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw)
/dev/hdc3 on /home type ext3 (rw)
usbfs on /proc/bus/usb type usbfs (rw)
tmpfs on /dev type tmpfs (rw,size=10M,mode=0755)
/dev/scd0 on /media/cdrecorder type iso9660 (ro,noexec,nosuid,nodev,uid=1000,gid=1000)



output of lsusb

Bus 004 Device 002: ID 046e:3005 Behavior Tech. Computer Corp.
Bus 004 Device 001: ID 0000:0000
Bus 003 Device 001: ID 0000:0000
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 001: ID 0000:0000

output of lsmod

Module Size Used by
nls_cp437 6016 1
isofs 33976 1
sg 34976 0
sr_mod 15780 1
usb_storage 59328 1
scsi_mod 115148 3 sg,sr_mod,usb_storage
i830 68388 2
ipv6 229892 8
ds 17796 2
thermal 12944 0
fan 4236 0
button 6680 0
processor 17584 1 thermal
ac 5132 0
battery 9740 0
af_packet 20872 2
rtc 12088 0
pcspkr 3816 0
snd_intel8x0m 18632 0
snd_intel8x0 33068 0
snd_ac97_codec 59268 2 snd_intel8x0m,snd_intel8x0
snd_pcm 85384 2 snd_intel8x0m,snd_intel8x0
snd_timer 23300 1 snd_pcm
snd_page_alloc 11144 3 snd_intel8x0m,snd_intel8x0,snd_pcm
gameport 4736 1 snd_intel8x0
snd_mpu401_uart 7296 1 snd_intel8x0
snd_rawmidi 23204 1 snd_mpu401_uart
snd_seq_device 7944 1 snd_rawmidi
snd 50660 8 snd_intel8x0m,snd_intel8x0,snd_ac97_codec,snd_pcm,snd_timer,snd_mpu401_uart,snd_rawmidi,snd_seq_devi ce
pci_hotplug 30640 0
hw_random 5652 0
intel_agp 20512 1
agpgart 31784 3 intel_agp
ehci_hcd 27908 0
uhci_hcd 29328 0
usbcore 104164 5 usb_storage,ehci_hcd,uhci_hcd
i810_audio 33300 1
ac97_codec 16908 1 i810_audio
soundcore 9824 3 snd,i810_audio
b44 19972 0
mii 4864 1 b44
yenta_socket 19200 0
pcmcia_core 63028 2 ds,yenta_socket
tsdev 7168 0
mousedev 9996 1
joydev 9536 0
evdev 9088 1
capability 4872 0
commoncap 7168 1 capability
psmouse 17800 0
ide_cd 38176 0
cdrom 35740 2 sr_mod,ide_cd
ext3 109544 2
jbd 54552 1 ext3
ide_generic 1664 0
piix 12448 1
ide_disk 16768 4
ide_core 125028 5 usb_storage,ide_cd,ide_generic,piix,ide_disk
unix 26036 428
font 8576 0
vesafb 6688 0
cfbcopyarea 3840 1 vesafb
cfbimgblt 3200 1 vesafb
cfbfillrect 3712 1 vesafb


As far as I have experienced debian is the only distro that this happens with. It doesn't happen with slackware or fedora core, or even ubuntu. It happened when I was trying out etch also. It's the only persistent problem I've had with debian. If I could solve it, this would be the "perfect" distro.
 
Old 07-07-2006, 06:24 PM   #6
nadroj
Senior Member
 
Registered: Jan 2005
Location: Canada
Distribution: ubuntu
Posts: 2,539

Rep: Reputation: 58
do you have a live cd on hand? or are you dual booting any of those other distros that worked fine with this? if so check the output of their dmesg and mount to see what device file its mounting.
sorry im of no help! im interested to see the answer, im still looking.. hope someone can help you.
is there a /etc/rc.d/rc.hotplug file that is executable? if not try and make it executable so it runs at startup.. try booting with the device plugged in.

Last edited by nadroj; 07-07-2006 at 06:42 PM.
 
Old 07-07-2006, 07:01 PM   #7
ewlabonte
Member
 
Registered: Mar 2005
Distribution: Slackware 14.1
Posts: 66

Original Poster
Rep: Reputation: 15
I know what device file is mounting. It's /dev/scd0 and it's mounting at /media/cdrecorder.
 
Old 07-07-2006, 07:05 PM   #8
nadroj
Senior Member
 
Registered: Jan 2005
Location: Canada
Distribution: ubuntu
Posts: 2,539

Rep: Reputation: 58
ya, i was reading the dmesg output and i thought it was saying something else.. so disregard that. my last guess is to have hotplug run at boot. give that a shot as i have suggested.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Unplugging USB CDROM while mounted nukes it randomshinichi Linux - Hardware 2 05-14-2006 04:50 PM
i can't umount usb drive, or cdrom ????help??? carspidey Linux - Hardware 3 03-22-2006 02:47 PM
Can't boot w/o unplugging usb items... pauleddy Linux - Hardware 2 06-11-2005 09:02 AM
Booting From a USB CDROM Drive Flossie Mandriva 1 03-23-2004 10:58 AM
Error On Unplugging USB Devices TastyWheat Linux - Hardware 0 08-28-2003 09:24 AM


All times are GMT -5. The time now is 10:35 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration