Bug 251401 - I/O error when usb digital camera plugged-in
I/O error when usb digital camera plugged-in
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: udev (Show other bugs)
7
i386 Linux
low Severity medium
: ---
: ---
Assigned To: Harald Hoyer
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-08-08 14:49 EDT by David Ponce
Modified: 2007-11-30 17:12 EST (History)
3 users (show)

See Also:
Fixed In Version: 113-11.fc7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-08-19 11:16:24 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
output of ls -lR /dev/ udev-106 (16.25 KB, text/plain)
2007-08-09 08:47 EDT, Mario Torre
no flags Details
output of ls -lR /dev/ udev-106 (17.21 KB, text/plain)
2007-08-09 08:48 EDT, Mario Torre
no flags Details
output of ls -lR /dev/ udev-113 (16.30 KB, text/plain)
2007-08-09 08:48 EDT, Mario Torre
no flags Details
output of ls -lR /dev/ udev-113 (17.38 KB, text/plain)
2007-08-09 08:49 EDT, Mario Torre
no flags Details
strace -t -s 256 -o vid-strace-failure.log /lib/udev/vol_id /dev/sdc1 (27.32 KB, text/plain)
2007-08-11 05:58 EDT, Mario Torre
no flags Details
strace -t -s 256 -o vid-strace-mounted.log /lib/udev/vol_id /dev/sdc1 (26.56 KB, text/plain)
2007-08-11 05:59 EDT, Mario Torre
no flags Details
patch to /etc/udev/rules.d/60-persistent-storage.rules (629 bytes, patch)
2007-08-11 07:59 EDT, Mario Torre
no flags Details | Diff
unusual_devs entries for NIKON D200 and D40 (1.13 KB, patch)
2007-08-13 10:20 EDT, Alan Stern
no flags Details | Diff

  None (edit)
Description David Ponce 2007-08-08 14:49:26 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6

Description of problem:
Since I updated to udev-113-8.fc7 I cannot mount my Nikon DSLR Camera.


Version-Release number of selected component (if applicable):
udev-113-8.fc7

How reproducible:
Always


Steps to Reproduce:
1. plug the usb camera in
2.
3.

Actual Results:
Fail to mount the camera device (mass storage)

Expected Results:
Be prompted to mount the camera device (KDE desktop)

Additional info:

? uname -r
2.6.22.1-46.fc7
? rpm -q udev
udev-113-8.fc7

Here is the relevant part of /var/log/messages :

