Hal issues with the new D-Bus

John (J5) Palmieri johnp at redhat.com
Thu Nov 2 18:56:16 PST 2006


I was doing a D-Bus release today and ran into issues with hal
0.5.8.1-4.  It seems that gnome-power-manager was segfaulting hald.  I
was unable to track down the segfault but am holding off releasing the
new D-Bus until I can make sure it is not a problem with libdbus itself.
A couple of things I did notice was that   dbus_connection_close was
called a few times in these files

tools/hal-device.c
tools/lshal.c
hald/linux/addons/addon-cpufreq.c

You are only supposed to close connections you own otherwise you are
just supposed to unref shared connections.  Older versions of D-Bus
would just throw a warning.  The newer one asserts.  Please take these
out if they do not belong.

There is also an issue with libhal_device_add_capability in
libhal/libhal.c.  hald/linux/addons/addon-cpufreq.c asserts in
dbus_init.  This is because you send in a NULL for error and then in
libhal_device_add_capability check dbus_error_is_set (error) which will
assert if error == NULL.  You can either pass error objects to the API
or check if error == NULL before calling dbus_error_is_set.

Also not related to D-Bus, but I get a lot of Warning: Error while wite
r->input () to stdin_v.  There is a typo s/wite/write and should I be
getting these?

Attached is the output of running hald --daemon=no --verbose=yes, when
running gnome-power-manager it crashes.

Here is a gdb bt:

#0  0x00af1d48 in strcmp () from /lib/libc.so.6
#1  0x0805f10c in hald_dbus_filter_handle_methods
(connection=0x9699ba8, 
    message=0x97c7b48, user_data=0x0, local_interface=0) at
hald_dbus.c:3822
#2  0x0805f53e in hald_dbus_filter_function (connection=0x9699ba8, 
    message=0x97c7b48, user_data=0x0) at hald_dbus.c:3934
#3  0x0040bfb3 in dbus_connection_dispatch (connection=0x9699ba8)
    at dbus-connection.c:4267
#4  0x02bc2ddd in dbus_server_setup_with_g_main ()
   from /usr/lib/libdbus-glib-1.so.2
#5  0x03cd1342 in g_main_context_dispatch () from /lib/libglib-2.0.so.0
#6  0x03cd431f in g_main_context_check () from /lib/libglib-2.0.so.0
#7  0x03cd46c9 in g_main_loop_run () from /lib/libglib-2.0.so.0
#8  0x080572e2 in main (argc=2, argv=0xbfc16e94) at hald.c:582
#9  0x00a9bf2c in __libc_start_main () from /lib/libc.so.6
#10 0x0804c271 in _start ()


in hald_dbus_filter_handle_methods it seems that
helper_interface_handlers is corrupt or at least the data (hih) is.

Can someone grab the D-Bus sources from CVS and help debug this?
Thanks.

-- 
John (J5) Palmieri <johnp at redhat.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hald-verbose.log
Type: text/x-log
Size: 216653 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/hal/attachments/20061102/e6003dbc/hald-verbose-0001.bin


More information about the hal mailing list