hal does not recognize firewire drive

Bug #36274 reported by Ryan
16
Affects Status Importance Assigned to Milestone
HAL
Fix Released
Medium
hal (Ubuntu)
Fix Released
Medium
Martin Pitt

Bug Description

Distribution: dapper
kernel - Linux ruinaudio 2.6.15-6-386 #1 Thu Dec 1 03:52:29 UTC 2005 i686 GNU/Linux
machine - Dell inspiron 5100
deviced affected - firewire/IDE external hard drive & usb mass storage mp3 player

After the move from hotplug to udev, connected firewire and usb external hard
drives are not mounted automatically. I am able to mount them via CLI however.
dmesg reveals the kernel is seeing the devices attached. floppy disks are
mounted but with intermittant success and only after several minutes of "thrashing".

Steps to reproduce the problem:
1. Plug firewire or USB drive into computer
2. mtab shows no drive mounted, /dev/sdXX is not created, drive does not appear
in gnome

https://bugs.freedesktop.org/show_bug.cgi?id=5558: https://bugs.freedesktop.org/show_bug.cgi?id=5558

Revision history for this message
Scott James Remnant (scott-bugs) wrote :

Works for me.

Which version of the following packages are you using?
  linux-image-*
  udev
  module-init-tools
  hal
  gnome-volume-manager
  pmount

Revision history for this message
Ryan (ruinaudio) wrote :

Additional Information:

linux-image-2.6.15-6-686
udev 077-0ububtu2
module-init-tools 3.2.1-0ubuntu6
hal 0.5.5.1-1ubuntu3
hal-device-manager 0.5.5.1-1ubuntu3
gnome-volume-manager 1.5.3-0ubuntu2
pmount 0.9.6-1

Revision history for this message
Ryan (ruinaudio) wrote :

Ugh... shoulda updated before posting but...

The issue persists with linux-image-2.6.15-6-686

One important correction! /dev/sda /dev/sda1 /dev/sda2 /dev/sda3 (which are the
correct partitions) do appear, sorry for the prior misinformation. Also this
drive is formatted xfs.

Here's relevant dmesg output when plugging in the firewire drive:

[17179693.728000] ieee1394: Error parsing configrom for node 0-00:1023
[17179693.728000] ieee1394: Node changed: 0-00:1023 -> 0-01:1023
[17179699.076000] ieee1394: Node added: ID:BUS[0-00:1023] GUID[0030e002e0000bc8]
[17179699.076000] scsi0 : SBP-2 IEEE-1394
[17179700.184000] ieee1394: sbp2: Logged into SBP-2 device
[17179700.184000] ieee1394: Node 0-00:1023: Max speed [S400] - Max payload [2048]
[17179700.184000] Vendor: HTE72604 Model: 0M9AT00 Rev:
[17179700.184000] Type: Direct-Access-RBC ANSI SCSI
revision: 04
[17179700.256000] SCSI device sda: 78140160 512-byte hdwr sectors (40008 MB)
[17179700.260000] SCSI device sda: drive cache: write back
[17179700.268000] SCSI device sda: 78140160 512-byte hdwr sectors (40008 MB)
[17179700.268000] SCSI device sda: drive cache: write back
[17179700.268000] sda: sda1 sda2 sda3
[17179700.292000] sd 0:0:0:0: Attached scsi disk sda

-ryan

Revision history for this message
Scott James Remnant (scott-bugs) wrote :

Right, not a udev bug then -- pitti, this is one of yours.

Revision history for this message
Ryan (ruinaudio) wrote :

Created an attachment (id=5215)
following https://wiki.ubuntu.com/DebuggingRemovableDevices

Revision history for this message
Ryan (ruinaudio) wrote :

Created an attachment (id=5216)
devices txt

Revision history for this message
Ryan (ruinaudio) wrote :

Created an attachment (id=5217)
dmesg

Revision history for this message
Ryan (ruinaudio) wrote :

Created an attachment (id=5218)
hal output

Revision history for this message
Martin Pitt (pitti) wrote :

This should have been fixed in

 udev (077-0ubuntu3) dapper; urgency=low
 [...]
   * Rule changes:
     - Change group of USB and IEEE1394 block devices to plugdev and change
       permissions to 0640.
       Rationale: pmount/g-v-m/hal needs them in this group to work.

Thanks, Scott.

Revision history for this message
Ryan (ruinaudio) wrote :
Download full text (4.3 KiB)

with udev (077-0ubuntu3) permissions are set to:

brw-rw---- 1 root disk 8, 3 2005-12-08 09:48 sda3

ryanpg@ruinaudio:/dev$ udevinfo -a -p /block/sda/sda3

udevinfo starts with the device the node belongs to and then walks up the
device chain, to print for every device found, all possibly useful attributes
in the udev key format.
Only attributes within one device section may be used together in one rule,
to match the device for which the node will be created.