-------------------------------- 
Aug  8 18:04:13 maunakea kernel: usb 5-7: new high speed USB device using ehci_hcd and address 4
Aug  8 18:04:13 maunakea kernel: usb 5-7: configuration #1 chosen from 1 choice
Aug  8 18:04:13 maunakea kernel: Initializing USB Mass Storage driver...
Aug  8 18:04:13 maunakea kernel: scsi2 : SCSI emulation for USB Mass Storage devices
Aug  8 18:04:13 maunakea kernel: usbcore: registered new interface driver usb-storage
Aug  8 18:04:13 maunakea kernel: USB Mass Storage support registered.
Aug  8 18:04:18 maunakea kernel: scsi 2:0:0:0: Direct-Access     NIKON    D200             1.00 PQ: 0 ANSI: 2
Aug  8 18:04:18 maunakea kernel: sd 2:0:0:0: [sdb] 8005537 512-byte hardware sectors (4099 MB)
Aug  8 18:04:18 maunakea kernel: sd 2:0:0:0: [sdb] Write Protect is off
Aug  8 18:04:18 maunakea kernel: sd 2:0:0:0: [sdb] Assuming drive cache: write through
Aug  8 18:04:18 maunakea kernel: sd 2:0:0:0: [sdb] 8005537 512-byte hardware sectors (4099 MB)
Aug  8 18:04:18 maunakea kernel: sd 2:0:0:0: [sdb] Write Protect is off
Aug  8 18:04:18 maunakea kernel: sd 2:0:0:0: [sdb] Assuming drive cache: write through
Aug  8 18:04:18 maunakea kernel:  sdb: sdb1
Aug  8 18:04:18 maunakea kernel: sd 2:0:0:0: [sdb] Attached SCSI removable disk
Aug  8 18:04:18 maunakea kernel: sd 2:0:0:0: Attached scsi generic sg2 type 0
Aug  8 18:04:19 maunakea kernel: end_request: I/O error, dev sdb, sector 8005536
Aug  8 18:04:19 maunakea kernel: Buffer I/O error on device sdb, logical block 8005536
Aug  8 18:04:19 maunakea kernel: end_request: I/O error, dev sdb, sector 8005536
Aug  8 18:04:19 maunakea kernel: Buffer I/O error on device sdb, logical block 8005536
Aug  8 18:04:19 maunakea kernel: end_request: I/O error, dev sdb, sector 8005536
Aug  8 18:04:19 maunakea kernel: Buffer I/O error on device sdb, logical block 8005536
Aug  8 18:04:19 maunakea kernel: end_request: I/O error, dev sdb, sector 8005536
Aug  8 18:04:19 maunakea kernel: Buffer I/O error on device sdb, logical block 8005536
Aug  8 18:04:19 maunakea kernel: end_request: I/O error, dev sdb, sector 8005536
Aug  8 18:04:19 maunakea kernel: Buffer I/O error on device sdb, logical block 8005536
Aug  8 18:04:19 maunakea kernel: end_request: I/O error, dev sdb, sector 8005536
Aug  8 18:04:19 maunakea kernel: Buffer I/O error on device sdb, logical block 8005536
Aug  8 18:04:19 maunakea kernel: end_request: I/O error, dev sdb, sector 8005536
Aug  8 18:04:19 maunakea kernel: Buffer I/O error on device sdb, logical block 8005536
Aug  8 18:04:19 maunakea kernel: end_request: I/O error, dev sdb, sector 40
Aug  8 18:04:19 maunakea kernel: Buffer I/O error on device sdb, logical block 40
Aug  8 18:04:19 maunakea kernel: end_request: I/O error, dev sdb, sector 41
Aug  8 18:04:19 maunakea kernel: Buffer I/O error on device sdb, logical block 41
Aug  8 18:04:19 maunakea kernel: Buffer I/O error on device sdb, logical block 42
Aug  8 18:04:19 maunakea kernel: end_request: I/O error, dev sdb, sector 40
Aug  8 18:04:19 maunakea kernel: end_request: I/O error, dev sdb, sector 41
Aug  8 18:04:19 maunakea kernel: end_request: I/O error, dev sdb, sector 40
Aug  8 18:04:19 maunakea kernel: end_request: I/O error, dev sdb, sector 41
Aug  8 18:04:19 maunakea kernel: end_request: I/O error, dev sdb, sector 40
Aug  8 18:04:19 maunakea kernel: end_request: I/O error, dev sdb, sector 41
Aug  8 18:04:19 maunakea kernel: end_request: I/O error, dev sdb, sector 40
Aug  8 18:04:19 maunakea kernel: end_request: I/O error, dev sdb, sector 41
Aug  8 18:04:19 maunakea kernel: end_request: I/O error, dev sdb, sector 0
Aug  8 18:04:19 maunakea kernel: end_request: I/O error, dev sdb, sector 0
Aug  8 18:04:19 maunakea kernel: end_request: I/O error, dev sdb, sector 1
Aug  8 18:04:19 maunakea kernel: end_request: I/O error, dev sdb, sector 0
Aug  8 18:04:19 maunakea kernel: end_request: I/O error, dev sdb, sector 1
Aug  8 18:04:19 maunakea kernel: end_request: I/O error, dev sdb, sector 63
Aug  8 18:04:19 maunakea kernel: end_request: I/O error, dev sdb, sector 64
Aug  8 18:04:19 maunakea kernel: end_request: I/O error, dev sdb, sector 63
Aug  8 18:04:19 maunakea kernel: end_request: I/O error, dev sdb, sector 64
Aug  8 18:04:19 maunakea kernel: end_request: I/O error, dev sdb, sector 71
Aug  8 18:04:19 maunakea kernel: end_request: I/O error, dev sdb, sector 72
Aug  8 18:04:19 maunakea kernel: end_request: I/O error, dev sdb, sector 63
Aug  8 18:04:19 maunakea kernel: end_request: I/O error, dev sdb, sector 63
Aug  8 18:04:19 maunakea kernel: end_request: I/O error, dev sdb, sector 64
Aug  8 18:04:19 maunakea kernel: end_request: I/O error, dev sdb, sector 63
Aug  8 18:04:19 maunakea kernel: end_request: I/O error, dev sdb, sector 64
Aug  8 18:04:19 maunakea kernel: end_request: I/O error, dev sdb, sector 63
Aug  8 18:04:19 maunakea kernel: end_request: I/O error, dev sdb, sector 64
Aug  8 18:04:19 maunakea kernel: end_request: I/O error, dev sdb, sector 63
Aug  8 18:04:19 maunakea kernel: end_request: I/O error, dev sdb, sector 64
Aug  8 18:04:19 maunakea kernel: end_request: I/O error, dev sdb, sector 63
Aug  8 18:04:19 maunakea kernel: end_request: I/O error, dev sdb, sector 64
Aug  8 18:04:19 maunakea kernel: end_request: I/O error, dev sdb, sector 63
Aug  8 18:04:19 maunakea kernel: end_request: I/O error, dev sdb, sector 64
Aug  8 18:04:19 maunakea kernel: end_request: I/O error, dev sdb, sector 63
Aug  8 18:04:19 maunakea kernel: end_request: I/O error, dev sdb, sector 64
Aug  8 18:04:19 maunakea kernel: end_request: I/O error, dev sdb, sector 63
Aug  8 18:04:19 maunakea kernel: end_request: I/O error, dev sdb, sector 64
Aug  8 18:04:19 maunakea kernel: end_request: I/O error, dev sdb, sector 63
Aug  8 18:04:19 maunakea kernel: end_request: I/O error, dev sdb, sector 64
Aug  8 18:04:19 maunakea kernel: end_request: I/O error, dev sdb, sector 63
Aug  8 18:04:19 maunakea kernel: end_request: I/O error, dev sdb, sector 64
Aug  8 18:04:19 maunakea kernel: end_request: I/O error, dev sdb, sector 63
Aug  8 18:04:19 maunakea kernel: end_request: I/O error, dev sdb, sector 64
Aug  8 18:04:19 maunakea kernel: end_request: I/O error, dev sdb, sector 63
Aug  8 18:04:19 maunakea kernel: end_request: I/O error, dev sdb, sector 64
Aug  8 18:04:19 maunakea kernel: end_request: I/O error, dev sdb, sector 63
Aug  8 18:04:19 maunakea kernel: end_request: I/O error, dev sdb, sector 64
Aug  8 18:04:19 maunakea kernel: end_request: I/O error, dev sdb, sector 63
Aug  8 18:04:19 maunakea kernel: end_request: I/O error, dev sdb, sector 64
Aug  8 18:04:19 maunakea kernel: end_request: I/O error, dev sdb, sector 63
Aug  8 18:04:19 maunakea kernel: end_request: I/O error, dev sdb, sector 64
Aug  8 18:04:19 maunakea kernel: end_request: I/O error, dev sdb, sector 63
Aug  8 18:04:19 maunakea kernel: end_request: I/O error, dev sdb, sector 64
Aug  8 18:04:19 maunakea kernel: end_request: I/O error, dev sdb, sector 63
Aug  8 18:04:19 maunakea kernel: end_request: I/O error, dev sdb, sector 64
Aug  8 18:04:19 maunakea kernel: end_request: I/O error, dev sdb, sector 63
Aug  8 18:04:19 maunakea kernel: end_request: I/O error, dev sdb, sector 64
Aug  8 18:04:19 maunakea kernel: end_request: I/O error, dev sdb, sector 63
Aug  8 18:04:19 maunakea kernel: end_request: I/O error, dev sdb, sector 64
Aug  8 18:04:19 maunakea kernel: end_request: I/O error, dev sdb, sector 63
Aug  8 18:04:19 maunakea kernel: end_request: I/O error, dev sdb, sector 64
Aug  8 18:04:19 maunakea kernel: end_request: I/O error, dev sdb, sector 63
Aug  8 18:04:19 maunakea kernel: end_request: I/O error, dev sdb, sector 64
Aug  8 18:04:19 maunakea kernel: end_request: I/O error, dev sdb, sector 63
Aug  8 18:04:19 maunakea kernel: end_request: I/O error, dev sdb, sector 64
Aug  8 18:04:19 maunakea kernel: end_request: I/O error, dev sdb, sector 63
Aug  8 18:04:19 maunakea kernel: end_request: I/O error, dev sdb, sector 64
Aug  8 18:04:19 maunakea kernel: end_request: I/O error, dev sdb, sector 63
Aug  8 18:04:19 maunakea kernel: end_request: I/O error, dev sdb, sector 64
Aug  8 18:04:19 maunakea kernel: end_request: I/O error, dev sdb, sector 63
Aug  8 18:04:19 maunakea kernel: end_request: I/O error, dev sdb, sector 64
Aug  8 18:04:20 maunakea kernel: end_request: I/O error, dev sdb, sector 63
Aug  8 18:04:20 maunakea kernel: end_request: I/O error, dev sdb, sector 64
Aug  8 18:04:20 maunakea kernel: end_request: I/O error, dev sdb, sector 63
Aug  8 18:04:20 maunakea kernel: end_request: I/O error, dev sdb, sector 64
Aug  8 18:04:20 maunakea kernel: end_request: I/O error, dev sdb, sector 71
Aug  8 18:04:20 maunakea kernel: end_request: I/O error, dev sdb, sector 72
Aug  8 18:04:20 maunakea kernel: end_request: I/O error, dev sdb, sector 63
Aug  8 18:04:20 maunakea kernel: end_request: I/O error, dev sdb, sector 63
Aug  8 18:04:20 maunakea kernel: end_request: I/O error, dev sdb, sector 64
Aug  8 18:04:20 maunakea kernel: end_request: I/O error, dev sdb, sector 63
Aug  8 18:04:20 maunakea kernel: end_request: I/O error, dev sdb, sector 64
Aug  8 18:04:20 maunakea kernel: end_request: I/O error, dev sdb, sector 63
Aug  8 18:04:20 maunakea kernel: end_request: I/O error, dev sdb, sector 64
Aug  8 18:04:20 maunakea kernel: end_request: I/O error, dev sdb, sector 63
Aug  8 18:04:20 maunakea kernel: end_request: I/O error, dev sdb, sector 64
Aug  8 18:04:20 maunakea kernel: end_request: I/O error, dev sdb, sector 63
Aug  8 18:04:20 maunakea kernel: end_request: I/O error, dev sdb, sector 64
Aug  8 18:04:20 maunakea kernel: end_request: I/O error, dev sdb, sector 63
Aug  8 18:04:20 maunakea kernel: end_request: I/O error, dev sdb, sector 64
Aug  8 18:04:20 maunakea kernel: end_request: I/O error, dev sdb, sector 63
Aug  8 18:04:20 maunakea kernel: end_request: I/O error, dev sdb, sector 64
Aug  8 18:04:20 maunakea kernel: end_request: I/O error, dev sdb, sector 63
Aug  8 18:04:20 maunakea kernel: end_request: I/O error, dev sdb, sector 64
Aug  8 18:04:20 maunakea kernel: end_request: I/O error, dev sdb, sector 63
Aug  8 18:04:20 maunakea kernel: end_request: I/O error, dev sdb, sector 64
Aug  8 18:04:20 maunakea kernel: end_request: I/O error, dev sdb, sector 63
Aug  8 18:04:20 maunakea kernel: end_request: I/O error, dev sdb, sector 64
Aug  8 18:04:20 maunakea kernel: end_request: I/O error, dev sdb, sector 63
Aug  8 18:04:20 maunakea kernel: end_request: I/O error, dev sdb, sector 64
Aug  8 18:04:20 maunakea kernel: end_request: I/O error, dev sdb, sector 63
Aug  8 18:04:20 maunakea kernel: end_request: I/O error, dev sdb, sector 64
Aug  8 18:04:20 maunakea kernel: end_request: I/O error, dev sdb, sector 63
Aug  8 18:04:20 maunakea kernel: end_request: I/O error, dev sdb, sector 64
Aug  8 18:04:20 maunakea kernel: end_request: I/O error, dev sdb, sector 63
Aug  8 18:04:20 maunakea kernel: end_request: I/O error, dev sdb, sector 64
Aug  8 18:04:20 maunakea kernel: end_request: I/O error, dev sdb, sector 63
Aug  8 18:04:20 maunakea kernel: end_request: I/O error, dev sdb, sector 64
Aug  8 18:04:20 maunakea kernel: end_request: I/O error, dev sdb, sector 63
Aug  8 18:04:20 maunakea kernel: end_request: I/O error, dev sdb, sector 64
Aug  8 18:04:20 maunakea kernel: end_request: I/O error, dev sdb, sector 63
Aug  8 18:04:20 maunakea kernel: end_request: I/O error, dev sdb, sector 64
Aug  8 18:04:20 maunakea kernel: end_request: I/O error, dev sdb, sector 63
Aug  8 18:04:20 maunakea kernel: end_request: I/O error, dev sdb, sector 64
Aug  8 18:04:20 maunakea kernel: end_request: I/O error, dev sdb, sector 63
Aug  8 18:04:20 maunakea kernel: end_request: I/O error, dev sdb, sector 64
Aug  8 18:04:20 maunakea kernel: end_request: I/O error, dev sdb, sector 63
Aug  8 18:04:20 maunakea kernel: end_request: I/O error, dev sdb, sector 64
Aug  8 18:04:20 maunakea kernel: end_request: I/O error, dev sdb, sector 63
Aug  8 18:04:20 maunakea kernel: end_request: I/O error, dev sdb, sector 64
Aug  8 18:04:20 maunakea kernel: end_request: I/O error, dev sdb, sector 63
Aug  8 18:04:20 maunakea kernel: end_request: I/O error, dev sdb, sector 64
Aug  8 18:04:20 maunakea kernel: end_request: I/O error, dev sdb, sector 63
Aug  8 18:04:20 maunakea kernel: end_request: I/O error, dev sdb, sector 64
Aug  8 18:04:20 maunakea kernel: end_request: I/O error, dev sdb, sector 63
Aug  8 18:04:20 maunakea kernel: end_request: I/O error, dev sdb, sector 64
Aug  8 18:04:20 maunakea kernel: end_request: I/O error, dev sdb, sector 63
Aug  8 18:04:20 maunakea kernel: end_request: I/O error, dev sdb, sector 64
Aug  8 18:04:20 maunakea kernel: end_request: I/O error, dev sdb, sector 0
Aug  8 18:04:20 maunakea kernel: end_request: I/O error, dev sdb, sector 1
Aug  8 18:04:20 maunakea kernel: end_request: I/O error, dev sdb, sector 0
Aug  8 18:04:20 maunakea kernel: end_request: I/O error, dev sdb, sector 1
Aug  8 18:04:20 maunakea kernel: end_request: I/O error, dev sdb, sector 0


With udev-106-4.1.fc7 that works. Here is the relevant part of 
/var/log/messages.

? rpm -q udev
udev-106-4.1.fc7

Aug  8 18:10:25 maunakea kernel: usb 5-7: new high speed USB device using ehci_hcd and address 5
Aug  8 18:10:25 maunakea kernel: usb 5-7: configuration #1 chosen from 1 choice
Aug  8 18:10:25 maunakea kernel: scsi3 : SCSI emulation for USB Mass Storage devices
Aug  8 18:10:30 maunakea kernel: scsi 3:0:0:0: Direct-Access     NIKON    D200             1.00 PQ: 0 ANSI: 2
Aug  8 18:10:30 maunakea kernel: sd 3:0:0:0: [sdb] 8005537 512-byte hardware sectors (4099 MB)
Aug  8 18:10:30 maunakea kernel: sd 3:0:0:0: [sdb] Write Protect is off
Aug  8 18:10:30 maunakea kernel: sd 3:0:0:0: [sdb] Assuming drive cache: write through
Aug  8 18:10:30 maunakea kernel: sd 3:0:0:0: [sdb] 8005537 512-byte hardware sectors (4099 MB)
Aug  8 18:10:30 maunakea kernel: sd 3:0:0:0: [sdb] Write Protect is off
Aug  8 18:10:30 maunakea kernel: sd 3:0:0:0: [sdb] Assuming drive cache: write through
Aug  8 18:10:30 maunakea kernel:  sdb: sdb1
Aug  8 18:10:30 maunakea kernel: sd 3:0:0:0: [sdb] Attached SCSI removable disk
Aug  8 18:10:30 maunakea kernel: sd 3:0:0:0: Attached scsi generic sg2 type 0
Aug  8 18:10:41 maunakea hald: mounted /dev/sdb1 on behalf of uid 500
Comment 1 Mario Torre 2007-08-08 17:45:27 EDT
I can confirm this bug... Is there a workaround?

[neugens@nirvana neugens]$ uname -r
2.6.22.1-41.fc7
[neugens@nirvana neugens]$ rpm -q udev
udev-113-9.fc7

Comment 2 Mario Torre 2007-08-08 18:05:06 EDT
Reverting to udev-113-8 does not solve. While I don't think it maybe of any
help, my camera is also a Nikon DSLR. It worked fine just a couple of days ago
(before the udev update).
Comment 3 Mario Torre 2007-08-09 08:00:37 EDT
Just an additional note, switching back to udev-106-4.1.fc7 seems to solve, like
David suggested, but of course it causes some other troubles (for example, I'm
unable to connect to the net with NetworkManager unless I set "allow users to
enable this device bla bla" in network config).
Comment 4 Harald Hoyer 2007-08-09 08:18:38 EDT
please attach the output of 
$ ls -lR /dev/
for both udev versions
Comment 5 Mario Torre 2007-08-09 08:46:28 EDT
Sure, with and without camera.

If you need more tests please tell me.
Comment 6 Mario Torre 2007-08-09 08:47:36 EDT
Created attachment 160970 [details]
output of ls -lR /dev/ udev-106

Without camera attached
Comment 7 Mario Torre 2007-08-09 08:48:16 EDT
Created attachment 160971 [details]
output of ls -lR /dev/ udev-106

With camera
Comment 8 Mario Torre 2007-08-09 08:48:48 EDT
Created attachment 160972 [details]
output of ls -lR /dev/ udev-113

Without camera attached
Comment 9 Mario Torre 2007-08-09 08:49:10 EDT
Created attachment 160973 [details]
output of ls -lR /dev/ udev-113

With camera attached
Comment 10 Harald Hoyer 2007-08-09 11:35:10 EDT
try this with the new udev:

# mv /etc/udev/rules.d/60-persistent-storage.rules \ 
/etc/udev/rules.d/60-persistent-storage.rules.bak

and replug the cam
Comment 11 Mario Torre 2007-08-09 12:51:06 EDT
Yeah, now it works fine.

[root@nirvana neugens]# rpm -q udev
udev-113-9.fc7

tail -f /var/log/messages

Aug  9 18:50:04 nirvana kernel: usb 5-1: new high speed USB device using
ehci_hcd and address 8
Aug  9 18:50:04 nirvana kernel: usb 5-1: configuration #1 chosen from 1 choice
Aug  9 18:50:04 nirvana kernel: scsi10 : SCSI emulation for USB Mass Storage devices
Aug  9 18:50:09 nirvana kernel: scsi 10:0:0:0: Direct-Access     NIKON    D40  
           1.10 PQ: 0 ANSI: 2
Aug  9 18:50:09 nirvana kernel: sd 10:0:0:0: [sdc] 4022273 512-byte hardware
sectors (2059 MB)
Aug  9 18:50:09 nirvana kernel: sd 10:0:0:0: [sdc] Write Protect is off
Aug  9 18:50:09 nirvana kernel: sd 10:0:0:0: [sdc] Assuming drive cache: write
through
Aug  9 18:50:09 nirvana kernel: sd 10:0:0:0: [sdc] 4022273 512-byte hardware
sectors (2059 MB)
Aug  9 18:50:09 nirvana kernel: sd 10:0:0:0: [sdc] Write Protect is off
Aug  9 18:50:09 nirvana kernel: sd 10:0:0:0: [sdc] Assuming drive cache: write
through
Aug  9 18:50:09 nirvana kernel:  sdc: sdc1
Aug  9 18:50:09 nirvana kernel: sd 10:0:0:0: [sdc] Attached SCSI removable disk
Aug  9 18:50:09 nirvana kernel: sd 10:0:0:0: Attached scsi generic sg3 type 0
Aug  9 18:50:10 nirvana hald: mounted /dev/sdc1 on behalf of uid 500
Comment 12 David Ponce 2007-08-09 13:39:35 EDT
(In reply to comment #10)
> try this with the new udev:
> 
> # mv /etc/udev/rules.d/60-persistent-storage.rules \ 
> /etc/udev/rules.d/60-persistent-storage.rules.bak
> 
> and replug the cam

That works now!

? rpm -q udev
udev-113-9.fc7

/var/log/messages :

Aug  9 19:31:43 maunakea kernel: usb 5-6: new high speed USB device using
ehci_hcd and address 5
Aug  9 19:31:43 maunakea kernel: usb 5-6: configuration #1 chosen from 1 choice
Aug  9 19:31:43 maunakea kernel: scsi3 : SCSI emulation for USB Mass Storage devices
Aug  9 19:31:48 maunakea kernel: scsi 3:0:0:0: Direct-Access     NIKON    D200 
           1.00 PQ: 0 ANSI: 2
Aug  9 19:31:48 maunakea kernel: sd 3:0:0:0: [sdb] 8005537 512-byte hardware
sectors (4099 MB)
Aug  9 19:31:48 maunakea kernel: sd 3:0:0:0: [sdb] Write Protect is off
Aug  9 19:31:48 maunakea kernel: sd 3:0:0:0: [sdb] Assuming drive cache: write
through
Aug  9 19:31:48 maunakea kernel: sd 3:0:0:0: [sdb] 8005537 512-byte hardware
sectors (4099 MB)
Aug  9 19:31:48 maunakea kernel: sd 3:0:0:0: [sdb] Write Protect is off
Aug  9 19:31:48 maunakea kernel: sd 3:0:0:0: [sdb] Assuming drive cache: write
through
Aug  9 19:31:48 maunakea kernel:  sdb: sdb1
Aug  9 19:31:48 maunakea kernel: sd 3:0:0:0: [sdb] Attached SCSI removable disk
Aug  9 19:31:48 maunakea kernel: sd 3:0:0:0: Attached scsi generic sg2 type 0
Aug  9 19:31:56 maunakea hald: mounted /dev/sdb1 on behalf of uid 500
Comment 13 Kay Sievers 2007-08-10 13:08:32 EDT
It's likely a bug in the camera firmware which advertises a size of the blockdev
which can't be accessed. It needs to worked around in the usb-storage module.
HAL should cause the same problem with that device.

Does the same error log appear if you run:
  /lib/udev/vol_id /dev/sdb
or
  /lib/udev/vol_id /dev/sdb1
?

And if it does, please attach the vid-strace.log file of:
  strace -t -s 256 -o vid-strace.log /lib/udev/vol_id /dev/sdb

Thanks!
Comment 14 Mario Torre 2007-08-11 05:56:49 EDT
I'm not sure I understood, do you want "/lib/udev/vol_id /dev/sdb1" (sdc1 in my
case) with the /etc/udev/rules.d/60-persistent-storage.rules files restored?

In this case I get

"/dev/sdc1: unknown volume type"

But this is normal as the volume is not mounted.

In the second case (60-persistent-storage.rules removed), this is the output of
the command:

ID_FS_USAGE=filesystem
ID_FS_TYPE=vfat
ID_FS_VERSION=FAT16
ID_FS_UUID=0860-3C1A
ID_FS_UUID_ENC=0860-3C1A
ID_FS_LABEL=NIKON D40
ID_FS_LABEL_ENC=NIKON\x20D40
ID_FS_LABEL_SAFE=NIKON_D40

I attach the log of the strace in both cases.
Comment 15 Mario Torre 2007-08-11 05:58:43 EDT
Created attachment 161114 [details]
strace -t -s 256 -o vid-strace-failure.log /lib/udev/vol_id /dev/sdc1

This strace of the attempt to mount the Nikon D40 with udev 113 and the
/etc/udev/rules.d/60-persistent-storage.rules
Comment 16 Mario Torre 2007-08-11 05:59:47 EDT
Created attachment 161115 [details]
strace -t -s 256 -o vid-strace-mounted.log /lib/udev/vol_id /dev/sdc1

Same as 161114, but the /etc/udev/rules.d/60-persistent-storage.rules as been
removed, so the camera was mounted correctly.
Comment 17 Kay Sievers 2007-08-11 06:24:44 EDT
Oh, vol_id does not try to mount, it just probes the strage device /dev/sdX for
a filesystem, and the storage device always exists as long as the camera is
connected, regardless if it is mounted or not. The result of vol_id is used to
decide if the device will get automounted or not.

Seems that your camera needs a fix not to get confused by reading the end of the
device, after it has reported a broken size. See here:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=drivers/usb/storage/unusual_devs.h;hb=HEAD#l323

There is already a long list of Nikon's with that problem, and this device
probably needs to be added to the list of devices with broken behavior.

Alan, can you please have a look at:
  https://bugzilla.redhat.com/bugzilla/attachment.cgi?id=161114
and tell us if this USB storage device needs:
  US_FL_FIX_CAPACITY
like all the other Nikon cameras?

Thanks!
Comment 18 Mario Torre 2007-08-11 06:54:01 EDT
This is interesting.

Given the long list of Nikon camera there, I guess it's useless to bug Nikon to
try to fix that in the firmware, right?

Anyway, if I understand correctly, this will require a kernel update to work, in
this case, can it be referenced in this bug, so that we know when the udev rules
can be restored?

Thanks a lot!
Comment 19 Kay Sievers 2007-08-11 07:23:40 EDT
They probably don't care, yes. The problem is that some RAID devices on Linux
use the last sector to mark a device as a RAID member, and we need to read that
sector to know if we need to ignore the device, otherwise we would mount devices
which belong to a RAID set and possibly destroy the data on the device. Maybe no
other operating system needs to read the last sectors ...

A possible fix would be added to the kernel, yes.

We can possibly limit the probing to partitions, and skip main block devices for
now. In:
  /etc/udev/rules.d/60-persistent-storage.rules
we can change:
  IMPORT{program}="vol_id --export $tempnode"
to:
  ENV{DEVTYPE}=="partition", IMPORT{program}="vol_id --export $tempnode"
and it may work fine without disabling all the persistent naming. Could you
please try that? Thanks!
Comment 20 Mario Torre 2007-08-11 07:49:16 EDT
Yes, this works!!

I attach the trivial patch for your reference.

What are the effect of this patch on the system (other than making my camera work)?

I ask because I suspect that this could impact somehow other usb storage
devices, is it correct?
Comment 21 Kay Sievers 2007-08-11 07:54:07 EDT
It just skips the creation of links for unpartitioned devices. It should be fine.
I'll put that in the default udev rules now, until we sorted that out.

Regardless of that, usb-storage should proably get an entry for your device, but
let's wait for Alan, he should know.
Comment 22 Mario Torre 2007-08-11 07:59:40 EDT
Created attachment 161117 [details]
patch to /etc/udev/rules.d/60-persistent-storage.rules

Patch as suggested by Kay Sievers, allows Nikon usb cameras to be mounted.
Comment 23 Mario Torre 2007-08-11 08:00:36 EDT
ok, thanks a lot!
Comment 24 Alan Stern 2007-08-11 10:07:42 EDT
The error messages in the opening report indicate that the problem began when
the system tried to read the last sector of the camera, so the camera probably
is reporting an incorrect size.

Nikon might or might not care about fixing this.  Most likely they buy their
firmware from someone else (like Symbian, which has been supplying mass-storage
firmwares with this bug for a long time although I believe they have fixed it
now).  In any case, they certainly can't correct it in devices which have
already been made.

Adding an unusual_devs entry for the D200 will be easy enough, but first I need
to see more information.  The camera's entry either in /proc/bus/usb/devices or
in the output from "lsusb -v" would be enough.
Comment 25 Mario Torre 2007-08-11 11:14:53 EDT
Hi!

Here is the data for the D40:

--- /proc/bus/usb/devices ---

T:  Bus=05 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 12 Spd=480 MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=04b0 ProdID=0413 Rev= 1.10
S:  Manufacturer=NIKON
S:  Product=NIKON DSC D40
S:  SerialNumber=6005246
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=  2mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms


--- lsusb -v ---

Bus 005 Device 012: ID 04b0:0413 Nikon Corp. 
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x04b0 Nikon Corp.
  idProduct          0x0413 
  bcdDevice            1.10
  iManufacturer           1 NIKON
  iProduct                2 NIKON DSC D40
  iSerial                 3 6005246
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           32
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xc0
      Self Powered
    MaxPower                2mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         8 Mass Storage
      bInterfaceSubClass      6 SCSI
      bInterfaceProtocol     80 Bulk (Zip)
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
Device Qualifier (for other device speed):
  bLength                10
  bDescriptorType         6
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  bNumConfigurations      1

------------

I imagine that other Nikon cameras that share similar hardware (i.e. D40, D40x,
D200, D80) will have the same problem, but I have no way to tell that.
Comment 26 David Ponce 2007-08-12 05:44:37 EDT
(In reply to comment #24)
> The error messages in the opening report indicate that the problem began when
> the system tried to read the last sector of the camera, so the camera probably
> is reporting an incorrect size.
> 
> Nikon might or might not care about fixing this.  Most likely they buy their
> firmware from someone else (like Symbian, which has been supplying mass-storage
> firmwares with this bug for a long time although I believe they have fixed it
> now).  In any case, they certainly can't correct it in devices which have
> already been made.
> 
> Adding an unusual_devs entry for the D200 will be easy enough, but first I need
> to see more information.  The camera's entry either in /proc/bus/usb/devices or
> in the output from "lsusb -v" would be enough.

Hi!

Here is the data for the D200:

--- /proc/bus/usb/devices ---

T:  Bus=05 Lev=01 Prnt=01 Port=05 Cnt=01 Dev#=  4 Spd=480 MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=04b0 ProdID=040f Rev= 1.00
S:  Manufacturer=NIKON
S:  Product=NIKON DSC D200
S:  SerialNumber=0000000
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=  2mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms

--- lsusb -v ---

Bus 005 Device 004: ID 04b0:040f Nikon Corp.
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  idVendor           0x04b0 Nikon Corp.
  idProduct          0x040f
  bcdDevice            1.00
  iManufacturer           1 NIKON
  iProduct                2 NIKON DSC D200
  iSerial                 3 0000000
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           32
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0xc0
      Self Powered
    MaxPower                2mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         8 Mass Storage
      bInterfaceSubClass      6 SCSI
      bInterfaceProtocol     80 Bulk (Zip)
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
Device Qualifier (for other device speed):
  bLength                10
  bDescriptorType         6
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  bNumConfigurations      1

------------

Thanks all for your support.

Comment 27 Alan Stern 2007-08-13 10:20:19 EDT
Created attachment 161173 [details]
unusual_devs entries for NIKON D200 and D40

This patch contains entries for both types of camera.
Comment 28 Fedora Update System 2007-08-15 15:42:42 EDT
udev-113-10.fc7 has been pushed to the Fedora 7 testing repository.  If problems still persist, please make note of it in this bug report.
Comment 29 Fedora Update System 2007-08-17 12:11:59 EDT
udev-113-11.fc7 has been pushed to the Fedora 7 testing repository.  If problems still persist, please make note of it in this bug report.
Comment 30 Mario Torre 2007-08-18 06:35:01 EDT
udev-113-11.fc7 Works with my camera.

I've just installed so I don't know if there are other problems with this
version, but for now it seems to work fine.
Comment 31 David Ponce 2007-08-18 09:24:35 EDT
(In reply to comment #29)
> udev-113-11.fc7 has been pushed to the Fedora 7 testing repository.  If
problems still persist, please make note of it in this bug report.

It seems to work fine. Thanks!
Comment 32 Fedora Update System 2007-08-19 11:16:18 EDT
udev-113-11.fc7 has been pushed to the Fedora 7 stable repository.  If problems still persist, please make note of it in this bug report.

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