After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 608089 - Applications aborted at finalizing when the dbus session is being closed.
Applications aborted at finalizing when the dbus session is being closed.
Status: RESOLVED FIXED
Product: libnotify
Classification: Platform
Component: general
git master
Other Linux
: High critical
: ---
Assigned To: William Jon McCann
Depends on:
Blocks:
 
 
Reported: 2010-01-25 21:26 UTC by William Jon McCann
Modified: 2010-06-24 06:26 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix possible assertions when exiting (4.88 KB, patch)
2010-06-24 03:05 UTC, Bastien Nocera
none Details | Review
Don't try to use the proxy after it is destroyed (4.57 KB, patch)
2010-06-24 05:44 UTC, William Jon McCann
none Details | Review

Description William Jon McCann 2010-01-25 21:26:55 UTC
from http://trac.galago-project.org/ticket/195

"If the dbus session bus is being closed, even though applications wants to destroy the own objects properly, NotifyNotification? object prevents it with SIGABRT (strictly speaking, in dbus-glib). IMHO the finalizer for NotifyNotification? just gives up to destroy the dbus-related things if the session bus is closed and done without aborting.

I saw this issue on libnotify 0.4.5."
Comment 1 William Jon McCann 2010-06-24 00:17:51 UTC
Akira, can you provide some more details on what the issue is here?  Thanks!
Comment 2 Akira TAGOH 2010-06-24 02:29:15 UTC
Sure. I have a GObject that has an instance of NotifyNotification and invoking g_object_unref for that in finalization. this works except finalizing by closing X session, which also means the dbus session is being closed.

In this case, SIGABRT happens during g_object_unref by the sanity check before doing the actual works on the function in dbus-glib.

For a workaround to not hit this issue, I'm checking the DBusConnection is still valid with dbus_connection_get_is_connected though, IMHO it should be done in libnotify.

For refernces, some backtraces including bugs marked as duplicate in https://bugzilla.redhat.com/show_bug.cgi?id=530357 may helps.
Comment 3 Bastien Nocera 2010-06-24 03:05:52 UTC
Created attachment 164470 [details] [review]
Fix possible assertions when exiting

When finalizing the notifications, only disconnect the signals
from the proxy if the D-Bus connection is still alive.

Otherwise dbus-glib will assert() with:
dbus_g_proxy_disconnect_signal: assertion `!DBUS_G_PROXY_DESTROYED (proxy)' failed
Comment 4 William Jon McCann 2010-06-24 05:44:08 UTC
Created attachment 164472 [details] [review]
Don't try to use the proxy after it is destroyed
Comment 5 William Jon McCann 2010-06-24 06:26:27 UTC
Pushed a variation on my last patch.  I think it should do the trick.  Please reopen if it doens't.