#1147303 gnome-keyring: daemon aborts on a Secret Service property GET when the caller has no PKCS#11 client record

Package:
gnome-keyring
Source:
gnome-keyring
Description:
GNOME keyring services (daemon and tools)
Submitter:
Date:
2026-09-11 15:29:02 UTC
Severity:
normal
Tags:
#1147303#5
Date:
2026-09-10 14:15:50 UTC
From:
To:
Dear Maintainer,

gnome-keyring-daemon aborts (SIGABRT) while answering a D-Bus property GET on
the Secret Service interface. It has happened three times on this machine in
six days, in three separate boots, always with the same three-line signature.

D-Bus then activates a replacement daemon, which comes up with the login
collection LOCKED. Every libsecret client on the session must then wait for an
unlock prompt. On this machine one background service waited 2h26m, because a
Secret Service prompt has no method reply and no timeout, so a service with
nobody sitting in front of it hangs rather than fails.


PLEASE READ BEFORE THE VERSION TABLE BELOW
------------------------------------------

The "System Information" and dependency versions at the end of this mail were
collected by reportbug TODAY, about three hours after the most recent crash and
after an `apt dist-upgrade` that replaced several of the packages involved.
They describe this machine now, NOT the machine that crashed.

The assertion is inside glib, and glib is one of the packages that moved. At
all three crashes the versions were:

  gnome-keyring        50.0-1          (unchanged since 2026-06-18)
  libglib2.0-0t64      2.88.2-1        (table below says 2.89.4-2+b1)
  libgcrypt20          1.12.2-1        (table below says 1.12.3-2)
  libc6                2.42-17         (table below says 2.43-5)
  libsystemd0          261.1-3         (table below says 262~rc2-1)
  p11-kit              0.26.4-1        (table below says 0.26.5-1)
  pinentry-gnome3      1.3.3-2         (table below says 1.3.3-3)

  gcr                  3.41.2-6+b1     unchanged
  libgck-1-0           3.41.2-6+b1     unchanged
  libgcr-base-3-1      3.41.2-6+b1     unchanged
  dbus / dbus-daemon   1.16.2-5+b1     unchanged
  dconf-gsettings-backend 0.49.0-4+b1  unchanged

Taken from /var/log/dpkg.log and /var/log/apt/history.log. libglib2.0-0t64 was
2.88.2-1 from 2026-07-21 until 2026-09-10 09:32, which covers all three
crashes. I have not retested on the new glib, so I cannot say whether
2.89.4-2+b1 still aborts.


Occurrences
-----------

Three, in three different boots, all under gnome-keyring 50.0-1:

  Sep 05 05:48:34 EDT   pid 591
  Sep 07 13:42:52 EDT   pid 680
  Sep 10 06:29:33 EDT   pid 690

Journal for the most recent one, verbatim:

  Sep 10 06:29:33 gnome-keyring-daemon[690]: gkd_secret_service_get_pkcs11_session: assertion 'client' failed
  Sep 10 06:29:33 gnome-keyring-daemon[690]: secret_objects_lookup_gck_object_for_path: assertion 'session' failed
  Sep 10 06:29:33 gnome-keyring-daemon[690]: **
  GLib-GIO:ERROR:../../../gio/gdbusconnection.c:4765:invoke_get_property_in_idle_cb: assertion failed: (error != NULL)
  Sep 10 06:29:33 kernel: gnome-keyring-daemon: gnome-keyring-d: potentially unexpected fatal signal 6.

The Sep 05 and Sep 07 entries are identical apart from the pid. The daemon in
each case was the session daemon started by D-Bus activation, running
--components=pkcs11,secrets with --control-directory=/run/user/1000/keyring.

There is no core dump and therefore no backtrace: systemd-coredump is not
installed here and /proc/sys/kernel/core_pattern is "core".


What the caller was doing
-------------------------

Ordinary Secret Service reads through libsecret 0.21.7-2+b1, from Python
services that fetch a stored token before each HTTP call. No unusual API use:
get_password() and item lookups, and nothing that touches OpenSession
directly.

dbus-daemon logged the re-activation request immediately after the abort, which
names the client that was mid-call:

  Sep 10 06:29:33 dbus-daemon[597]: Activating service name='org.freedesktop.secrets'
    requested by ':1.78712' (uid=1000 pid=300855 comm="python3 .../chat-agent-daemon.py")

