FS#50587 - D-Bus not working any more

Attached to Project: Arch Linux
Opened by Aaron Fischer (aaronmueller) - Tuesday, 30 August 2016, 10:03 GMT
Last edited by Doug Newgard (Scimmia) - Wednesday, 31 August 2016, 14:05 GMT
Task Type Bug Report
Category System
Status Closed
Assigned To No-one
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
I don't get any dbus user session bus working. It works until upgrading dbus to 1.10.10-3 (i think). I don't changed anything on my system.

A lot of applications complain on "connection refused"

qdbusviewer-qt4:
Error: Cannot connect to D-Bus: Failed to connect to socket /tmp/dbus-vJR3r4DaTv: Connection refused

thunderbird:
Client failed to connect to the D-BUS daemon:
Failed to connect to socket /tmp/dbus-vJR3r4DaTv: Connection refused

ssh:
sign_and_send_pubkey: signing failed: agent refused operation



% systemctl status dbus.service
● dbus.service - D-Bus System Message Bus
Loaded: loaded (/usr/lib/systemd/system/dbus.service; static; vendor preset: disabled)
Active: active (running) since Tue 2016-08-30 11:36:02 CEST; 26min ago
Docs: man:dbus-daemon(1)
Main PID: 379 (dbus-daemon)
Tasks: 1 (limit: 4915)
CGroup: /system.slice/dbus.service
└─379 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation

% systemctl status dbus.socket
● dbus.socket - D-Bus System Message Bus Socket
Loaded: loaded (/usr/lib/systemd/system/dbus.socket; static; vendor preset: disabled)
Active: active (running) since Tue 2016-08-30 11:36:02 CEST; 27min ago
Listen: /run/dbus/system_bus_socket (Stream)

This task depends upon

Closed by  Doug Newgard (Scimmia)
Wednesday, 31 August 2016, 14:05 GMT
Reason for closing:  Not a bug
Additional comments about closing:  Config issue
Comment by Aaron Fischer (aaronmueller) - Tuesday, 30 August 2016, 10:20 GMT
The error message changed, when I remove this line from my .xinitrc
eval `dbus-launch --sh-syntax --exit-with-session`

to

Error: Cannot connect to D-Bus: Using X11 for dbus-daemon autolaunch was disabled at compile time, set your DBUS_SESSION_BUS_ADDRESS instead
Comment by Olivier Mehani (shtrom) - Tuesday, 30 August 2016, 12:00 GMT
I have the same issue after upgrading dbus (1.10.8-1 -> 1.10.10-3).

Essentially, it seems that the socket is now in /run/user/UID/bus, but *something* in the X session setup sets $DBUS_SESSION_BUS_ADDRESS to /tmp/dbus-XXXXXX, which doesn't exist by the time the session has started. This leads to Gnome sessions dying immediately, as well as a number of other clients not functionning properly as they don't manage to connect to the bus.

Suprisingly, starting a `Gnome on Wayland` session actually works for me, which would suggest that whatever is wrong is in a script/config only used with Xorg sessions. I'm still trying to find where that would be.

I'm seeing this behaviour with the following packages installed:

$ pacman -Qi systemd dbus xorg-server wayland gdm gnome-session | grep -i "^\(Name\|Version\)"
Name : systemd
Version : 231-1
Name : dbus
Version : 1.10.10-3
Name : xorg-server
Version : 1.18.4-1
Name : wayland
Version : 1.11.0-1
Name : gdm
Version : 3.20.1-2
Name : gnome-session
Version : 3.20.2-1

Comment by Olivier Mehani (shtrom) - Tuesday, 30 August 2016, 12:22 GMT
Ok, my .xprofile was bodgy, and restarted a dbus, overwriting the environment variable for the existing one.

Aaron: would you have the same problem? Do you have anything like that (e.g., calls to dbus-launch, or manipulation of the DBUS_SESSION_BUS_ADDRESS variable) in your /etc/xprofile, $HOME/.xprofile, or anything else sourced by /etc/gdm/Xsession?
Comment by Aaron Fischer (aaronmueller) - Tuesday, 30 August 2016, 12:30 GMT
@Oliver: I had a "dbus-launch..." in my .xinitrc. I removed the line and get a other error, see comment #1
Comment by Doug Newgard (Scimmia) - Tuesday, 30 August 2016, 13:44 GMT
He didn't ask about .xinitrc, he asked about other files.

This is very, very likely a config issue.
Comment by Aaron Fischer (aaronmueller) - Tuesday, 30 August 2016, 13:52 GMT
@Doug: I don't have any of the files @Oliver mentioned.
Do you have any hints to debug this further?
Relevant board thread: https://bbs.archlinux.org/viewtopic.php?pid=1650708
Comment by Doug Newgard (Scimmia) - Tuesday, 30 August 2016, 14:10 GMT
First thing I would do is grep through $HOME and /etc looking for anything calling dbus-launch.
Comment by Aaron Fischer (aaronmueller) - Wednesday, 31 August 2016, 08:17 GMT
Thanks, I've found a dbus-launch. After removing it, it worked again.
Comment by Olivier Mehani (shtrom) - Wednesday, 31 August 2016, 10:17 GMT
Where was it?

Loading...