Bug#804703: gnome-keyring: The race with SessionManager initialization

OGAWA Hirofumi hirofumi at mail.parknet.co.jp
Tue Nov 10 17:08:21 UTC 2015


Package: gnome-keyring
Version: 3.18.2-1
Severity: normal

Hi,

When I start gnome-session (not sure if startx is important to
reproduce) by

	$ startx

Current gnome-keyring has the race with org.gnome.SessionManager
initialization of gnome-session. Because dbus doesn't seem to make the
name available to others immediately.

The sequence of the race is:

         gnome-session               gnome-keyring
      .SessionManager init
      run autostart apps
                                     start by autostart
			             call .SessionManager.Setenv
			             call .SessionManager.ClientPrivate
      .SessionManager available
      
This race becomes the cause of random Setenv failure for SSH_AUTH_SOCK
for example like following.

	** Message: couldn't register in session: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files

To fix this, the attached patch starts to watch .NameOwnerChanged before
calling .SessionManager. With this, if .SessionManager is not available
yet, callings are done via .NameOwnerChanged notification.

Then, after makes sure calling of .SessionManager was done, this
removes watch of .NameOwnerChanged.

-- System Information:
Debian Release: stretch/sid
  APT prefers testing-proposed-updates
  APT policy: (500, 'testing-proposed-updates'), (500, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.18.24 (SMP w/8 CPU cores)
Locale: LANG=ja_JP.UTF-8, LC_CTYPE=ja_JP.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Init: sysvinit (via /sbin/init)

Versions of packages gnome-keyring depends on:
ii  dbus-x11                                     1.10.2-1
ii  dconf-gsettings-backend [gsettings-backend]  0.24.0-2
ii  gcr                                          3.18.0-1
ii  libc6                                        2.19-22
ii  libcap-ng0                                   0.7.7-1
ii  libcap2-bin                                  1:2.24-12
ii  libgck-1-0                                   3.18.0-1
ii  libgcr-base-3-1                              3.18.0-1
ii  libgcrypt20                                  1.6.4-3
ii  libglib2.0-0                                 2.46.1-2
ii  p11-kit                                      0.23.1-3
ii  pinentry-gnome3                              0.9.6-4

Versions of packages gnome-keyring recommends:
ii  libpam-gnome-keyring  3.18.2-1

gnome-keyring suggests no packages.

-- no debconf information

-- 
OGAWA Hirofumi <hirofumi at mail.parknet.co.jp>


-------------- next part --------------
A non-text attachment was scrubbed...
Name: session-race-fix.patch
Type: text/x-diff
Size: 6535 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-gnome-maintainers/attachments/20151111/858f1b01/attachment.patch>


More information about the pkg-gnome-maintainers mailing list