I cannot prove that this client's call is the one that tripped the assertion,
because dbus-daemon logs activations and not method calls. Two facts argue
against a single unusual client being required: the Sep 05 and Sep 07 crashes
happened before that particular service existed, and the crash has recurred
under three different mixes of running clients.


Mechanism, as far as the source shows
-------------------------------------

The assertion order suggests the same missing-GError family as upstream
issue #190, but on a different call site.

gkd_secret_service_get_pkcs11_session() returns NULL when the caller has no
ServiceClient record yet. secret_objects_lookup_gck_object_for_path() guards
that with g_return_val_if_fail (session, ...), which returns without setting
the GError. The property getter therefore returns failure with *error == NULL,
and glib's invoke_get_property_in_idle_cb() asserts error != NULL and aborts
the process.

Upstream #190 describes exactly this shape in OpenSession -> aes_negotiate()
and carries a patch for that path. If that reading is right, the property
lookup path needs the same treatment: set a real GError (G_DBUS_ERROR_FAILED)
instead of returning FALSE silently.


Upstream
--------

https://gitlab.gnome.org/GNOME/gnome-keyring/-/issues/195
    Same abort site (gdbusconnection.c:4765). Open since 2026-09-02,
    labelled "1. Crash", reported on gnome-keyring 50.0 with GLib 2.88.3.
    That report has the symbolized backtrace this one lacks, but does not
    name the two gkd_secret assertions that precede the abort, so it does
    not identify which getter is at fault.

https://gitlab.gnome.org/GNOME/gnome-keyring/-/issues/190
    Root cause of the same class on the OpenSession path, with a patch.

https://gitlab.gnome.org/GNOME/gnome-keyring/-/issues/194
    Another OpenSession instance.

I found no existing Debian bug for this. I checked the bug titles for source
package gnome-keyring, open and archived (198 reports), and found nothing
matching; bugs-search.debian.org does not resolve from this network, so I could
not search report bodies.


Impact
------

The abort itself is survivable, but the recovery is not quiet:

  - the replacement daemon starts locked, so every stored credential becomes
    unavailable until someone types the login passphrase;
  - a background service that reads a secret gets neither a value nor an
    error, because the Secret Service prompt returns a Prompt object and then
    waits for a Completed signal that a replaced daemon never sends. The
    service hangs for as long as nobody answers the dialog. Here that was
    2h26m, and it looked exactly like a working daemon that had gone quiet.


Environment note
----------------

This is Debian sid inside WSL2 (kernel 6.6.87.2-microsoft-standard-WSL2),
running a systemd user session with no graphical desktop. gcr-prompter does
start and draw its dialog, but there is frequently nobody to answer it, which
is why the locked-after-respawn state is so visible here.


AI assistance
-------------

This report was assembled with AI assistance and reviewed before sending.

AI-Assisted-By: claude-opus-5 (claude code)

The Occurrences, version and impact sections were read out of this machine's
journal, dpkg log and apt history. The Mechanism section is inference from the
upstream source and the order of the assertions; with no core dump it is not
confirmed here.

#1147303#14
Date:
2026-09-11 12:45:32 UTC
From:
To:
The original report said the crash-time glib was 2.88.2-1 and that I could not
say whether 2.89.4-2+b1 still aborts, because the machine had been upgraded
three hours after the last occurrence and I had not retested.

Retested now, unintentionally: **it still aborts with glib 2.89.4-2+b1
mapped.** One clean data point rather than two, and the distinction is the
point of this message.

The machine was not rebooted after the upgrade - needrestart's "restart
recommended services" was answered, which restarts services and not every
long-lived user process - so a daemon started before 2026-09-10 09:32:27 kept
the old library mapped however the package database read. Only a process
started AFTER that time is evidence about 2.89.4-2+b1.

Verified rather than assumed: the gnome-keyring-daemon running now, started
after the upgrade, maps /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.8904.0 with
no "(deleted)" marker, so a fresh exec does resolve to the new library.

Installed versions, from /var/log/dpkg.log:

  libglib2.0-0t64   2.89.4-2+b1   upgraded 2026-09-10 09:32:27 (2.88.2-1 when
                                  I filed). Installed before both of last
                                  night's aborts; only the second RAN it
  gnome-keyring     50.0-1        unchanged since 2026-06-18
  gcr               3.41.2-6+b1   unchanged
  libsecret-1-0     0.21.7-2+b1   unchanged
  dbus              1.16.2-5+b1   unchanged