device '/sys/block/sda/sda3' has major:minor 8:3
  looking at class device '/sys/block/sda/sda3':
    KERNEL=="sda3"
    SUBSYSTEM=="block"
    SYSFS{dev}=="8:3"
    SYSFS{size}=="77010944"
    SYSFS{start}=="1128448"
    SYSFS{stat}==" 15 120 0 0"

follow the "device"-link to the physical device:
  looking at the device chain at
'/sys/devices/pci0000:00/0000:00:1e.0/0000:02:04.1/fw-host0/0030e002e0000bc8/0030e002e0000bc8-0/host1/target1:0:0/1:0:0:0':
    BUS=="scsi"
    ID=="1:0:0:0"
    DRIVER=="sd"
    SYSFS{device_blocked}=="0"
    SYSFS{ieee1394_id}=="0030e002e0000bc8:0:0"
    SYSFS{iocounterbits}=="32"
    SYSFS{iodone_cnt}=="0x34"
    SYSFS{ioerr_cnt}=="0x1"
    SYSFS{iorequest_cnt}=="0x34"
    SYSFS{model}=="0M9AT00 "
    SYSFS{queue_depth}=="1"
    SYSFS{queue_type}=="none"
    SYSFS{rev}==" "
    SYSFS{scsi_level}=="5"
    SYSFS{state}=="running"
    SYSFS{timeout}=="30"
    SYSFS{type}=="14"
    SYSFS{vendor}=="HTE72604"

  looking at the device chain at
'/sys/devices/pci0000:00/0000:00:1e.0/0000:02:04.1/fw-host0/0030e002e0000bc8/0030e002e0000bc8-0/host1/target1:0:0':
    BUS==""
    ID=="target1:0:0"
    DRIVER=="unknown"

  looking at the device chain at
'/sys/devices/pci0000:00/0000:00:1e.0/0000:02:04.1/fw-host0/0030e002e0000bc8/0030e002e0000bc8-0/host1':
    BUS==""
    ID=="host1"
    DRIVER=="unknown"

  looking at the device chain at
'/sys/devices/pci0000:00/0000:00:1e.0/0000:02:04.1/fw-host0/0030e002e0000bc8/0030e002e0000bc8-0':
    BUS=="ieee1394"
    ID=="0030e002e0000bc8-0"
    DRIVER=="sbp2"
    SYSFS{address}=="0x0000fffff0000830"
    SYSFS{ignore_driver}=="0"
    SYSFS{length}=="0"
    SYSFS{model_id}=="0x000001"
    SYSFS{model_name_kv}=="OXFORD IDE Device "
    SYSFS{specifier_id}=="0x00609e"
    SYSFS{version}=="0x010483"

  looking at the device chain at
'/sys/devices/pci0000:00/0000:00:1e.0/0000:02:04.1/fw-host0/0030e002e0000bc8':
    BUS=="ieee1394"
    ID=="0030e002e0000bc8"
    DRIVER=="unknown"
    SYSFS{bus_options}=="IRMC_0_ CMC_0_ ISC_0_ BMC_0_ PMC_0_ GEN_0_ LSPD_2_
MAX_REC_64_ MAX_ROM_0_ CYC_CLK_ACC_255_"
    SYSFS{capabilities}=="0x0083c0"
    SYSFS{guid_vendor_id}=="0x0030e0"
    SYSFS{guid}=="0x0030e002e0000bc8"
    SYSFS{guid_vendor_oui}=="OXFORD SEMICONDUCTOR LTD."
    SYSFS{nodeid}=="0xffc0"
    SYSFS{tlabels_allocations}=="277"
    SYSFS{tlabels_free}=="64"
    SYSFS{tlabels_mask}=="0x0000000000000000"
    SYSFS{vendor_id}=="0x0030e0"
    SYSFS{vendor_name_kv}=="Oxford Semiconductor Ltd. "
    SYSFS{vendor_oui}=="OXFORD SEMICONDUCTOR LTD."

  looking at the device chain at
