Bug 107248 - Trying to mount usb mass storage device hangs.
Trying to mount usb mass storage device hangs.
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: kernel (Show other bugs)
rawhide
i686 Linux
medium Severity high
: ---
: ---
Assigned To: Pete Zaitcev
:
Depends On:
Blocks: CambridgeTarget
  Show dependency treegraph
 
Reported: 2003-10-15 23:53 EDT by Dan Nuffer
Modified: 2007-11-30 17:10 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-08-21 00:41:11 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)
output from dmesg (9.88 KB, text/plain)
2003-10-15 23:54 EDT, Dan Nuffer
no flags Details
dmesg output when inserting memory-stick (1.08 KB, text/plain)
2004-05-12 06:12 EDT, Njål Karevoll
no flags Details

  None (edit)
Description Dan Nuffer 2003-10-15 23:53:01 EDT
Description of problem:
Trying to mount the usb mass storage device of my digital camera (Konica Digital
Revio KD-200Z) hangs the mount process, and it can't be killed.

Version-Release number of selected component (if applicable):
kernel-2.4.22-1.2088.nptl

How reproducible:
100%

Steps to Reproduce:
1. Plug in my camera into the usb port
2. mount /dev/sda1 /mnt/camera
3.
    
Actual results:


Expected results:


Additional info:
Comment 1 Dan Nuffer 2003-10-15 23:54:43 EDT
Created attachment 95221 [details]
output from dmesg
Comment 2 Dan Nuffer 2003-10-15 23:58:57 EDT
Forgot to mention that the mount process becomes unkillable, and the system
can't be shutdown.  I had to resort to the reset switch.
Comment 3 Dimitri Papadopoulos 2003-12-12 15:40:23 EST
Same here, with a Konica Digital Revio KD-500Z. However there's no
need to explictely mount the camera. Just connect it and wait
something like 30 seconds. The PC will hang.

First I thought this was specific to my PC, as the camera works fine
at work with a Dell Precision 530 dual-processor workstation running
Red Hat Linux 9. But I've now changed for a different PC and the
problem persists. I can reproduce it with Red Hat Linux 9 and Fedora
Core 1. Currently running kernel 2.4.22-1.2129.nptlsmp.

Here is the output from dmesg after connecting camera to USB port:

hub.c: new USB device 00:1d.2-1, assigned address 2
usb.c: USB device 2 (vend/prod 0x4c8/0x727) is not claimed by any
active driver.
Initializing USB Mass Storage driver...
usb.c: registered new driver usb-storage
scsi1 : SCSI emulation for USB Mass Storage devices
  Vendor: Konica    Model: KD-500Z           Rev: 1.00
  Type:   Direct-Access                      ANSI SCSI revision: 02
WARNING: USB Mass Storage data integrity not assured
USB Mass Storage device found at 2
USB Mass Storage support registered.
Attached scsi removable disk sda at scsi1, channel 0, id 0, lun 0
SCSI device sda: 245825 512-byte hdwr sectors (126 MB)
sda: Write Protect is off
 sda: sda1
inserting floppy driver for 2.4.22-1.2129.nptlsmp
floppy0: no floppy controllers found
usb-uhci.c: interrupt, status 3, frame# 503
usb-uhci.c: interrupt, status 3, frame# 265

Here is what I was able to copy from the console:

wait_on_irq, CPU1:
irq:  1 [ 1 0 ]
bh:   0 [ 0 0 ]
Stack dumps:
CPU 0: <unknown>
CPU 1: c1c37f38 00000001 00000001 ffffffff 00000001 ...
Call Trace: [<c010ba28>] __global_cli [kernel] 0x158 (0xc1c37f4c)
[<c01b1dd1>] flush_to_ldisc [kernel] 0xb1 (0xc1c37f5c)
[<c012a08a>] __run_task_queue [kernel] 0x6a (0xc1c37f84)
[<c0135679>] context_thread [kernel] 0x149 (0xc1c37f9c)
[<c0135530>] context_thread [kernel] 0x0 (0xc1c37fc4)
[<c0135530>] context_thread [kernel] 0x0 (0xc1c37fe0)
[<c01074bd>] kernel_thread_helper [kernel] 0x5 (0xc1c37ff0)
Comment 4 Alex Kanavin 2004-01-02 19:12:43 EST
I have exactly the same problem as Dimitri, except my camera is Pentax
Optio S4. If you want I can give you the kernel console output when it
crashes. (is there a better way than writing it to and then from paper?)
Comment 5 Alex Kanavin 2004-01-07 17:30:18 EST
I've just installed kernel-2.4.22-1.2140.nptl. It indeed no longer 
crashes when I switch on the camera; that's the good part. The bad 
part is that the camera storage device still isn't recognised and 
mounted. Here's the relevant output from dmesg:

hub.c: new USB device 00:04.2-2, assigned address 2
usb.c: USB device 2 (vend/prod 0xa17/0x6) is not claimed by any active
driver.
Initializing USB Mass Storage driver...
usb.c: registered new driver usb-storage
scsi1 : SCSI emulation for USB Mass Storage devices
  Vendor: Pentax    Model: Optio S           Rev: 1000
  Type:   Direct-Access                      ANSI SCSI revision: 02
WARNING: USB Mass Storage data integrity not assured
USB Mass Storage device found at 2
USB Mass Storage support registered.
Attached scsi removable disk sda at scsi1, channel 0, id 0, lun 0
usb-uhci.c: interrupt, status 3, frame# 528
usb-uhci.c: interrupt, status 3, frame# 1143
usb-uhci.c: interrupt, status 3, frame# 766
usb.c: USB disconnect on device 00:04.2-2 address 2
hub.c: new USB device 00:04.2-2, assigned address 3
WARNING: USB Mass Storage data integrity not assured
USB Mass Storage device found at 3
usb-uhci.c: interrupt, status 3, frame# 1767
scsi: device set offline - not ready or command retry failed after bus
reset: host 1 channel 0 id 0 lun 0
usb-uhci.c: interrupt, status 3, frame# 1529
usb-uhci.c: interrupt, status 3, frame# 1770
usb.c: USB disconnect on device 00:04.2-2 address 3
hub.c: new USB device 00:04.2-2, assigned address 4
WARNING: USB Mass Storage data integrity not assured
USB Mass Storage device found at 4
usb-uhci.c: interrupt, status 3, frame# 723
scsi: device set offline - not ready or command retry failed after bus
reset: host 1 channel 0 id 0 lun 0
usb-uhci.c: interrupt, status 3, frame# 486
usb-uhci.c: interrupt, status 3, frame# 727
usb.c: USB disconnect on device 00:04.2-2 address 4
hub.c: new USB device 00:04.2-2, assigned address 5
WARNING: USB Mass Storage data integrity not assured
USB Mass Storage device found at 5
usb-uhci.c: interrupt, status 3, frame# 1728
usb.c: USB disconnect on device 00:04.2-2 address 5
usb-uhci.c: interrupt, status 3, frame# 289
scsi: device set offline - not ready or command retry failed after bus
reset: host 1 channel 0 id 0 lun 0
...

And so on and so forth, until I switch the camera off. It works fine 
on the same PC under Win98. What else can I try?
Comment 6 Alex Kanavin 2004-01-07 19:14:12 EST
Sorry. Should have done some more digging before posting. This is a
Pentax specific problem and it is fixed in kernels 2.4.25-pre4 and
also 2.6.1rc1.

Here's the info and the patch:
http://marc.theaimsgroup.com/?l=linux-usb-devel&m=107127272403379&w=2
Comment 7 Dave Jones 2004-01-07 20:32:02 EST
Thanks for digging, I'll get this into an update soon.
Comment 8 Alex Kanavin 2004-01-08 05:45:02 EST
That patch is a part of much bigger set of USB fixes:

http://marc.theaimsgroup.com/?l=linux-usb-devel&m=107127186502393&w=2

so if you could make it all available as a kernel update, it would be
great :)
Comment 9 Antonio 2004-01-09 21:13:52 EST
+1

There are many Digicams. Included:

USB storage: Minolta Dimage S414 usb patchMinolta Dimage S414 usb patch

This is my camera. ;-)
Comment 10 Dimitri Papadopoulos 2004-01-10 06:21:27 EST
I've just installed kernel-2.4.22-1.2140.nptlsmp as well. And indeed
it no longer crashes when plugging the camera.

Still, just like Alex, the camera can't be mounted.
Comment 11 Dimitri Papadopoulos 2004-01-10 06:41:09 EST
By the way, this is maybe specific to some chipsets, as using the same
Konica Digital Revio KD-500Z camera has never been a problem on Dell
machines running Red Hat 8 or Red Hat 9 at work.

It's just been a problem with the two machines I've tested at home,
one with the ABIT BP6 dual-Celeron motherboard, and one with the ASUS
P4C800 Deluxe motherboard.
Comment 12 Alex Kanavin 2004-01-10 13:26:54 EST
I have recompiled the kernel with the patch above. There was just one
extra hurdle then: updfstab does not recognize the camera until you
add this to /etc/updfstab.conf:

device camera {
    partition 1
    match   hd Pentax
}

I think there should be a way to avoid vendor-specific entries in that
file. Is there any?
Comment 13 Pete Zaitcev 2004-01-12 18:48:45 EST
Dan apparently went underwater though it is his responsibility
to verify that a modified bug fixed the problem... *poke submitter*
If he's dead, I'll close.

Alex, I cannot answer #12 and you need to find someone who knows how
updfstab works (from the FC1 package owner page on fedora.redhat.com
perhaps).

Also, please file me a bug for support of Pentax - it's a distinct
problem from the hang (which I fixed).
Comment 14 Dan Nuffer 2004-01-12 19:16:17 EST
I'm not sure what it is that I'm supposed to verify. Is there a new
kernel rpm I can try?  What version? 
Comment 15 Alex Kanavin 2004-01-13 09:59:17 EST
Pete, #12 issue is already known; see bug 106782. I decided
not to request support for my own device, since it's clear
already that a generic solution is needed. 

As for filing for Pentax support... do you actually plan 
to make an update for FC1 with the latest USB drivers 
backported? If yes, then a bug with my specific issue 
isn't needed, if no, then that bug isn't needed either,
because it's not going to be fixed :-)

Anyway, I don't mind waiting for FC2 - it should include 
2.6.1 or a later kernel, which already has the fix. Until 
then, I can just use my own patched usb-storage 
module :)

Dan, an updated kernel is available through up2date. Did 
you try that?
Comment 16 Pete Zaitcev 2004-01-18 03:52:16 EST
up2date excludes kernels by default. But past that, 2.4.22-1.2140
should work for Dan. Dimitri says his Konica fails, so if Dan's
fails I'll look into that.
Comment 17 Dan Nuffer 2004-01-18 18:29:20 EST
2.4.22-1.2140 was even worse.  The whole kernel locked up.  2149 was
the same as before--mount hung and couldn't be killed.

