Bug 1353953 - session DBus is shared, breaking lots of Gnome applications
Summary: session DBus is shared, breaking lots of Gnome applications
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: dbus
Version: 26
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Colin Walters
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-07-08 13:53 UTC by Pierre Ossman
Modified: 2018-05-29 11:52 UTC (History)
18 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-05-29 11:52:21 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Bugzilla 1353723 None CLOSED Apps are not properly localized according to user configured locale 2019-09-13 17:22:49 UTC

Internal Links: 1353723

Description Pierre Ossman 2016-07-08 13:53:15 UTC
Fedora 24 has now configured the session DBus to be shared between all active sessions for the same user. I.e:

DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus

rather than Fedora 23's:

DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-0HpbO1JUYG,guid=39f9c10acfd5ea432be0666e57762986

Besides breaking the fundamental issue of this being a _session_ bus, not a _user_ bus, this causes programs to misbehave. Most prominent example is gnome-terminal, which now fails to start on anything but the local, default X server.

E.g. logging in over ssh breaks it. Starting an Xvnc breaks it. etc. I assume the only reason it works locally is because $DISPLAY is transferred over and the local X server is configured to allow all local connections with the same user.

Output in ssh session:

[cendio@dhcp-253-45 ~]$ gnome-terminal
Error constructing proxy for org.gnome.Terminal:/org/gnome/Terminal/Factory0: Error calling StartServiceByName for org.gnome.Terminal: Timeout was reached

And in the journal:

Jul 08 15:21:18 dhcp-253-45.lkpg.cendio.se systemd[1620]: Started D-Bus User Message Bus.
Jul 08 15:21:18 dhcp-253-45.lkpg.cendio.se dbus-daemon[1780]: Activating via systemd: service name='org.gtk.vfs.Daemon' unit='gvfs-daemon.service'
Jul 08 15:21:18 dhcp-253-45.lkpg.cendio.se systemd[1620]: Starting Virtual filesystem service...
Jul 08 15:21:18 dhcp-253-45.lkpg.cendio.se dbus-daemon[1780]: Successfully activated service 'org.gtk.vfs.Daemon'
Jul 08 15:21:18 dhcp-253-45.lkpg.cendio.se systemd[1620]: Started Virtual filesystem service.
Jul 08 15:21:19 dhcp-253-45.lkpg.cendio.se dbus-daemon[1780]: Activating via systemd: service name='org.gnome.Terminal' unit='gnome-terminal-server.service'
Jul 08 15:21:19 dhcp-253-45.lkpg.cendio.se systemd[1620]: Starting GNOME Terminal Server...
Jul 08 15:21:19 dhcp-253-45.lkpg.cendio.se gnome-terminal-server[1797]: Unable to init server: Kunde inte ansluta: Connection refused
Jul 08 15:21:19 dhcp-253-45.lkpg.cendio.se gnome-terminal-server[1797]: Failed to parse arguments: Kan inte öppna display:
Jul 08 15:21:19 dhcp-253-45.lkpg.cendio.se systemd[1620]: gnome-terminal-server.service: Main process exited, code=exited, status=10/n/a
Jul 08 15:21:19 dhcp-253-45.lkpg.cendio.se systemd[1620]: Failed to start GNOME Terminal Server.
Jul 08 15:21:19 dhcp-253-45.lkpg.cendio.se systemd[1620]: gnome-terminal-server.service: Unit entered failed state.
Jul 08 15:21:19 dhcp-253-45.lkpg.cendio.se systemd[1620]: gnome-terminal-server.service: Failed with result 'exit-code'.

In a ThinLinc/VNC session it gets worse:

Nautilus:

jul 08 15:41:52 dhcp-253-45.lkpg.cendio.se dbus-daemon[1880]: Activating service name='org.gnome.Nautilus'
jul 08 15:41:52 dhcp-253-45.lkpg.cendio.se dbus-daemon[1880]: Successfully activated service 'org.gnome.Nautilus'
jul 08 15:41:52 dhcp-253-45.lkpg.cendio.se org.gnome.Nautilus[1880]: Unable to init server: Kunde inte ansluta: Connection refused
jul 08 15:41:52 dhcp-253-45.lkpg.cendio.se org.gnome.Nautilus[1880]: (nautilus:2539): Gtk-WARNING **: cannot open display:

