FS#12177 - Wrong Symlinks in /dev through udev 132-1

Attached to Project: Arch Linux
Opened by Thomas Bohn (tehabe) - Tuesday, 18 November 2008, 21:31 GMT
Last edited by Tobias Powalowski (tpowa) - Tuesday, 23 December 2008, 08:07 GMT
Task Type Bug Report
Category Packages: Testing
Status Closed
Assigned To Tobias Powalowski (tpowa)
Aaron Griffin (phrakture)
Thomas Bächler (brain0)
Architecture All
Severity Critical
Priority High
Reported Version None
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:

The udev 132 package in testing creates wrong symlinks for DVD drives in /dev when a disc is in the drive.

/dev/dvd -> /dev/cd/dvd-4:0:0:0

but in /dev/cd I find only

/dev/cd/dvd-

Additional info:

testing/udev 132-1

See http://bbs.archlinux.org/viewtopic.php?pid=450741#p450741

This task depends upon

Closed by  Tobias Powalowski (tpowa)
Tuesday, 23 December 2008, 08:07 GMT
Reason for closing:  Not a bug
Comment by Thomas Bächler (brain0) - Friday, 28 November 2008, 08:22 GMT
I think we should rewrite the whole cd symlink thing. The way through /dev/cd is confusing and there is probably a better way.
Comment by Aaron Griffin (phrakture) - Monday, 01 December 2008, 22:41 GMT
Is there anything wrong with the way the official rules do it? Or do they not touch cd symlinking at all?
Comment by Jud (judfilm) - Saturday, 06 December 2008, 00:56 GMT
Would a rebuild to v135 help? or is this a "rules" bug?
Comment by Tobias Powalowski (tpowa) - Monday, 22 December 2008, 19:11 GMT
fixed in udev 135 in testing
Comment by Thomas Bohn (tehabe) - Monday, 22 December 2008, 21:25 GMT
  • Field changed: Percent Complete (100% → 0%)
in udev 135 the symlinks in /dev/cd are still broken when i insert a disk. So this bug is not fixed.
Comment by Aaron Griffin (phrakture) - Monday, 22 December 2008, 21:25 GMT
What do you mean they are still broken when you "insert a disk" ? The device symlinks should have nothing to do with whether or not there is media present in the drive
Comment by Thomas Bohn (tehabe) - Monday, 22 December 2008, 21:36 GMT
When I boot my computer and put my DVD drive on all symlinks are correct. When I insert a disc the symlinks get broken. When I remove the disc the symlink stay broken.

% ls -l /dev/cd
lrwxrwxrwx 1 root root 6 22. Dez 22:17 cdrom- -> ../sr0
lrwxrwxrwx 1 root root 6 22. Dez 22:17 cdrw- -> ../sr0
lrwxrwxrwx 1 root root 6 22. Dez 22:17 dvd- -> ../sr0

% ls -l /dev/dvd*
lrwxrwxrwx 1 root root 19 22. Dez 22:16 /dev/dvd -> /dev/cd/dvd-3:0:0:0
lrwxrwxrwx 1 root root 19 22. Dez 22:16 /dev/dvd0 -> /dev/cd/dvd-3:0:0:0

% ls -l /dev/cdr*
lrwxrwxrwx 1 root root 21 22. Dez 22:16 /dev/cdrom -> /dev/cd/cdrom-3:0:0:0
lrwxrwxrwx 1 root root 21 22. Dez 22:16 /dev/cdrom0 -> /dev/cd/cdrom-3:0:0:0
lrwxrwxrwx 1 root root 20 22. Dez 22:16 /dev/cdrw -> /dev/cd/cdrw-3:0:0:0
lrwxrwxrwx 1 root root 20 22. Dez 22:16 /dev/cdrw0 -> /dev/cd/cdrw-3:0:0:0
Comment by Tobias Powalowski (tpowa) - Monday, 22 December 2008, 21:41 GMT
hrm on my system it works, if i boot with dvd inserted and if i insert it into a running system
Comment by Tobias Powalowski (tpowa) - Monday, 22 December 2008, 21:55 GMT
according to your posted links, please point me what is wrong?
Comment by Aaron Griffin (phrakture) - Monday, 22 December 2008, 21:55 GMT
udev doesn't do anything when a CD is inserted. This can't happen. Try runing udevadm monitor when you insert the CD. I have a feeling this is hal or some other automounter doing this.
Comment by Thomas Bohn (tehabe) - Monday, 22 December 2008, 22:01 GMT
When I attach the DVD drive:

UEVENT[1229983144.534886] add /devices/pci0000:00/0000:00:1d.7/usb1/1-2 (usb)
UEVENT[1229983144.536398] add /devices/pci0000:00/0000:00:1d.7/usb1/1-2/1-2:1.0 (usb)
UEVENT[1229983144.540316] add /devices/pci0000:00/0000:00:1d.7/usb1/1-2/1-2:1.0/host3 (scsi)
UEVENT[1229983144.541180] add /devices/pci0000:00/0000:00:1d.7/usb1/1-2/1-2:1.0/host3/scsi_host/host3 (scsi_host)
UEVENT[1229983144.542218] add /devices/pci0000:00/0000:00:1d.7/usb1/1-2/1-2:1.0/usb_endpoint/usbdev1.5_ep01 (usb_endpoint)
UEVENT[1229983144.543755] add /devices/pci0000:00/0000:00:1d.7/usb1/1-2/1-2:1.0/usb_endpoint/usbdev1.5_ep82 (usb_endpoint)
UEVENT[1229983144.545377] add /devices/pci0000:00/0000:00:1d.7/usb1/1-2/usb_endpoint/usbdev1.5_ep00 (usb_endpoint)
UDEV [1229983144.550774] add /devices/pci0000:00/0000:00:1d.7/usb1/1-2 (usb)
UDEV [1229983144.553563] add /devices/pci0000:00/0000:00:1d.7/usb1/1-2/1-2:1.0 (usb)
UDEV [1229983144.566819] add /devices/pci0000:00/0000:00:1d.7/usb1/1-2/usb_endpoint/usbdev1.5_ep00 (usb_endpoint)
UDEV [1229983144.575194] add /devices/pci0000:00/0000:00:1d.7/usb1/1-2/1-2:1.0/usb_endpoint/usbdev1.5_ep01 (usb_endpoint)
UDEV [1229983144.575493] add /devices/pci0000:00/0000:00:1d.7/usb1/1-2/1-2:1.0/usb_endpoint/usbdev1.5_ep82 (usb_endpoint)
UDEV [1229983144.576028] add /devices/pci0000:00/0000:00:1d.7/usb1/1-2/1-2:1.0/host3 (scsi)
UDEV [1229983144.580248] add /devices/pci0000:00/0000:00:1d.7/usb1/1-2/1-2:1.0/host3/scsi_host/host3 (scsi_host)
UEVENT[1229983149.582754] add /devices/pci0000:00/0000:00:1d.7/usb1/1-2/1-2:1.0/host3/target3:0:0 (scsi)
UEVENT[1229983149.583806] add /devices/pci0000:00/0000:00:1d.7/usb1/1-2/1-2:1.0/host3/target3:0:0/3:0:0:0 (scsi)
UDEV [1229983149.585268] add /devices/pci0000:00/0000:00:1d.7/usb1/1-2/1-2:1.0/host3/target3:0:0 (scsi)
UDEV [1229983149.595339] add /devices/pci0000:00/0000:00:1d.7/usb1/1-2/1-2:1.0/host3/target3:0:0/3:0:0:0 (scsi)
UEVENT[1229983149.602976] add /devices/pci0000:00/0000:00:1d.7/usb1/1-2/1-2:1.0/host3/target3:0:0/3:0:0:0/block/sr0 (block)
UEVENT[1229983149.603311] add /devices/virtual/bdi/11:0 (bdi)
UEVENT[1229983149.603632] add /devices/pci0000:00/0000:00:1d.7/usb1/1-2/1-2:1.0/host3/target3:0:0/3:0:0:0/scsi_device/3:0:0:0 (scsi_device)
UEVENT[1229983149.603987] add /devices/pci0000:00/0000:00:1d.7/usb1/1-2/1-2:1.0/host3/target3:0:0/3:0:0:0/scsi_generic/sg1 (scsi_generic)
UEVENT[1229983149.604384] add /devices/pci0000:00/0000:00:1d.7/usb1/1-2/1-2:1.0/host3/target3:0:0/3:0:0:0/bsg/3:0:0:0 (bsg)
UDEV [1229983149.613836] add /devices/virtual/bdi/11:0 (bdi)
UDEV [1229983149.616425] add /devices/pci0000:00/0000:00:1d.7/usb1/1-2/1-2:1.0/host3/target3:0:0/3:0:0:0/scsi_device/3:0:0:0 (scsi_device)
UDEV [1229983149.632793] add /devices/pci0000:00/0000:00:1d.7/usb1/1-2/1-2:1.0/host3/target3:0:0/3:0:0:0/bsg/3:0:0:0 (bsg)
UDEV [1229983149.642214] add /devices/pci0000:00/0000:00:1d.7/usb1/1-2/1-2:1.0/host3/target3:0:0/3:0:0:0/scsi_generic/sg1 (scsi_generic)
UDEV [1229983149.789775] add /devices/pci0000:00/0000:00:1d.7/usb1/1-2/1-2:1.0/host3/target3:0:0/3:0:0:0/block/sr0 (block)

