Help in debugging a crashing hald on startup

Andy Jones andy at hasbox.com
Sun Sep 30 15:07:28 PDT 2007


Hi,

i seem to be having no end of problems with hald running on one of my 
boxes. On the other desktop and laptop running the same svn version and 
everything works fine. So i'm on a uptodate svn hald (0.5.10) and on 
startup it crashes immediately. Firstly it crashes on the smbios probe..

# gdb /usr/sbin/hald
GNU gdb 6.6
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain 
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu"...
Using host libthread_db library "/lib/libthread_db.so.1".
(gdb) r --daemon=no --verbose=yes
Starting program: /usr/sbin/hald --daemon=no --verbose=yes
Failed to read a valid object file image from memory.
02:03:18.152 [I] hald.c:634: hal 0.5.10
02:03:18.152 [I] hald.c:699: Will not daemonize
02:03:18.152 [I] hald_dbus.c:5284: local server is listening at 
unix:abstract=/var/run/hald/dbus-m5WT5pq7Hv,guid=cd6f176fc283fd039557740047001d26
Runner started - allowed paths are 
'/usr/libexec:/usr/lib/hal/scripts:/usr/bin'
02:03:18.156 [I] hald_runner.c:301: Runner has pid 8503
02:03:18.157 [W] ci-tracker.c:299: Could not get uid for connection: 
org.freedesktop.DBus.Error.NameHasNoOwner Could not get UID of name 
'org.freedesktop.DBus': no such name
02:03:18.157 [E] hald_dbus.c:4944: Cannot get caller info for 
org.freedesktop.DBus
02:03:18.157 [I] hald_runner.c:182: runner connection is 0x80a04a0
02:03:18.163 [I] mmap_cache.c:273: Cache needs update
02:03:18.163 [I] mmap_cache.c:129: Regenerating fdi cache..
Run started hald-generate-fdi-cache (60000) (0)
!  full path is '/usr/libexec/hald-generate-fdi-cache', program_dir is 
'/usr/libexec'
/usr/libexec/hald-generate-fdi-cache exited
02:03:18.292 [I] mmap_cache.c:105: In regen_cache_cb exit_type=0, 
return_code=0
02:03:18.292 [I] mmap_cache.c:161: fdi cache generation done
02:03:18.292 [I] mmap_cache.c:282: cache mtime is 1191189740
02:03:18.292 [I] mmap_cache.c:83: preprobe: offset=00000014, size=2700
02:03:18.292 [I] mmap_cache.c:85: information: offset=00000aa0, size=77152
02:03:18.292 [I] mmap_cache.c:87: policy: offset=00013800, size=27860
02:03:18.294 [I] osspec.c:688: got 10de:240 as primary videocard
Run started hald-probe-smbios (10000) (0)
!  full path is '/usr/libexec/hald-probe-smbios', program_dir is 
'/usr/libexec'
02:03:18.359 [I] hald_dbus.c:5243: ***************************
02:03:18.359 [I] hald_dbus.c:5244: ********* got a connection 80a63a0
02:03:18.359 [I] hald_dbus.c:5245: ***************************
02:03:18.367 [I] hald_dbus.c:5186: ************************
02:03:18.367 [I] hald_dbus.c:5187: Client to local_server was 
disconnected for 80a63a0
02:03:18.367 [I] hald_dbus.c:5188: ************************

Program received signal SIGSEGV, Segmentation fault.
0xb7dfc48a in g_hash_table_foreach_remove_or_steal (hash_table=0x0,
     func=0x806057a <singleton_remove_by_connection>, 
user_data=0x80a63a0, notify=1) at ghash.c:612
612     ghash.c: No such file or directory.
         in ghash.c
(gdb) /usr/libexec/hald-probe-smbios exited
where
#0  0xb7dfc48a in g_hash_table_foreach_remove_or_steal (hash_table=0x0,
     func=0x806057a <singleton_remove_by_connection>, 
user_data=0x80a63a0, notify=1) at ghash.c:612
#1  0xb7dfc306 in IA__g_hash_table_foreach_remove (hash_table=0x0,
     func=0x806057a <singleton_remove_by_connection>, 
user_data=0x80a63a0) at ghash.c:576
#2  0x08064684 in local_server_message_handler (connection=0x80a63a0, 
message=0x809dd38, user_data=0x0)
     at hald_dbus.c:5204
#3  0xb7dc6c9b in _dbus_object_tree_dispatch_and_unlock () from 
/usr/lib/libdbus-1.so.3
#4  0xb7db9af1 in dbus_connection_dispatch () from /usr/lib/libdbus-1.so.3
#5  0xb7ec572d in message_queue_dispatch () from 
/usr/lib/libdbus-glib-1.so.2
#6  0xb7e07428 in g_main_dispatch (context=0x809cce0) at gmain.c:2061
#7  0xb7e08812 in IA__g_main_context_dispatch (context=0x809cce0) at 
gmain.c:2613
#8  0xb7e08d29 in g_main_context_iterate (context=0x809cce0, block=1, 
dispatch=1, self=0x809d6c8)
     at gmain.c:2694
#9  0xb7e09380 in IA__g_main_loop_run (loop=0x809cd60) at gmain.c:2898
#10 0x08059e55 in main (argc=3, argv=0xbf8faf54) at hald.c:774
(gdb)


Clearly hash_table is NULL leading to the crash.

Then if i remove the hald-probe-smbios executable, it crashed in 
hald-probe-storage. The only difference on the failing machine is that 
this has a IDE2CF adapter and a 8GB CF in the slot. This appears at hda 
and it's the last probe it does is that device

...[initial device probe stuff removed for brevity]....
02:05:38.314 [I] blockdev.c:1227: parent_bus is ide
02:05:38.315 [I] blockdev.c:494: Probing storage device /dev/hda
Run started hald-probe-storage (10000) (0)
!  full path is '/usr/libexec/hald-probe-storage', program_dir is 
'/usr/libexec'
woohoo
02:05:38.317 [I] hald_dbus.c:5243: ***************************
02:05:38.317 [I] hald_dbus.c:5244: ********* got a connection 80dfb90
02:05:38.317 [I] hald_dbus.c:5245: ***************************
[8546]: 02:05:38.317 [D] probe-storage.c:155: Doing probe-storage for 
/dev/hda (bus ide) (drive_type disk) 
(udi=/org/freedesktop/Hal/devices/temp/101) (--only-check-for-fs==0)
[8546]: 02:05:38.318 [D] probe-storage.c:395: Checking for file system 
on /dev/hda
[8546]: 02:05:38.318 [D] probe-storage.c:401: Doing open ("/dev/hda", 
O_RDONLY)
[8546]: 02:05:38.318 [D] probe-storage.c:409: Returned from open(2)
[8546]: 02:05:38.318 [D] probe-storage.c:425: look for existing 
partitions for hda
[8546]: 02:05:38.318 [D] probe-storage.c:435: partition hda1 found, skip 
probing for filesystem
02:05:38.318 [D] hald_dbus.c:3212: udi=/org/freedesktop/Hal/devices/computer
02:05:38.318 [I] hald_dbus.c:3238: AddonIsReady on udi 
'/org/freedesktop/Hal/devices/computer'
02:05:38.319 [D] hald_dbus.c:3141: udi=/org/freedesktop/Hal/devices/computer
02:05:38.319 [I] hald_dbus.c:3166: Local connection 0x80c58d8 to handle 
interface 'org.freedesktop.Hal.Device.CPUFreq' on udi 
'/org/freedesktop/Hal/devices/computer'
02:05:38.321 [D] hald_dbus.c:3212: udi=/org/freedesktop/Hal/devices/computer
02:05:38.321 [I] hald_dbus.c:3238: AddonIsReady on udi 
'/org/freedesktop/Hal/devices/computer'
[8546]: 02:05:38.322 [I] partutil.c:860: MSDOS partition table detected
02:05:38.323 [I] hald_dbus.c:1285: storage.removable.media_available -> True
02:05:38.323 [I] hald_dbus.c:1269: storage.removable.media_size -> 
8195604480
02:05:38.323 [I] hald_dbus.c:1253: storage.partitioning_scheme -> mbr
02:05:38.323 [I] hald_dbus.c:5186: ************************
02:05:38.324 [I] hald_dbus.c:5187: Client to local_server was 
disconnected for 80dfb90
02:05:38.324 [I] hald_dbus.c:5188: ************************

Program received signal SIGSEGV, Segmentation fault.
0xb7e7548a in g_hash_table_foreach_remove_or_steal (hash_table=0x0,
     func=0x806057a <singleton_remove_by_connection>, 
user_data=0x80dfb90, notify=1) at ghash.c:612
612     ghash.c: No such file or directory.
         in ghash.c
(gdb) /usr/libexec/hald-probe-storage exited
where
#0  0xb7e7548a in g_hash_table_foreach_remove_or_steal (hash_table=0x0,
     func=0x806057a <singleton_remove_by_connection>, 
user_data=0x80dfb90, notify=1) at ghash.c:612
#1  0xb7e75306 in IA__g_hash_table_foreach_remove (hash_table=0x0,
     func=0x806057a <singleton_remove_by_connection>, 
user_data=0x80dfb90) at ghash.c:576
#2  0x08064684 in local_server_message_handler (connection=0x80dfb90, 
message=0x8122210, user_data=0x0)
     at hald_dbus.c:5204
#3  0xb7e3fc9b in _dbus_object_tree_dispatch_and_unlock () from 
/usr/lib/libdbus-1.so.3
#4  0xb7e32af1 in dbus_connection_dispatch () from /usr/lib/libdbus-1.so.3
#5  0xb7f3e72d in message_queue_dispatch () from 
/usr/lib/libdbus-glib-1.so.2
#6  0xb7e80428 in g_main_dispatch (context=0x809cce0) at gmain.c:2061
#7  0xb7e81812 in IA__g_main_context_dispatch (context=0x809cce0) at 
gmain.c:2613
#8  0xb7e81d29 in g_main_context_iterate (context=0x809cce0, block=1, 
dispatch=1, self=0x809d6c8)
     at gmain.c:2694
#9  0xb7e82380 in IA__g_main_loop_run (loop=0x809cd60) at gmain.c:2898
#10 0x08059e55 in main (argc=3, argv=0xbfde3264) at hald.c:774
(gdb)


And ideas how to debug this ??
A








More information about the hal mailing list