hal not parsing netlink messages properly
Jon Nettleton
jon.nettleton at gmail.com
Fri Oct 28 18:39:56 PDT 2005
In testing that Hal properly recognizes device inputs and outputs, I
have come across another bug. Whenever I rebooted with multiple ( 3 or
mote ) removable media devices in my readers, something would fail to
mount when I logged in. The problem reared it's ugly head when
gnome-volume-manager sent as many asynchronous mount commands as
necessary to mount all the media. My findings show that hal's osspec.c
reads the message buffer and only reads the first null terminated
string. Because the mounts were coming so fast some of the messages are
actually 44bytes which is basically two messages, so the second
mount@/blah/blah/blah is being lost. I have attached the hald verbose
output that illustrates this.
I am not sure this is a problem with netlink or hal. I started to write
something to parse the buffer at null terminated strings and then loop
through the messages, but then thought I should ask you all if this
makes sense.
In the debug output there should have been 5 drives mounted. You can
see only 3 were mounted. The last two having a message length of
44bytes, which equals two "mount@/block/sdc/sdc1" with the null
terminators.
-Jon
-------------- next part --------------
17:46:34.658 [W] hald_dbus.c:86: No property info.callouts.add on device with id /org/freedesktop/Hal/devices/volume_label_FC/4_i386_ftp__1
17:46:34.683 [W] hald_dbus.c:86: No property info.callouts.add on device with id /org/freedesktop/Hal/devices/volume_uuid_28a1c266_ff77_45d5_b88a_165766261527
17:46:34.687 [W] hald_dbus.c:86: No property info.callouts.add on device with id /org/freedesktop/Hal/devices/volume_uuid_af5e9ec4_c09b_471a_9af3_efb45913bbe5
17:46:34.691 [W] hald_dbus.c:86: No property info.callouts.add on device with id /org/freedesktop/Hal/devices/volume_label_SWAP_hda3
17:46:34.698 [W] hald_dbus.c:86: No property info.callouts.add on device with id /org/freedesktop/Hal/devices/volume_part4_size_1024
17:46:34.705 [W] hald_dbus.c:86: No property info.callouts.add on device with id /org/freedesktop/Hal/devices/volume_uuid_4e3d8bab_28f6_492c_b672_69c0c5c67e64
17:46:34.709 [W] hald_dbus.c:86: No property info.callouts.add on device with id /org/freedesktop/Hal/devices/volume_uuid_b49345ad_36c7_47f5_bdc4_2e9ffd29efe8
17:46:34.920 [I] osspec.c:243: total_read=22 buf='mount@/block/sda/sda1'
17:46:34.920 [I] blockdev.c:228: mount_status_changed for '/sys/block/sda/sda1', is_mounted=1
17:46:34.920 [I] blockdev.c:242: Applies to /org/freedesktop/Hal/devices/volume_part1_size_519552512
17:46:34.920 [I] blockdev.c:180: Update mount point for /org/freedesktop/Hal/devices/volume_part1_size_519552512 (device_file /dev/sda1)
17:46:34.960 [I] blockdev.c:206: Setting mount point /media/usbdisk5 for /dev/sda1
17:46:34.975 [W] hald_dbus.c:86: No property volume.disc.is_blank on device with id /org/freedesktop/Hal/devices/volume_part1_size_519552512
17:46:34.976 [W] hald_dbus.c:86: No property volume.disc.has_audio on device with id /org/freedesktop/Hal/devices/volume_part1_size_519552512
17:46:35.048 [I] osspec.c:243: total_read=17 buf='mount@/block/hdc'
17:46:35.049 [I] blockdev.c:228: mount_status_changed for '/sys/block/hdc', is_mounted=1
17:46:35.049 [I] blockdev.c:242: Applies to /org/freedesktop/Hal/devices/volume_label_FC/4_i386_ftp__1
17:46:35.049 [I] blockdev.c:180: Update mount point for /org/freedesktop/Hal/devices/volume_label_FC/4_i386_ftp__1 (device_file /dev/hdc)
17:46:35.084 [I] blockdev.c:206: Setting mount point /media/cdrecorder for /dev/hdc
17:46:35.084 [I] osspec.c:243: total_read=44 buf='mount@/block/sdc/sdc1'
17:46:35.084 [I] blockdev.c:228: mount_status_changed for '/sys/block/sdc/sdc1', is_mounted=1
17:46:35.084 [I] blockdev.c:242: Applies to /org/freedesktop/Hal/devices/volume_part1_size_16363008
17:46:35.084 [I] blockdev.c:180: Update mount point for /org/freedesktop/Hal/devices/volume_part1_size_16363008 (device_file /dev/sdc1)
17:46:35.120 [I] blockdev.c:206: Setting mount point /media/usbdisk3 for /dev/sdc1
17:46:35.120 [I] osspec.c:243: total_read=44 buf='mount@/block/sdb/sdb1'
17:46:35.120 [I] blockdev.c:228: mount_status_changed for '/sys/block/sdb/sdb1', is_mounted=1
17:46:35.120 [I] blockdev.c:242: Applies to /org/freedesktop/Hal/devices/volume_uuid_4215_089D
17:46:35.120 [I] blockdev.c:180: Update mount point for /org/freedesktop/Hal/devices/volume_uuid_4215_089D (device_file /dev/sdb1)
17:46:35.156 [I] blockdev.c:206: Setting mount point /media/usbdisk4 for /dev/sdb1
17:46:35.258 [W] hald_dbus.c:86: No property volume.disc.is_blank on device with id /org/freedesktop/Hal/devices/volume_part1_size_16363008
17:46:35.259 [W] hald_dbus.c:86: No property volume.disc.has_audio on device with id /org/freedesktop/Hal/devices/volume_part1_size_16363008
17:46:35.271 [W] hald_dbus.c:86: No property volume.disc.is_blank on device with id /org/freedesktop/Hal/devices/volume_uuid_4215_089D
17:46:35.273 [W] hald_dbus.c:86: No property volume.disc.has_audio on device with id /org/freedesktop/Hal/devices/volume_uuid_4215_089D
More information about the hal
mailing list