[PATCH] fix hald crash after attempt to unmount ignored volume.

Andrey Borzenkov arvidjaar at mail.ru
Fri Jan 5 00:20:00 PST 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thursday 04 January 2007 22:32, Danny Kukawka wrote:
> On Thursday 04 January 2007 13:21, Andrey Borzenkov wrote:
> > See details in http://qa.mandriva.com/show_bug.cgi?id=27333; if someone
> > tries to unmount ignored media, hald crashes.
>
> IMO this lines doesn't crash HAL. I can't see how this can crash the daemon
> atm.
>

LIBHAL_FREE_DBUS_ERROR writes to stderr which apparently confuses libdbus. 
Full trace is

19:00:32.166 [I] hald_dbus.c:2972: Refreshing mount state 
for /org/freedesktop/Hal/devices/volume_uuid_f340078d_4758_4d33_a4ac_a148c95c7558 
since Unmount() completed
19:00:32.166 [I] hald_dbus.c:3027: failed with 'hal-storage-shared.c 285 : 
INFO: called LIBHAL_FREE_DBUS_ERROR but dbusError was not 
set.' 'org.freedesktop.Hal.Device.Volume.PermissionDenied'
process 4822: arguments to dbus_message_new_error() were incorrect, 
assertion "_dbus_check_is_valid_error_name (error_name)" failed in file 
dbus-message.c line 1207.
This is normally a bug in some application using the D-Bus library.
  /lib/libdbus-1.so.3 [0xb7e090b9]
  /lib/libdbus-1.so.3 [0xb7e08454]
  /lib/libdbus-1.so.3 [0xb7df49a6]
  /lib/libdbus-1.so.3(dbus_message_new_error+0x1ac) [0xb7dd9a4c]
  hald [0x8059042]
  hald [0x804f998]
  /lib/libdbus-1.so.3 [0xb7de0b23]
  /lib/libdbus-1.so.3 [0xb7dc1f83]
  /lib/libdbus-1.so.3(dbus_connection_dispatch+0x1f9) [0xb7dc5189]
  /usr/lib/libdbus-glib-1.so.2 [0xb7f156dd]
  /usr/lib/libglib-2.0.so.0(g_main_context_dispatch+0x188) [0xb7e600f8]
  /usr/lib/libglib-2.0.so.0 [0xb7e630e8]
  /usr/lib/libglib-2.0.so.0(g_main_loop_run+0x1b4) [0xb7e63404]
  hald [0x8056635]
  /lib/i686/libc.so.6(__libc_start_main+0xdc) [0xb7c5575c]
  hald [0x804cad1]

There could be other places like this.

> Btw. I attached a more clean patch to differ between the case where the
> call of libhal_device_get_property_bool() return correct true and the case
> where the call really fail and the error is set (and freed then).
>

OK I was unsure what libhal_device_get_property_bool returns in case of error.

> > Patch attached as kmail tends to mangle lines :(
>
> Please send the patch via KMAil with option "Suggest automatic display".
> ;-)
>

Can I convince Kmail to do it automatically for text attachments?

regards

- -andrey
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)

iD8DBQFFngoxR6LMutpd94wRApUNAJ9GEn0qC4Tzf/3aB0u7QH/eTtxL0ACeNzHD
hUUUB8bG0zo9ObtWo9lOP5w=
=eLlK
-----END PGP SIGNATURE-----


More information about the hal mailing list