One additional data point: my camera works perfectly Mandrake 9.1
(which has kernel version 2.4.21). 
Comment 18 Pete Zaitcev 2004-01-19 23:56:11 EST
The Konica will be the death of me. See also bug 90924.
Comment 19 Konstantin Ryabitsev 2004-04-20 12:52:27 EDT
Not sure if this is related to this bug, but with the latest few devel
kernels my usb-storage has been hanging on mount, or on access. The
latest kernel I can use that still doesn't have this problem is
2.6.5-1.322, after that I can't use USB. If I try to mount my
keydrive, it will hang and nothing USB will work any more (including
my mouse). I have to revert to 322 in order to be able to use it (and
it works, so it's not the device).
Comment 20 Konstantin Ryabitsev 2004-04-27 13:55:14 EDT
I can still see this bug on fc2-test3 with a completely different
motherboard. If I try to mount my USB keydrive on 2.6.5-1.327,
everything USB will hang shortly after. Only a cold reset helps. Help!
I can't use my private keys. :(
Comment 21 Konstantin Ryabitsev 2004-05-05 10:16:09 EDT
Kernel 2.6.5-1.349 seems to resolve this issue for me. I can mount and
access my USB keydrive again. Yay.
Comment 22 Pete Zaitcev 2004-05-05 10:39:36 EDT
No, Dan's problem is with old 2.4.x series. I'll have to keep
looking at this one. The problem is with finding time, so maybe
we'll try offset Dan to community kernels which actually move
a little in development.
Comment 23 Njål Karevoll 2004-05-12 06:12:19 EDT
Created attachment 100178 [details]
dmesg output when inserting memory-stick

I have a similar problem with my Creative MuVo 128MB USB memory stick. After
inserting, I get the kernel-messages in the following attachments, and can't do
anything with the USB-drive. Both mount and fdisk hangs. This is on Fedora Core
2 (FC2), using 2.6.5-1.358 (on an i686). My USB-harddrive is working perfectly
though, (also called /dev/sda when I'm using it). When I tested it on a
debian-box running 2.6.2, it worked without problems (Windows also has no
problems).. Is this possibly the same bug, or should I file a new bug-report?
Comment 24 Dimitri Papadopoulos 2004-05-22 10:28:19 EDT
Still unable to mount the Konica Digital Revio KD-500Z camera on
Fedora Core 1 with latest updates:
	# rpm -q kernel
	kernel-2.4.22-1.2188.nptl
	# 

The strange thing is that it is supposed to work out-of-the-box with
kernels 2.4.21 and better:
	http://www.teaser.fr/~hfiguiere/linux/digicam.html
	http://www.willamowius.de/konica_kd200z.html
It is also reported to work on Mandrake 9.1 and 9.2:
	http://lea-linux.org/drivers/rub.77.html#item1586
Is this a Red Hat specific issue? Maybe a Red Hat patch somehow
breaking USB storage?

# lsusb
Bus 005 Device 001: ID 0000:0000
Bus 004 Device 001: ID 0000:0000
Bus 003 Device 001: ID 0000:0000
Bus 003 Device 005: ID 04c8:0727 Konica Corp.
Bus 002 Device 001: ID 0000:0000
Bus 002 Device 002: ID 046d:c00c Logitech, Inc. Optical Wheel Mouse
Bus 001 Device 001: ID 0000:0000
Bus 001 Device 002: ID 046a:0001 Cherry GmbH My3000 Keyboard
# 
# mount /dev/sda1 /mnt/stick
mount: /dev/sda1 is not a valid block device
# 

I'll try Fedora Core 2 when possible, for now I can't upgrade before
nvidia ship drivers that support Fedorca Core 2.
Comment 25 Pete Zaitcev 2004-08-19 19:36:52 EDT
Dan, I really cannot dig into it, I'm sorry.
Can you give FC2 a try and check how that goes?
Comment 26 Dan Nuffer 2004-08-20 09:13:09 EDT
Sorry, I tried installing FC2, but it clobbered my partition table, so
that's no longer an option :-(
Comment 27 Pete Zaitcev 2004-08-21 00:41:11 EDT
I'll get back to Konica in ub then. I have something like three
or four bugs with Konica sufferers open right now. But it's more
honest not to pretend that I'm actively working on this, so closing
as Wontfix due to lack of time. Sorry.

Dan, one more thing - if you have time, try to get to
linux-usb-devel@lists.sourceforge.net and get Alan Stern et. al.
to help you directly with that (they'll ask you to rebuild with
debugging options first thing, be ready)
Comment 28 Dimitri Papadopoulos 2004-11-21 10:27:33 EST
See also bug #90924 as it seems to be related.
Comment 29 Dimitri Papadopoulos 2004-11-21 10:29:28 EST
I'm not running Fedora Core 2 with latest updates (kernel
2.6.9-1.3_FC2) and I'm able to download photogtaphs from my Konica
Digital Revio KD-500Z camera.

Looks like this has been fixed in recent kernels.
Comment 30 Pete Zaitcev 2004-11-21 15:24:03 EST
I haven't heard from Dan about this, but let's hope it worked for him.
The 2.6 is better in usb-storage area with quirky devices.

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