'/sys/devices/pci0000:00/0000:00:1e.0/0000:02:04.1/fw-host0':
    BUS=="ieee1394"
    ID=="fw-host0"
    DRIVER=="unknown"
    SYSFS{...

Read more...

Revision history for this message
Ryan (ruinaudio) wrote :

Created an attachment (id=5224)
gvm.log devices.txt dmesg.txt hal.txt

Revision history for this message
Ryan (ruinaudio) wrote :

usb drive automounting in gnome now works with udev 077-0ubuntu4 (dunno what
changed re: usb)
firewire drive still is not mounted

Revision history for this message
Martin Pitt (pitti) wrote :

This should have been fixed in

udev (077-0ubuntu5) dapper; urgency=low

  "And if you're lucky, then the god's a she."

  * Spell firewire correctly (with the extra e).
  [...]

Please cry out loudly if it still does not work.

Revision history for this message
Ryan (ruinaudio) wrote :

With udev 077-0ubuntu5 still no automount of the firewire drive. pmount still works

Revision history for this message
Ryan (ruinaudio) wrote :

Created an attachment (id=5495)
gvm log

Revision history for this message
Ryan (ruinaudio) wrote :

Created an attachment (id=5496)
lshal output

Revision history for this message
Ryan (ruinaudio) wrote :

brw-r----- 1 root plugdev 8, 0 2005-12-29 16:29 /dev/sda
brw-r----- 1 root plugdev 8, 1 2005-12-29 16:29 /dev/sda1
brw-r----- 1 root plugdev 8, 2 2005-12-29 16:29 /dev/sda2
brw-r----- 1 root plugdev 8, 3 2005-12-29 16:29 /dev/sda3

Revision history for this message
Ryan (ruinaudio) wrote :

Created an attachment (id=5497)
dmesg output

Some stuff early in the log looked relevant so I'm attaching the whole thing.

Revision history for this message
Martin Pitt (pitti) wrote :

hal does not see the firewire device, nor its partitions.

Can you please get a full hal debug output?

Revision history for this message
Ryan (ruinaudio) wrote :

Created an attachment (id=5506)
full hal debug output

Revision history for this message
Martin Pitt (pitti) wrote :

For the records:

13:27:53.104 [I] blockdev.c:477: get_luks_uuid: device_file=/dev/sda1
13:27:53.104 [I] blockdev.c:602: Ignoring hotplug event - no parent

I had several reports about this already. hal does not add /dev/sda for some
reason, so it cannot add the volumes either. But the log does not tell me why :(

Revision history for this message
Martin Pitt (pitti) wrote :

forwarded upstream

Revision history for this message
In , Martin Pitt (pitti) wrote :

I have several reports about firewire drives not working with hal 0.5.5.1 (udev
079, dbus 0.60, kernel 2.6.15). The device is recognized, but hal does not add
nodes for volumes:

13:27:52.857 [I] osspec.c:203: SEQNUM=2453, ACTION=add, SUBSYS=block,
SYSFSPATH=/block/sda, DEVNAME=/dev/sda, IFINDEX=-1
13:27:52.858 [I] blockdev.c:566: block_add: sysfs_path=/sys/block/sda
dev=/dev/sda is_part=0, parent=0x08089570
13:27:52.858 [I] blockdev.c:781: parent_bus is scsi
13:27:53.088 [I] osspec.c:203: SEQNUM=2454, ACTION=add, SUBSYS=block,
SYSFSPATH=/block/sda/sda1, DEVNAME=/dev/sda1, IFINDEX=-1
13:27:53.088 [I] blockdev.c:566: block_add: sysfs_path=/sys/block/sda/sda1
dev=/dev/sda1 is_part=1, parent=0x00000000
13:27:53.088 [I] blockdev.c:477: get_luks_uuid: device_file=/dev/sda1
13:27:53.088 [I] blockdev.c:602: Ignoring hotplug event - no parent

so parent is indeed NULL for /dev/sda1, although it is valid for /dev/sda (and
the order looks fine, too).

The original bug report https://bugzilla.ubuntu.com/show_bug.cgi?id=20564 has
full details and logs.

Can this be related to #5403?

Thanks in advance!

Changed in hal:
status: Unconfirmed → Confirmed
Revision history for this message
In , Zeuthen (zeuthen) wrote :

Is this still an issue with 0.5.7.1 or later and recent udev versions? Or can I
close this as FIXED?

Changed in hal:
status: Confirmed → Needs Info
Revision history for this message
Daniel Holbach (dholbach) wrote :

Upstream asks: "Is this still an issue with 0.5.7.1 or later and recent udev versions? Or can I close this as FIXED?"

Changed in hal:
status: Unconfirmed → Needs Info
Revision history for this message
In , Daniel Holbach (dholbach) wrote :

The Ubuntu user reports it as fixed. Closing the bug.

Revision history for this message
mangar (mycrapaccount-deactivatedaccount) wrote :

it works now!! w00t!
thanks for your help!

(it can be closed now)

Revision history for this message
Daniel Holbach (dholbach) wrote :

Thanks for following up.

Changed in hal:
status: Needs Info → Fix Released
Changed in hal:
status: Needs Info → Fix Released
Revision history for this message
In , Martin Pitt (pitti) wrote :

This bug just reappeared for USB DVD drives, and seems to happen fairly
consistently: See https://launchpad.net/bugs/56484.

11:01:20.396 [I] osspec.c:232: SEQNUM=2636, ACTION=add, SUBSYSTEM=scsi_device,
DEVPATH=/sys/class/scsi_device/11:0:0:0, DEVNAME=, IFINDEX=0
11:01:20.397 [I] hotplug.c:205: /sys/class/scsi_device/11:0:0:0 is a class
device (devpath)
11:01:20.397 [I] classdev.c:1378: class_add: subsys=scsi_device
sysfs_path=/sys/class/scsi_device/11:0:0:0 dev= physdev=0x100c86c8
11:01:20.617 [I] osspec.c:232: SEQNUM=2637, ACTION=add, SUBSYSTEM=scsi_generic,
DEVPATH=/sys/class/scsi_generic/sg0, DEVNAME=/dev/sg0, IFINDEX=0
11:01:20.619 [I] hotplug.c:205: /sys/class/scsi_generic/sg0 is a class device
(devpath)
11:01:20.619 [I] classdev.c:1378: class_add: subsys=scsi_generic
sysfs_path=/sys/class/scsi_generic/sg0 dev=/dev/sg0 physdev=0x100c86c8
11:01:20.633 [I] classdev.c:1241: Add callouts completed
udi=/org/freedesktop/Hal/devices/usb_device_409_56_000000000001_if0_scsi_host_scsi_device_lun0_scsi_generic
11:01:20.633 [I] hald.c:82: Added device to GDL;
udi=/org/freedesktop/Hal/devices/usb_device_409_56_000000000001_if0_scsi_host_scsi_device_lun0_scsi_generic

Message from syslogd@localhost at Wed Aug 23 11:01:20 2006 ...
localhost kernel: [33867.200668] sr0: scsi3-mmc drive: 8x/48x writer cd/rw
xa/form2 cdda tray
11:01:27.329 [I] osspec.c:232: SEQNUM=2635, ACTION=add, SUBSYSTEM=block,
DEVPATH=/sys/block/sr0, DEVNAME=/dev/scd0, IFINDEX=0
11:01:27.330 [I] hotplug.c:208: /sys/block/sr0 is a block device (devpath)
11:01:27.331 [I] blockdev.c:589: block_add: sysfs_path=/sys/block/sr0
dev=/dev/scd0 is_part=1, parent=0x00000000
11:01:27.332 [I] blockdev.c:499: get_luks_uuid: device_file=/dev/scd0
11:01:27.332 [I] blockdev.c:625: Ignoring hotplug event - no parent
11:01:27.332 [W] blockdev.c:990: Not adding device object

Thus hal has no idea whatsoever about /dev/sr0, although the device is present
in the system and works quite well.

Revision history for this message
In , Martin Pitt (pitti) wrote :

OK, I think I have an idea about what goes wrong now:

* The kernel creates /sys/block/sr0, which is the block device for the USB CD-ROM.

* ./hald/linux2/hotplug.c, around line 285:

   is_partition = isdigit(hotplug_event->sysfs.sysfs_path[len - 1]) ||
      strstr (hotplug_event->sysfs.sysfs_path, "/fakevolume") ;

  hal assumes that devices ending with a number are partitions on a block
device, which is not the case for SCSI CD-ROMs (i.e. it's not
/sys/block/sra/sra0, SCSI CD-ROMs are enumerated with numbers, not with letters
as ATAPI devices are). Thus is_partition becomes true.

    if (is_partition) {
       gchar *parent_path;
       parent_path = hal_util_get_parent_path (hotplug_event->sysfs.sysfs_path);

sysfs.sysfs_path is /sys/block/sr0, thus parent_path is /sys/block, which is of
course not a device.

       parent = hal_device_store_match_key_value_string (hald_get_gdl (),

"linux.sysfs_path_device", parent_path);

parent becomes NULL here, which is then directly passed to
hotplug_event_begin_add_blockdev(), which throws the event away.

Revision history for this message
In , Martin Pitt (pitti) wrote :

Created an attachment (id=6658)
hack to fix it

I created a small patch that fixes it for now; it's pretty ugly, i. e.
eventually the original is_partition condition should be reworked properly, but
the patch should point out what the actual problem is.

   * Add 16-nonpartitions-ending-in-nums.patch:
     - Hal currently assumes that device names ending in numbers are
       partitions. This patch adds a safe and easy, but slightly ugly
       workaround. (Real fix will be discussed with upstream at
       https://bugs.freedesktop.org/show_bug.cgi?id=5558)
     - This breaks SCSI, USB, and Firewire CD drives, which are usually called
       'scd0', 'sr1', etc.

Changed in hal:
status: Fix Released → Confirmed
Revision history for this message
In , Danny Kukawka (danny-kukawka) wrote :

This is IIRC fixed in actual HAL versions by check for the range file in sysfs. Close as Fixed

Changed in hal:
status: Confirmed → Fix Released
Changed in hal:
importance: Unknown → Medium
Changed in hal:
importance: Medium → Unknown
Changed in hal:
importance: Unknown → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.