Bug 26182 - Daemon crashes if reload is triggered before anything happens on the bus
Summary: Daemon crashes if reload is triggered before anything happens on the bus
Status: RESOLVED FIXED
Alias: None
Product: dbus
Classification: Unclassified
Component: core (show other bugs)
Version: 1.2.x
Hardware: Other All
: medium normal
Assignee: Havoc Pennington
QA Contact: John (J5) Palmieri
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-22 23:33 UTC by James Westby
Modified: 2010-02-01 14:39 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
patch (1.65 KB, patch)
2010-02-01 14:37 UTC, Colin Walters
Details | Splinter Review

Description James Westby 2010-01-22 23:33:57 UTC
(gdb) bt
#0  _dbus_user_database_flush (db=0x0) at dbus-userdb.c:573
#1  0x00798d85 in _dbus_user_database_flush_system () at dbus-userdb.c:348
#2  0x00795d07 in _dbus_flush_caches () at dbus-sysdeps-unix.c:3391
#3  0x0076de45 in bus_context_reload_config (context=0x1b4d080, error=0xbfd85ce0) at bus.c:811
#4  0x0077ed86 in handle_reload_watch (watch=0x1b4d058, flags=1, data=0x0) at main.c:174
#5  0x0078fe19 in dbus_watch_handle (watch=0x1b4d058, flags=1) at dbus-watch.c:669
#6  0x0077ecb4 in reload_watch_callback (watch=0x1b4d058, condition=1, data=0x0) at main.c:191
#7  0x00799e30 in _dbus_loop_iterate (loop=0x1b4d038, block=1) at dbus-mainloop.c:810
#8  0x00799f38 in _dbus_loop_run (loop=0x1b4d038) at dbus-mainloop.c:874
#9  0x0077f5ad in main (argc=8, argv=0xbfd86284) at main.c:473
(gdb) 

The system db hasn't be inited yet, so the reload crashes.

It should probably just shortcut the reload if it is still NULL,
as the cache can't be stale.

Thanks,

James
Comment 1 Colin Walters 2010-02-01 14:37:52 UTC
Created attachment 32982 [details] [review]
patch
Comment 2 Colin Walters 2010-02-01 14:39:04 UTC
oops, that patch included a configure.in change; ignore it.  Pushed the right fix to dbus-1.2, will merge master in a bit.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.