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 774441 - SessionRunning deadlock
SessionRunning deadlock
Status: RESOLVED FIXED
Product: at-spi
Classification: Platform
Component: at-spi2-core
unspecified
Other Linux
: Normal normal
: ---
Assigned To: At-spi maintainer(s)
At-spi maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2016-11-14 23:45 UTC by Samuel Thibault
Modified: 2016-12-28 18:21 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
work around patch (539 bytes, text/plain)
2016-11-14 23:45 UTC, Samuel Thibault
  Details
at-spi-bus-launcher: session management fixes (1.43 KB, patch)
2016-12-04 14:25 UTC, Alberts Muktupāvels
committed Details | Review

Description Samuel Thibault 2016-11-14 23:45:48 UTC
Created attachment 339848 [details]
work around patch

Hello,

Since the upgrade to at-spi2-core 2.22, people get a 90s delay in some
cases:

http://bugs.debian.org/840618

What I have seen happening is that the RunningSession signal and
isRunningSession value is set by gnome-session only after the
Application startup phase, and it happens that it waits for at-spi2-core
to call RegisterClient before entering the Application startup phase,
thus a deadlock... It looks like there is a misunderstanding here.

Adding a register_client call at the beginning of
session_manager_connect as attached works around the issue.

Samuel
Comment 1 Alberts Muktupāvels 2016-12-04 14:20:29 UTC
Mike, can you explain 253ada975e0a374e7b1a6a07d2a483dd1d8c52fa commit? What it fixes or what was actual problem?

That patch is wrong. at-spi-dbus-bus.desktop has this line:
X-GNOME-Autostart-Phase=Initialization

gnome-session manager will wait until at-spi-bus-launcher registers with it, but now at-spi-bus-launcher is waiting for gnome-session to enter running state.

See:
- https://git.gnome.org/browse/gnome-session/tree/gnome-session/org.gnome.SessionManager.xml#n330
- https://wiki.gnome.org/Projects/SessionManagement/NewGnomeSession

Whatever you fixed with it you also introduced regression.
Comment 2 Alberts Muktupāvels 2016-12-04 14:25:18 UTC
Created attachment 341353 [details] [review]
at-spi-bus-launcher: session management fixes

Don't know what was original problem, but if at-spi-bus-launcher was started before gnome-session then this might help after reverting f66c04544575532849a60b1d145fd69fc0261352, 995a8cd70cad2a1e8d434a59d87e8cebd5817612 and 253ada975e0a374e7b1a6a07d2a483dd1d8c52fa
Comment 3 Samuel Thibault 2016-12-27 16:33:12 UTC
Perhaps this is related: http://bugs.debian.org/848996

He is running window maker, so no org.gnome.SessionManager indeed, and probably your proposed fix replacement will work indeed.
Comment 4 Mike Gorse 2016-12-28 18:20:55 UTC
Comment on attachment 341353 [details] [review]
at-spi-bus-launcher: session management fixes

Thanks, Samuel and Albert.

I apologize for the long delay.

I was trying to fix https://bugzilla.suse.com/show_bug.cgi?id=984109, which, unfortunately, is not publicly accessible, but register_client was seemingly being called before gnome-session was fully initialized, resulting in the "failed to register client" warning.

This patch seems to fix the original problem; I've committed it and reverted the original commits.