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 787391 - g_object_unref: assertion 'G_IS_OBJECT (object)' failed when gnome-keyring does not respond
g_object_unref: assertion 'G_IS_OBJECT (object)' failed when gnome-keyring do...
Status: RESOLVED FIXED
Product: libsecret
Classification: Other
Component: General
unspecified
Other Linux
: Normal normal
: ---
Assigned To: libsecret maintainer(s)
libsecret maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2017-09-07 01:43 UTC by Michael Catanzaro
Modified: 2017-09-07 01:48 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
secret-methods: Don't unref NULL when search fails (1012 bytes, patch)
2017-09-07 01:48 UTC, Michael Catanzaro
committed Details | Review

Description Michael Catanzaro 2017-09-07 01:43:28 UTC
libsecret tries to unref a NULL SecretService object on this error path when gnome-keyring is not listening. (gnome-keyring suffers from a longstanding bug where sometimes it just doesn't start for whatever reason.)

  • #0 _g_log_abort
    at /home/mcatanzaro/Projects/GNOME/glib/glib/gmessages.c line 554
  • #1 g_logv
    at /home/mcatanzaro/Projects/GNOME/glib/glib/gmessages.c line 1362
  • #2 g_log
    at /home/mcatanzaro/Projects/GNOME/glib/glib/gmessages.c line 1403
  • #3 g_return_if_fail_warning
  • #4 g_object_unref
    at /home/mcatanzaro/Projects/GNOME/glib/gobject/gobject.c line 3211
  • #5 search_closure_free
    at /home/mcatanzaro/Projects/GNOME/libsecret/libsecret/secret-methods.c line 54
  • #6 clear_op_res
    at /home/mcatanzaro/Projects/GNOME/glib/gio/gsimpleasyncresult.c line 247
  • #7 g_simple_async_result_finalize
    at /home/mcatanzaro/Projects/GNOME/glib/gio/gsimpleasyncresult.c line 267
  • #8 g_object_unref
    at /home/mcatanzaro/Projects/GNOME/glib/gobject/gobject.c line 3314
  • #9 on_search_service
    at /home/mcatanzaro/Projects/GNOME/libsecret/libsecret/secret-methods.c line 257
  • #10 g_simple_async_result_complete
    at /home/mcatanzaro/Projects/GNOME/glib/gio/gsimpleasyncresult.c line 801
  • #11 on_init_base
    at /home/mcatanzaro/Projects/GNOME/libsecret/libsecret/secret-service.c line 692
  • #12 g_task_return_now
    at /home/mcatanzaro/Projects/GNOME/glib/gio/gtask.c line 1145
  • #13 g_task_return
    at /home/mcatanzaro/Projects/GNOME/glib/gio/gtask.c line 1203
  • #14 g_task_return_error
    at /home/mcatanzaro/Projects/GNOME/glib/gio/gtask.c line 1777
  • #15 init_second_async_cb
    at /home/mcatanzaro/Projects/GNOME/glib/gio/gdbusproxy.c line 1810
  • #16 g_task_return_now
    at /home/mcatanzaro/Projects/GNOME/glib/gio/gtask.c line 1145
  • #17 g_task_return
    at /home/mcatanzaro/Projects/GNOME/glib/gio/gtask.c line 1203
  • #18 g_task_return_error
    at /home/mcatanzaro/Projects/GNOME/glib/gio/gtask.c line 1777
  • #19 async_init_start_service_by_name_cb
    at /home/mcatanzaro/Projects/GNOME/glib/gio/gdbusproxy.c line 1646
  • #20 g_task_return_now
    at /home/mcatanzaro/Projects/GNOME/glib/gio/gtask.c line 1145
  • #21 g_task_return
    at /home/mcatanzaro/Projects/GNOME/glib/gio/gtask.c line 1203
  • #22 g_task_return_error
    at /home/mcatanzaro/Projects/GNOME/glib/gio/gtask.c line 1777
  • #23 g_dbus_connection_call_done
    at /home/mcatanzaro/Projects/GNOME/glib/gio/gdbusconnection.c line 5720
  • #24 g_task_return_now
    at /home/mcatanzaro/Projects/GNOME/glib/gio/gtask.c line 1145
  • #25 g_task_return
    at /home/mcatanzaro/Projects/GNOME/glib/gio/gtask.c line 1203
  • #26 g_task_return_error
    at /home/mcatanzaro/Projects/GNOME/glib/gio/gtask.c line 1777
  • #27 g_task_return_new_error
    at /home/mcatanzaro/Projects/GNOME/glib/gio/gtask.c line 1811
  • #28 send_message_data_deliver_error
    at /home/mcatanzaro/Projects/GNOME/glib/gio/gdbusconnection.c line 1836
  • #29 send_message_with_reply_timeout_cb
    at /home/mcatanzaro/Projects/GNOME/glib/gio/gdbusconnection.c line 1878
  • #30 g_timeout_dispatch
    at /home/mcatanzaro/Projects/GNOME/glib/glib/gmain.c line 4633
  • #31 g_main_dispatch
    at /home/mcatanzaro/Projects/GNOME/glib/glib/gmain.c line 3148
  • #32 g_main_context_dispatch
    at /home/mcatanzaro/Projects/GNOME/glib/glib/gmain.c line 3813
  • #33 g_main_context_iterate
    at /home/mcatanzaro/Projects/GNOME/glib/glib/gmain.c line 3886
  • #34 g_main_context_iteration
    at /home/mcatanzaro/Projects/GNOME/glib/glib/gmain.c line 3947
  • #35 g_application_run
    at /home/mcatanzaro/Projects/GNOME/glib/gio/gapplication.c line 2401
  • #36 main
    at ../../../../Projects/GNOME/epiphany/src/ephy-main.c line 432

Comment 1 Michael Catanzaro 2017-09-07 01:48:24 UTC
The following fix has been pushed:
f76e333 secret-methods: Don't unref NULL when search fails
Comment 2 Michael Catanzaro 2017-09-07 01:48:27 UTC
Created attachment 359320 [details] [review]
secret-methods: Don't unref NULL when search fails

If the gnome-keyring D-Bus service is not responding, we wind up freeing
the SearchClosure in an error path without ever creating a SecretService
object. Guard against this.