GNOME Bugzilla – Bug 670033
gconf-dbus: don't crash during sync if gconfd shutting down
Last modified: 2012-02-17 17:41:52 UTC
I was asked to look at this downstream bug: https://bugzilla.redhat.com/show_bug.cgi?id=756245 which seems to be affecting a number of F16 users. Looking at the backtraces and logs on that bug along with the source code, it appears to be a missing return statement in gconf_engine_suggest_sync.
Created attachment 207512 [details] [review] gconf-dbus: don't crash during sync if gconfd shutting down The gconfd shuts down after a bit of inactivity. When that happens there's a window where it refuses requests from the client library with an error. The library is resposible for gracefully handling this condition and reacting appropriately. There are many places in the code where the client library has this idiom: db = gconf_engine_get_database (conf, TRUE, err); if (db == NULL) { g_return_if_fail(err == NULL || *err != NULL); return; } In the event gconfd is shutting down, db will be NULL, and the code will return early from whatever (non-critical) operation it was doing. gconf_engine_suggest_sync has a similiar chunk of code, but it neglected the "return;" and then promptly crashed since it wasn't expecting db to be NULL. This commit adds the return;
Note i haven't reproduced the problem myself, so I don't know for sure this fix is right. I'll do a testing update on the downstream report and request feedback.
Downstream seems to show this works fine. Unless someone wants to review this (Ross? Rob?) I'll probably push it in the next few days.
Review of attachment 207512 [details] [review]: Looks good please push.
I didn't quite catch that, did you say it looks good? :-)
Attachment 207512 [details] pushed as 6f3e127 - gconf-dbus: don't crash during sync if gconfd shutting down
Ha, what the hell happened there!