GNOME Bugzilla – Bug 756865
Behavior change leading to firefox + mozilla-gnome-keyring freezing
Last modified: 2019-02-22 11:46:11 UTC
The basic symptom is the same as in #756032 : whenever I login with a web form managed by the Firefox password manager coupled to gnome-keyring via mozilla-gnome-keyring (https://github.com/swick/mozilla-gnome-keyring), Firefox gets stuck. I discovered that with gnome-keyring 3.18.1 + the patch for #756032, it only gets stuck when mozilla-gnome-keyring is configured to use the "default" keyring. When it's configured to use the "login" keyring explicitly, then it works. See https://bugzilla.gnome.org/show_bug.cgi?id=756032#c21 and below for some dbus traces that I made with dbus-monitor. It shows a tentative creation of a default keyring that should not happen given that the keyring exists and is unlocked. mozilla-gnome-keyring does not seem to have code that creates a keyring explicitly, so I guess that libgnome-keyring is trying to create that keyring behind another call, possibly https://github.com/swick/mozilla-gnome-keyring/blob/master/content/gnome-keyring.js#L250 (gnome_keyring_item_create_sync). Has there been unexpected changes that could explain this regression?
As a comparison point, here's the dbus-monitor output of the working case: method call time=1445346894.389220 sender=:1.1523 -> destination=org.freedesktop.secrets serial=992 path=/org/freedesktop/secrets; interface=org.freedesktop.Secret.Service; member=Unlock array [ object path "/org/freedesktop/secrets/collection/login" ] method return time=1445346894.389444 sender=:1.10 -> destination=:1.1523 serial=3520 reply_serial=992 array [ object path "/org/freedesktop/secrets/collection/login" ] object path "/" method call time=1445346894.389589 sender=:1.1523 -> destination=org.freedesktop.secrets serial=993 path=/org/freedesktop/secrets/collection/login; interface=org.freedesktop.Secret.Collection; member=CreateItem array [ # SKIP DATA ] struct { object path "/org/freedesktop/secrets/session/s15" array of bytes [ # SKIP DATA ] array of bytes [ # SKIP DATA ] string "text/plain; charset=utf8" } boolean true signal time=1445346894.418746 sender=:1.10 -> destination=(null destination) serial=3521 path=/org/freedesktop/secrets/collection/login; interface=org.freedesktop.Secret.Collection; member=ItemCreated object path "/org/freedesktop/secrets/collection/login/62" method return time=1445346894.420618 sender=:1.10 -> destination=:1.1523 serial=3522 reply_serial=993 object path "/org/freedesktop/secrets/collection/login/62" object path "/"
Created attachment 313747 [details] Javascript debugger screenshot So I enabled the javascript debugger in iceweasel and I can now confirm that the call to gnome_keyring_item_create_sync() never returns and it's this call which tries to create a new keyring... You have the value of the arguments on the right. keyring is NULL, type is 0, update_if_exists is true.
That call used to work with gnome-keyring 3.16 and no longer does with 3.18.
Cosimo, this is related to the GDBus port. Do you have time to look into it? I have a funny feeling it may be that due to the fact that certain objects are available under two different paths: eg: /org/freedesktop/secrets/collection/login and /org/freedesktop/secrets/aliases/default
Created attachment 313814 [details] [review] dbus: correctly handle alias paths in lookup_collection Here is a patch that solves the issue for me.
Dmitry, it works for me too. Thank you!
Review of attachment 313814 [details] [review]: Looks good to me.
Stef, I don't have commit rights, can you please push it for me?
Sure thing. Merged.
*** Bug 756006 has been marked as a duplicate of this bug. ***
Thanks for fixing this, Dmitry. Stef, can you do a 3.18.3 release please? I know it's a lot of releases in a short time, but this has been a rough cycle for gnome-keyring....