hal-storage-mount segfaults when trying to mount some removable device

Ozan Çağlayan ozan at pardus.org.tr
Fri May 22 16:06:33 PDT 2009


Tested with a DVD media and a VFAT removable usb stick.

udev 142
HAL 0.5.12
util-linux 2.15

The following is from dmesg:

[ 2425.808139] hal-storage-mou[25169]: segfault at 0 ip 0804a726 sp
bf85c500 error 4 in hal-storage-mount[8048000+7000]
[ 2478.681441] hal-storage-mou[25175]: segfault at 0 ip 0804a726 sp
bf883570 error 4 in hal-storage-mount[8048000+7000]
[ 2565.567246] hal-storage-mou[25196]: segfault at 0 ip 0804a726 sp
bfac23a0 error 4 in hal-storage-mount[8048000+7000]

Here's the gdb backtrace for hal-storage-mount:

(gdb) continue
Continuing.

Program received signal SIGSEGV, Segmentation fault.
0x0804a726 in handle_mount (hal_ctx=0x8284008, udi=0xbff7b9c0
"/org/freedesktop/Hal/devices/volume_uuid_44CE_9175", volume=0x8287d18,
drive=0x8288848, device=0xbff7b9a5 "/dev/sdb",
    invoked_by_uid=0xbff7bf0e "1000", invoked_by_syscon_name=0xbff7bf43
":1.43") at hal-storage-mount.c:789
789                     if (strcmp (libhal_volume_get_fstype (volume),
"vfat") != 0 &&
(gdb) bt
#0  0x0804a726 in handle_mount (hal_ctx=0x8284008, udi=0xbff7b9c0
"/org/freedesktop/Hal/devices/volume_uuid_44CE_9175", volume=0x8287d18,
drive=0x8288848,
    device=0xbff7b9a5 "/dev/sdb", invoked_by_uid=0xbff7bf0e "1000",
invoked_by_syscon_name=0xbff7bf43 ":1.43") at hal-storage-mount.c:789
#1  0x0804b89a in main (argc=<value optimized out>, argv=<value
optimized out>) at hal-storage-mount.c:1109

And also an interesting part from hald output during probing/mounting:

[3650]: 23:03:16.044 [D] probe-volume.c:377: volume.block_size = 512
[3650]: 23:03:16.044 [D] probe-volume.c:381: volume.size = 4063232000
[3650]: 23:03:16.044 [D] probe-volume.c:604: start probing for
filesystem ...
[3650]: 23:03:16.045 [I] probe-volume.c:628: invoking
blkid_do_safeprobe, offset=0, size=0
[3650]: 23:03:16.067 [I] probe-volume.c:632: blkid_do_safeprobe returned
0               
[3650]: 23:03:16.067 [D] probe-volume.c:96: volume.fsusage =
'filesystem'                
[3650]: 23:03:16.067 [D] probe-volume.c:102: volume.fstype =
'vfat'                      
[3650]: 23:03:16.067 [D] probe-volume.c:107: volume.fsversion =
'FAT32'                  
[3650]: 23:03:16.067 [D] probe-volume.c:112: volume.uuid =
'44CE-9175'                   
23:03:16.068 [I] hald_dbus.c:1342: volume.block_size ->
512                              
23:03:16.068 [I] hald_dbus.c:1350: volume.size ->
4063232000                             
23:03:16.068 [I] hald_dbus.c:1334: volume.fsusage ->
filesystem                          
23:03:16.068 [I] hald_dbus.c:1334: volume.fstype ->
vfat                                 
23:03:16.068 [I] hald_dbus.c:1334: volume.fstype ->                   
// Seems like the content is somehow erased causing a null ptr deref maybe?
23:03:16.068 [I] hald_dbus.c:1334: volume.fsversion ->
FAT32                             
23:03:16.068 [I] hald_dbus.c:1334: volume.uuid ->
44CE-9175                              
23:03:16.068 [I] hald_dbus.c:1334: info.product -> Volume
(vfat)                         
pid 3650: rc=0 signaled=0: /usr/libexec/hald-probe-volume
...
...

I also found a bug report for karmic in launchpad:
https://bugs.launchpad.net/ubuntu/+source/hal/+bug/376786

I couldn't try to bisect it as between my last working snapshot
(03042009) and the current HEAD, the transition from libvolid to
libblkid is done.

The problem is really annoying, hope that someone will enlighten the
situation

Thanks,
Ozan Caglayan

http://www.pardus.org.tr/eng


More information about the hal mailing list