gnome-clocks:

jul 08 15:42:03 dhcp-253-45.lkpg.cendio.se dbus-daemon[1880]: Activating service name='org.gnome.clocks'
jul 08 15:42:03 dhcp-253-45.lkpg.cendio.se dbus-daemon[1880]: Successfully activated service 'org.gnome.clocks'
jul 08 15:42:03 dhcp-253-45.lkpg.cendio.se org.gnome.clocks[1880]: Unable to init server: Kunde inte ansluta: Connection refused
jul 08 15:42:03 dhcp-253-45.lkpg.cendio.se org.gnome.clocks[1880]: (gnome-clocks:2556): Gtk-WARNING **: cannot open display:

gnome-documents:

jul 08 15:42:07 dhcp-253-45.lkpg.cendio.se dbus-daemon[1880]: Activating service name='org.gnome.Documents'
jul 08 15:42:08 dhcp-253-45.lkpg.cendio.se dbus-daemon[1880]: Successfully activated service 'org.gnome.Documents'
jul 08 15:42:08 dhcp-253-45.lkpg.cendio.se org.gnome.Documents[1880]: Unable to init server: Kunde inte ansluta: Connection refused
jul 08 15:42:08 dhcp-253-45.lkpg.cendio.se org.gnome.Documents[1880]: (org.gnome.Documents:2566): Gtk-WARNING **: cannot open display:


Doing an strace shows attempts to reach Wayland and Broadway, but not the proper X server:

[cendio@dhcp-253-45 ~]$ sudo strace -e connect -f -p 1880
strace: Process 1880 attached with 2 threads
[pid  1880] connect(55, {sa_family=AF_LOCAL, sun_path="/run/systemd/journal/stdout"}, 29) = 0
[pid  1880] connect(56, {sa_family=AF_LOCAL, sun_path="/run/systemd/journal/stdout"}, 29) = 0
strace: Process 2658 attached
strace: Process 2659 attached
[pid  2659] connect(4, {sa_family=AF_LOCAL, sun_path="/run/user/1000/bus"}, 110) = 0
strace: Process 2660 attached
strace: Process 2661 attached
[pid  2658] +++ killed by SIGKILL +++
[pid  1880] --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_KILLED, si_pid=2658, si_uid=1000, si_status=SIGKILL, si_utime=0, si_stime=0} ---
[pid  2659] connect(7, {sa_family=AF_LOCAL, sun_path="/run/user/1000/wayland-0"}, 27) = -1 ENOENT (No such file or directory)
[pid  2659] connect(7, {sa_family=AF_LOCAL, sun_path=@"/run/user/1000/broadway1.socket"}, 34) = -1 ECONNREFUSED (Connection refused)
[pid  2660] +++ exited with 1 +++
[pid  2661] +++ exited with 1 +++
[pid  2659] +++ exited with 1 +++

Comment 1 Pierre Ossman 2016-07-08 14:02:32 UTC
I'm seeing the same wayland/broadway thing with gnome-terminal-server, but I have to strace systemd instead of dbus-daemon in that case.

Comment 2 Pierre Ossman 2016-07-08 14:08:39 UTC
Restoring a session specific bus makes the problems go away:

DBUS_SESSION_BUS_ADDRESS=""
eval `dbus-launch --sh-syntax --exit-with-session`

Comment 3 Pierre Ossman 2016-07-08 14:20:52 UTC
Bug 1281675 seems to also be about this problem, although perhaps from a different perspective.

Comment 4 Pierre Ossman 2016-07-08 14:36:31 UTC
It did reveal dbus-update-activation-environment however. And I hence discovered /etc/X11/xinit/xinitrc.d/50-systemd-user.sh.

Running that fixes the ThinLinc/VNC case, but not SSH. And that's because $XAUTHORITY isn't set for SSH. But first setting it, and then running the script; that fixes the issue.

Looks like more work is needed before this idea is ready for general use. Any easy way to back out this change from systemd?

(And I still think it's a bad idea to repurpose the session bus. Feel free to add a new user bus, but don't go changing the scope of an existing bus.)

Comment 5 Pierre Ossman 2016-07-11 08:56:53 UTC
Another bug caused by this is that the language setting is not respected since $LANG is set by GDM, but gnome-terminal, nautilus, etc. are spawned by systemd and hence use the system $LANG.

So half my UI is in the system language, and half is in the user language.

Comment 6 Michael Catanzaro 2016-07-11 14:01:09 UTC
I think it may have broken Evolution too (no mail after logging into user account more than once), see GNOME #768680.

Comment 7 Ray Strode [halfline] 2016-07-11 16:39:32 UTC
this is a dbus change not a systemd change, correcting component.

Comment 8 Pierre Ossman 2016-10-05 14:44:52 UTC
Note that the "fix" in upstream Gnome only solves the issue when you are using a Gnome desktop. Gnome applications such as totem are still broken on other desktops, e.g. Mate.

Comment 9 Pierre Ossman 2017-02-27 14:53:31 UTC
And today I noticed that Xfce is broken since xfce4-notifyd fails to start:

> Feb 27 15:48:49 ossman.lkpg.cendio.se dbus-daemon[18959]: [session uid=1016 pid=18959] Activating via systemd: service name='org.freedesktop.Notifications' unit='xfce4-notifyd.service' requested by ':1.60' (uid=1016 pid=19709 comm="/usr/bin/python3 /bin/d-feet " label="unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023")
> Feb 27 15:48:49 ossman.lkpg.cendio.se systemd[18763]: Starting XFCE notifications service...
> Feb 27 15:48:49 ossman.lkpg.cendio.se xfce4-notifyd[19886]: Unable to init server: Could not connect: Connection refused
> Feb 27 15:48:49 ossman.lkpg.cendio.se xfce4-notifyd[19886]: cannot open display: 
> Feb 27 15:48:49 ossman.lkpg.cendio.se systemd[18763]: xfce4-notifyd.service: Main process exited, code=exited, status=1/FAILURE
> Feb 27 15:48:49 ossman.lkpg.cendio.se systemd[18763]: Failed to start XFCE notifications service.
> Feb 27 15:48:49 ossman.lkpg.cendio.se systemd[18763]: xfce4-notifyd.service: Unit entered failed state.
> Feb 27 15:48:49 ossman.lkpg.cendio.se systemd[18763]: xfce4-notifyd.service: Failed with result 'exit-code'.
> Feb 27 15:50:49 ossman.lkpg.cendio.se dbus-daemon[18959]: [session uid=1016 pid=18959] Failed to activate service 'org.freedesktop.Notifications': timed out (service_start_timeout=120000ms)

Comment 10 Jonathan Briggs 2017-05-01 19:04:44 UTC
I just ran into this today myself. On Fedora 25.

I had to unset DBUS_SESSION_BUS_ADDRESS in order to run apps on Xming over PuTTY.

Comment 11 Fedora End Of Life 2017-07-25 21:40:53 UTC
This message is a reminder that Fedora 24 is nearing its end of life.
Approximately 2 (two) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 24. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '24'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 24 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 12 Fedora End Of Life 2017-08-08 15:27:35 UTC
Fedora 24 changed to end-of-life (EOL) status on 2017-08-08. Fedora 24 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 13 Fedora End Of Life 2018-05-03 08:38:57 UTC
This message is a reminder that Fedora 26 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 26. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '26'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 26 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 14 Fedora End Of Life 2018-05-29 11:52:21 UTC
Fedora 26 changed to end-of-life (EOL) status on 2018-05-29. Fedora 26
is no longer maintained, which means that it will not receive any
further security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.