public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Luigi Pavan <lpavan@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/gnome-shell] f45: Backport fix for GDM mechanisms-changed race
Date: Tue, 18 Aug 2026 07:43:00 GMT [thread overview]
Message-ID: <178703898077.1.8225589450527797955.rpms-gnome-shell-e43e6125e7cd@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/gnome-shell
Branch : f45
Commit : e43e6125e7cd9c7a0ef7e5dbed8046a1497eb43a
Author : Luigi Pavan <lpavan@redhat.com>
Date : 2026-08-17T15:04:51+02:00
Stats : +91/-0 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/gnome-shell/c/e43e6125e7cd9c7a0ef7e5dbed8046a1497eb43a?branch=f45
Log:
Backport fix for GDM mechanisms-changed race
A race condition between gnome-shell and GDM could cause the password
box to never appear after login. This happens when GDM returns an error
from BeginVerification() for gdm-switchable-auth, triggering a
mechanisms-changed signal that leads to cancel() being called during
begin(), de-syncing gnome-shell's and GDM's state.
Backported from upstream MR !4336, adjusted for 51~beta context.
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/4336
Assisted-by: Cursor
---
diff --git a/gnome-shell-fix-mechanisms-changed-race.patch b/gnome-shell-fix-mechanisms-changed-race.patch
new file mode 100644
index 0000000..1bb2693
--- /dev/null
+++ b/gnome-shell-fix-mechanisms-changed-race.patch
@@ -0,0 +1,88 @@
+From ecbeedfd33df161660133a4b65c3a95b4f921dc6 Mon Sep 17 00:00:00 2001
+From: Adrian Vovk <adrianvovk@gmail.com>
+Date: Thu, 13 Aug 2026 14:45:53 -0400
+Subject: [PATCH] gdm/userVerifier: Fix mechanisms-changed race
+
+Starting with GDM e760c8e4, GDM will return an error from
+BeginVerification() whenever `gdm-switchable-auth` is unavailable.
+
+This would cause AuthServicesSSSDSwitchable to emit `mechanisms-changed`
+during ShellUserVerifier.begin(). The signal would cause a chain of
+events that leads to ShellUserVerifier.cancel() being called inside of
+that same call stack. In response to this, GDM will send us a reset
+signal. Meanwhile, the call stack would move on and try to call
+BeginVerification() for AuthServicesLegacy.
+
+In the unhappy case, we'd receive the reset signal before
+BeginVerification() is done, which completely de-syncs gnome-shell's and
+GDM's views of what's going on. Ultimately the password box would never
+appear. gnome-shell would kick the user right back into the user list,
+but GDM would think that gdm-password is currently ongoing.
+
+The fix is to delay the propagation of `mechanisms-changed` until we're
+done with BeginVerification() for all available auth services.
+
+Closes: https://gitlab.gnome.org/GNOME/gdm/-/work_items/1089
+---
+ js/gdm/userVerifier.js | 15 +++++++++++++--
+ 1 file changed, 13 insertions(+), 2 deletions(-)
+
+diff --git a/js/gdm/userVerifier.js b/js/gdm/userVerifier.js
+index 7428450da5..e2d2e352f2 100644
+--- a/js/gdm/userVerifier.js
++++ b/js/gdm/userVerifier.js
+@@ -63,6 +63,9 @@ export class ShellUserVerifier extends Signals.EventEmitter {
+ this._authServices = [];
+ this._driverService = null;
+
++ this._beginPromise = null;
++ this._redistributingRoles = false;
++
+ this._messageQueue = [];
+ this._messageQueueTimeoutId = 0;
+
+@@ -87,6 +90,9 @@ export class ShellUserVerifier extends Signals.EventEmitter {
+ this._cancellable?.cancel();
+ this._cancellable = new Gio.Cancellable();
+
++ const {promise, resolve} = Promise.withResolvers();
++ this._beginPromise = promise;
++
+ try {
+ const proxies = await this._getUserVerifierProxies(userName, this._cancellable);
+ this._setUserVerifier(proxies.userVerifier);
+@@ -99,6 +105,9 @@ export class ShellUserVerifier extends Signals.EventEmitter {
+ logErrorUnlessCancelled(e);
+ }
+
++ resolve();
++ this._beginPromise = null;
++
+ hold?.release();
+ }
+
+@@ -408,7 +417,7 @@ export class ShellUserVerifier extends Signals.EventEmitter {
+ 'reset', (_, args) => this.emit('reset', args),
+ 'show-choice-list', (_, args) => this.emit('show-choice-list', args),
+ 'show-button', (_, args) => this.emit('show-button', args),
+- 'mechanisms-changed', () => this._onMechanismsChanged(),
++ 'mechanisms-changed', () => this._onMechanismsChanged().catch(logError),
+ 'web-login', (_, args) => this.emit('web-login', args),
+ this);
+ });
+@@ -442,10 +451,12 @@ export class ShellUserVerifier extends Signals.EventEmitter {
+ this._redistributingRoles = false;
+ }
+
+- _onMechanismsChanged() {
++ async _onMechanismsChanged() {
+ if (this._redistributingRoles)
+ return;
+
++ await this._beginPromise;
++
+ this._redistributeRoles();
+
+ // Collect mechanisms from all authServices in priority order,
+--
+2.49.0
diff --git a/gnome-shell.spec b/gnome-shell.spec
index 80eb2c4..680af55 100644
--- a/gnome-shell.spec
+++ b/gnome-shell.spec
@@ -35,6 +35,9 @@ Source0: https://download.gnome.org/sources/%{name}/%{gnome_major_version
# Replace Epiphany with Firefox in the default favourite apps list
Patch: gnome-shell-favourite-apps-firefox.patch
+# https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/4336
+Patch: gnome-shell-fix-mechanisms-changed-race.patch
+
BuildRequires: pkgconfig(bash-completion)
BuildRequires: gcc
BuildRequires: meson
reply other threads:[~2026-08-18 7:43 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=178703898077.1.8225589450527797955.rpms-gnome-shell-e43e6125e7cd@fedoraproject.org \
--to=lpavan@redhat.com \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox