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 756865 - Behavior change leading to firefox + mozilla-gnome-keyring freezing
Behavior change leading to firefox + mozilla-gnome-keyring freezing
Status: RESOLVED FIXED
Product: libgnome-keyring
Classification: Core
Component: General
3.18.x
Other Linux
: Normal major
: ---
Assigned To: GNOME keyring maintainer(s)
GNOME keyring maintainer(s)
: 756006 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2015-10-20 13:08 UTC by Raphael Hertzog
Modified: 2019-02-22 11:46 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Javascript debugger screenshot (155.88 KB, image/png)
2015-10-20 14:01 UTC, Raphael Hertzog
  Details
dbus: correctly handle alias paths in lookup_collection (1.76 KB, patch)
2015-10-21 13:20 UTC, Dmitry Shachnev
accepted-commit_now Details | Review

Description Raphael Hertzog 2015-10-20 13:08:21 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?
Comment 1 Raphael Hertzog 2015-10-20 13:21:54 UTC
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 "/"
Comment 2 Raphael Hertzog 2015-10-20 14:01:52 UTC
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.
Comment 3 Raphael Hertzog 2015-10-20 14:02:51 UTC
That call used to work with gnome-keyring 3.16 and no longer does with 3.18.
Comment 4 Stef Walter 2015-10-20 14:30:39 UTC
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
Comment 5 Dmitry Shachnev 2015-10-21 13:20:26 UTC
Created attachment 313814 [details] [review]
dbus: correctly handle alias paths in lookup_collection

Here is a patch that solves the issue for me.
Comment 6 Raphael Hertzog 2015-10-21 22:14:50 UTC
Dmitry, it works for me too. Thank you!
Comment 7 Stef Walter 2015-10-22 06:48:05 UTC
Review of attachment 313814 [details] [review]:

Looks good to me.
Comment 8 Dmitry Shachnev 2015-10-22 07:20:00 UTC
Stef, I don't have commit rights, can you please push it for me?
Comment 9 Stef Walter 2015-10-23 11:36:31 UTC
Sure thing. Merged.
Comment 10 Stef Walter 2015-10-23 12:06:42 UTC
*** Bug 756006 has been marked as a duplicate of this bug. ***
Comment 11 Michael Catanzaro 2015-10-25 02:10:11 UTC
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....