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 606902 - Infinite loop in gkr_operation_block() due to no notification from D-Bus.
Infinite loop in gkr_operation_block() due to no notification from D-Bus.
Status: RESOLVED FIXED
Product: libgnome-keyring
Classification: Core
Component: General
unspecified
Other Linux
: Normal critical
: ---
Assigned To: GNOME keyring maintainer(s)
GNOME keyring maintainer(s)
: 611584 612202 613399 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2010-01-13 21:04 UTC by Kjartan Maraas
Modified: 2019-02-22 11:46 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix (1.08 KB, patch)
2010-03-30 04:36 UTC, Hiroyuki Ikezoe
rejected Details | Review
Workaround (1.03 KB, patch)
2010-03-30 05:55 UTC, Hiroyuki Ikezoe
none Details | Review

Description Kjartan Maraas 2010-01-13 21:04:06 UTC
I filed this in bugzilla.redhat.com and was told to move it upstream:

I have issues with the keyring password dialog opening again and again and in
the end it seems to just hang. Possibly some memory management issue in the
keyring library or something like that.

Thread 288 (Thread 0xb19ffb70 (LWP 701))

  • #0 _dbus_connection_lock
    at dbus-connection.c line 354
  • #1 dbus_pending_call_get_completed
    at dbus-pending-call.c line 650
  • #2 _dbus_connection_block_pending_call
    at dbus-connection.c line 2287
  • #3 dbus_pending_call_block
    at dbus-pending-call.c line 705
  • #4 gkr_operation_block
    at gkr-operation.c line 341
  • #5 gnome_keyring_is_available
    at gnome-keyring.c line 492
  • #6 e_passwords_init
    at e-passwords.c line 1273
  • #7 ep_msg_new
    at e-passwords.c line 480
  • #8 e_passwords_get_password
    at e-passwords.c line 1435
  • #9 get_password
    at mail-session.c line 201
  • #10 camel_session_get_password
    at camel-session.c line 383
  • #11 pop3_try_authenticate
  • #12 pop3_connect
    at camel-pop3-store.c line 606
  • #13 camel_service_connect
    at camel-service.c line 364
  • #14 camel_session_get_service_connected
    at camel-session.c line 280
  • #15 mail_tool_get_inbox
    at mail-tools.c line 69
  • #16 fetch_mail_exec
    at mail-ops.c line 302
  • #17 mail_msg_proxy
    at mail-mt.c line 466
  • #18 g_thread_pool_thread_proxy
    at gthreadpool.c line 265
  • #19 g_thread_create_proxy
    at gthread.c line 635
  • #20 start_thread
    at pthread_create.c line 297
  • #21 clone
    at ../sysdeps/unix/sysv/linux/i386/clone.S line 133

Comment 1 Kjartan Maraas 2010-01-13 21:05:16 UTC
Downstream bugreport is here https://bugzilla.redhat.com/show_bug.cgi?id=554257
Comment 2 Kjartan Maraas 2010-01-19 11:26:54 UTC
Upping severity on this as it forces me to kill evolution from time to time in addition to eating up 100% of one of my intel cores.
Comment 3 Kjartan Maraas 2010-01-25 12:52:01 UTC
Still seeing this here. I also seem to remember seeing someone blogging about the problem recently and the comments said to delete default.keyring to help fix the problem. I don't have default.keyring here at all so that's not related to my problem at least.
Comment 4 Stef Walter 2010-02-07 18:38:25 UTC
This sounds like a classic deadlock. libgnome-keyring is trying to use dbus inside of gnome_keyring_is_available, but something in evolution has it locked.

Could you please include the backtraces of all the threads inside of the hung process. Thanks!
Comment 5 Kjartan Maraas 2010-02-08 17:18:29 UTC
Unfortunately I can't reproduce this any more after upgrading from rawhide a few times :-/ I'll provide the information as soon as it happens again.
Comment 6 Klaus Doblmann 2010-03-28 20:51:06 UTC
This seems to be an ongoing problem in the upcoming Ubuntu 10.04 - I can't use evolution anymore due to this bug.
I found quite a few traces of the problem here in this bugreport - maybe these are of some help: https://bugzilla.gnome.org/show_bug.cgi?id=595421
Comment 7 Hiroyuki Ikezoe 2010-03-30 04:36:03 UTC
Created attachment 157444 [details] [review]
Fix

I am wondering why this issue did not happen on someone else's environment.
Comment 8 Hiroyuki Ikezoe 2010-03-30 04:53:44 UTC
Comment on attachment 157444 [details] [review]
Fix

Ooop! sorry. The patch is totally wrong!
Comment 9 Hiroyuki Ikezoe 2010-03-30 05:55:09 UTC
Created attachment 157447 [details] [review]
Workaround

After investigate a bit further.

DBusPendingCall seems to be completed without calling DBusPendingCallNotifyFunction.

This patch is a workaround to avoid infinite loop in gkr_operation_block().
Comment 11 Stef Walter 2010-04-09 18:49:17 UTC
Thanks for doing the investigation Hiroyuki. I was poking around in this area myself, but since I couldn't duplicate the problem, I couldn't figure out what would be causing this behavior (ie: a DBusPendingCall completing without calling the callback). 

Committed a similar workaround fix, which also closes another possible race condition in the same area.

commit 942ff4eae19732d9f5fd0d549385a7f2d9842444
Author: Stef Walter <stef@memberwebs.com>
Date:   Fri Apr 9 18:39:38 2010 +0000

    Workaround for problem with endless loop during blocking operations.
    
    Research done by Hiroyuki Ikezoe
    
    This is due to a bug in libdbus where the pending call is completed
    without the relevant callback being called when used in certain
    threading situations.
    
    Fixes bug #606902
Comment 12 Stef Walter 2010-04-09 18:49:53 UTC
*** Bug 613399 has been marked as a duplicate of this bug. ***
Comment 13 Stef Walter 2010-04-09 18:54:38 UTC
*** Bug 611584 has been marked as a duplicate of this bug. ***
Comment 14 Ross Lagerwall 2014-08-13 20:31:43 UTC
*** Bug 612202 has been marked as a duplicate of this bug. ***