Five occurrences now, each in a separate daemon, all with the same signature.
The last column is the glib each process actually had MAPPED, which for the
fourth is not the one that was installed:

  Sep 05 05:48:34 EDT   pid 591      started before   ->  2.88.2-1
  Sep 07 13:42:52 EDT   pid 680      started before   ->  2.88.2-1
  Sep 10 06:29:33 EDT   pid 690      started Sep 08   ->  2.88.2-1
  Sep 10 21:18:54 EDT   pid 352478   started 08:37    ->  2.88.2-1  (pre-upgrade
                                     process, so this one says nothing new)
  Sep 10 22:04:22 EDT   pid 461781   activated 21:18  ->  2.89.4-2+b1  <-- new

Journal for the last one, verbatim and identical to the first three:

  Sep 10 22:04:22 gnome-keyring-daemon[461781]: gkd_secret_service_get_pkcs11_session: assertion 'client' failed
  Sep 10 22:04:22 gnome-keyring-daemon[461781]: secret_objects_lookup_gck_object_for_path: assertion 'session' failed
  Sep 10 22:04:22 gnome-keyring-daemon[461781]: **
  GLib-GIO:ERROR:../../../gio/gdbusconnection.c:4765:invoke_get_property_in_idle_cb: assertion failed: (error != NULL)
  Sep 10 22:04:22 kernel: gnome-keyring-daemon: gnome-keyring-d: potentially unexpected fatal signal 6.

pid 461781 is the daemon D-Bus ACTIVATED to replace pid 352478 when that one
died at 21:18:54. So it is both the freshest possible process on the new glib
and the proof that a crash here is not a one-off state a restart clears: it
aborted the same way 45 minutes after being started.

## The downstream cost, measured a second time

The first report said the replacement daemon comes up locked and that a
Secret Service unlock returns a Prompt object and then waits for a `Completed`
signal, with no method reply and no timeout. A second, longer measurement:

After the 21:18:54 abort the replacement came up with the login collection
locked. Two unattended background services asked for the same credential, at
21:19:06 and 21:21:54. Neither was answered, because there was nobody at the
screen. Eleven hours later the collection is still locked and one of those
services is still inside its unlock wait, having logged nothing since - it
sleeps five seconds at a time, so from the outside it is indistinguishable
from an idle process doing its job.

So the practical severity is not the abort. It is that one assertion failure in
a session daemon can leave every stored credential unreachable until a person
types a passphrase, and nothing about the resulting state announces itself.

Still no core dump on this machine: systemd-coredump is not installed and
/proc/sys/kernel/core_pattern is "core". The symbolized backtrace in
GNOME/gnome-keyring#195 remains the only one.

## AI assistance

This follow-up was assembled with AI assistance and reviewed before sending.

AI-Assisted-By: claude-opus-5 (claude code)

The dates, pids, versions and journal lines were read from this machine's
journal and dpkg log. The remark about the replacement daemon is inference from
the activation record in the same journal, not from instrumentation.

#1147303#19
Date:
2026-09-11 15:26:40 UTC
From:
To:
My last message could claim only one abort on glib 2.89.4-2+b1, because the
machine had not been rebooted after the upgrade and older processes still had
2.88.2-1 mapped.

That caveat is now gone. dist-upgrade 2026-09-10 09:31:48 (glib 2.89.4-2+b1 at
09:32:27); full cold boot 2026-09-11 10:36; every process in the session
therefore started after both. It aborted again at 2026-09-11 10:57:56, in a
daemon started at that boot fourteen minutes earlier:

  gkd_secret_service_get_pkcs11_session: assertion 'client' failed
  secret_objects_lookup_gck_object_for_path: assertion 'session' failed
  GLib-GIO:ERROR:../../../gio/gdbusconnection.c:4765:invoke_get_property_in_idle_cb: assertion failed: (error != NULL)
  kernel: gnome-keyring-daemon: potentially unexpected fatal signal 6.

Sixth occurrence here, second on 2.89.4-2+b1, and the first with nothing
pre-upgrade left running.

AI-Assisted-By: claude-opus-5 (claude code)