When I insert a disc:

UEVENT[1229983166.157712] change /devices/pci0000:00/0000:00:1d.7/usb1/1-2/1-2:1.0/host3/target3:0:0/3:0:0:0 (scsi)
UEVENT[1229983166.169689] change /devices/pci0000:00/0000:00:1d.7/usb1/1-2/1-2:1.0/host3/target3:0:0/3:0:0:0/block/sr0 (block)
UDEV [1229983166.170534] change /devices/pci0000:00/0000:00:1d.7/usb1/1-2/1-2:1.0/host3/target3:0:0/3:0:0:0 (scsi)
UDEV [1229983166.738870] change /devices/pci0000:00/0000:00:1d.7/usb1/1-2/1-2:1.0/host3/target3:0:0/3:0:0:0/block/sr0 (block)
Comment by Thomas Bohn (tehabe) - Monday, 22 December 2008, 22:11 GMT
This is done with udevadm control --log-priority=debug, since the monitor bring much information.
Comment by Aaron Griffin (phrakture) - Monday, 22 December 2008, 22:13 GMT
Weird. Since when does udev get change events for media changes like that?

So I wonder if limiting our CD symlink rules to only add/remove events would solve this. Can someone confirm?
Comment by Tobias Powalowski (tpowa) - Monday, 22 December 2008, 22:27 GMT
internal device behaves like this:
on remove disc:
UEVENT[1229984763.123698] change /devices/pci0000:00/0000:00:1f.2/host4/target4:0:0/4:0:0:0 (scsi)
UDEV [1229984763.124813] change /devices/pci0000:00/0000:00:1f.2/host4/target4:0:0/4:0:0:0 (scsi)
on insert disc:
UEVENT[1229984775.007700] change /devices/pci0000:00/0000:00:1f.2/host4/target4:0:0/4:0:0:0 (scsi)
UDEV [1229984775.008480] change /devices/pci0000:00/0000:00:1f.2/host4/target4:0:0/4:0:0:0 (scsi)
Comment by Thomas Bohn (tehabe) - Monday, 22 December 2008, 23:38 GMT
Found the bug but not in udev but in the kernel I use. I use an optimized kernel for the eeePC. With the attached config.
Comment by Tobias Powalowski (tpowa) - Tuesday, 23 December 2008, 08:07 GMT
closing as not a bug you use a package we don't support

Loading...