You are not logged in.

#1 2018-04-05 07:46:50

bartus
Member
Registered: 2013-05-13
Posts: 57

[SOLVED] Sytemd dbus not starting properly from time to time.

Hi,
I have a recurring issue with my system.
Every now and then when I boot up, log to tty and trying to start X session (startx //.xinitrc{exec gnome-session}) it crashes and I got dbus error in X.log.
I can start xfce-session (startxfce4) and manualy enable network (ip link set eno1 up; sudo dhclient) but dbus never recovers and systemctl neither.
Have no clue how to aproche this ...
Xorg.log

(EE) dbus-core: error connecting to system bus: org.freedesktop.DBus.Error.FileNotFound (Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory)

ls -l /run/

razem 88K
-rw-------  1 root    root     49K 04-05 09:26 pacct_source
drwxr-xr-x 18 root    root    4.0K 04-05 08:51 ../
-rw-r--r--  1 root    root    2.2K 04-05 08:51 asd.conf
drwxr-xr-x 15 root    root     600 04-05 09:09 ./
drwxr-xr-x 11 root    root     300 04-05 09:01 systemd/
drwxr-xr-x  7 root    root     160 04-05 09:01 udev/
drwxr-xr-x  2 root    root     100 04-05 08:51 logmein-hamachi/
drwxr-xr-x  4 root    root      80 04-05 08:51 ananicy/
drwx------  3 root    root      80 04-05 08:51 lock/
drwxr-xr-x  2 root    root      80 04-05 08:51 lvm/
drwxr-xr-x  2 root    root      80 04-05 08:51 pacct_shadow.d/
drwxrwxr-x  2 netdata netdata   60 04-05 08:51 netdata/
drwx--x--x  3 root    root      60 04-05 08:52 sudo/
drwxr-xr-x  2 root    root      60 04-05 08:51 tmpfiles.d/
drwxr-xr-x  2 root    root      40 04-05 08:51 initramfs/
drwxr-xr-x  2 root    root      40 04-05 08:51 log/
drwxr-xr-x  2 root    root      40 04-05 08:51 mount/
-rw-r-----  1 root    root       6 04-05 09:09 dhclient.pid
-rw-r--r--  1 root    root       4 04-05 08:51 atopacctd.pid
-rw-r--r--  1 root    root       4 04-05 08:51 crond.pid
-rw-r--r--  1 root    root       4 04-05 08:51 lighttpd.pid
-rw-r--r--  1 root    root       4 04-05 08:51 lvmetad.pid
-rw-r--r--  1 root    root       4 04-05 08:51 sshd.pid
-rw-r--r--  1 root    root       3 04-05 08:51 monitorix.pid
-rw-------  1 root    root       0 04-05 08:51 agetty.reload
-rw-r--r--  1 root    root       0 04-05 08:51 asd
----------  1 root    root       0 04-05 08:51 cron.reboot
prw-------  1 root    root       0 04-05 08:51 dmeventd-client|
prw-------  1 root    root       0 04-05 08:51 dmeventd-server|
-rw-------  1 root    root       0 04-05 08:51 xtables.lock

systemctl` also thorws dbus error

Failed to connect to bus: No such file or directory

echo $DBUS_SESSION_BUS_ADDRESS

unix:abstract=/tmp/dbus-wBV76TAqZ3,guid=615ef6c81b554bdbd5f3cd6e5ac5c9d7

ls -l /tmp

razem 408K
-rw-r-----  1 bartus bartus 179K 04-05 09:20  boot-1.log
-rw-r-----  1 bartus bartus 173K 04-05 09:20  boot-0.log
-rw-------  1 bartus bartus  12K 04-05 09:09  .com.vivaldi.Vivaldi.nwCG7u
-rw-------  1 bartus bartus  10K 04-05 09:09  .com.vivaldi.Vivaldi.R6lfn5
drwxr-xr-x 18 root   root   4.0K 04-05 08:51  ../
-rw-------  1 bartus bartus  703 04-05 09:22  .com.vivaldi.Vivaldi.OQFBpY
drwxrwxrwt 14 root   root    620 04-05 09:28  ./
-rw-------  1 bartus bartus  414 04-05 09:01  .xfsm-ICE-3VGCHZ
-rw-r-----  1 bartus bartus  330 04-05 09:07  .wiki-search.bartus.tmp
-rw-------  1 bartus bartus  153 04-05 09:22  .com.vivaldi.Vivaldi.23pnRI
drwx------  2 bartus bartus   80 04-05 09:02  .com.vivaldi.Vivaldi.nHX075/
drwxrwxrwt  2 bartus bartus   80 04-05 09:01  .ICE-unix/
drwxr-x--x  3 bartus bartus   80 04-05 09:02  pamac-checkdbs/
drwxr-xr-x  3 root   root     60 04-05 08:51  asd-root/
drwx------  2 bartus bartus   60 04-05 09:01  ssh-lLiFtH52qAOR/
drwx------  3 root   root     60 04-05 08:51  systemd-private-a8b2a86970c145c0b365345b5aac444f-ananicy.service-155pcC/
drwx------  3 root   root     60 04-05 08:51  systemd-private-a8b2a86970c145c0b365345b5aac444f-lighttpd.service-jE0u9t/
drwxrwxrwt  2 root   bartus   60 04-05 09:01  .X11-unix/
drwx------  2 bartus bartus   40 04-05 09:16 'Atom Crashes'/
drwx------  2 bartus bartus   40 04-05 08:51  pulse-PKdhtXMmr18n/
drwx------  2 bartus bartus   40 04-05 09:01  runtime-bartus/
drwx------  2 bartus bartus   40 04-05 09:01  tracker-extract-files.1000/
-rw-------  1 bartus bartus   13 04-05 09:22  .com.vivaldi.Vivaldi.gW4sw4
-r--r--r--  1 root   bartus   11 04-05 09:01  .X0-lock
srwxr-x--x  1 bartus bartus    0 04-05 09:17  atom-3XPkzoG6MWUw.sock=
-rw-------  1 bartus bartus    0 04-05 09:23  .com.vivaldi.Vivaldi.2UuOXi
-rw-------  1 bartus bartus    0 04-05 09:22  .com.vivaldi.Vivaldi.AEXKqq
-rw-------  1 bartus bartus    0 04-05 09:22  .com.vivaldi.Vivaldi.L69Puo
-rw-------  1 bartus bartus    0 04-05 09:22  .com.vivaldi.Vivaldi.oeePL0
-rw-------  1 bartus bartus    0 04-05 09:22  .com.vivaldi.Vivaldi.qIgziW
-rw-------  1 bartus bartus    0 04-05 09:22  .com.vivaldi.Vivaldi.SPVOpJ

Fortunately journalctl is working {logs truncuted ~1700 lines}:
Failed system journal: https://pastebin.com/UNxk4eKu
Fine system journal: https://pastebin.com/bVC1CdPG
But I can't find any pint of interst in those journal listing hmm

Last edited by bartus (2018-05-03 08:49:54)

Offline

#2 2018-04-05 08:37:05

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,246

Re: [SOLVED] Sytemd dbus not starting properly from time to time.

What does your .xinitrc look like? if exec gnome-session is all that is in there that is wrong. Make sure you aren't using dbus-launch anywhere and that your .xinitrc sources the necessary directives from /etc/X11/.xinitrc as noted in https://wiki.archlinux.org/index.php/Xinit#xinitrc (Note the second blue box)

Last edited by V1del (2018-04-05 08:37:49)

Offline

#3 2018-04-05 12:44:24

bartus
Member
Registered: 2013-05-13
Posts: 57

Re: [SOLVED] Sytemd dbus not starting properly from time to time.

You could be right, I newer tried test if systemctl is working before punching strartx.
I made appropriate adjustments to ~/.xinitrc

#!/bin/sh

userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap

# merge in defaults and keymaps

if [ -f $sysresources ]; then







    xrdb -merge $sysresources

fi

if [ -f $sysmodmap ]; then
    xmodmap $sysmodmap
fi

if [ -f "$userresources" ]; then







    xrdb -merge "$userresources"

fi

if [ -f "$usermodmap" ]; then
    xmodmap "$usermodmap"
fi

# start some nice programs

if [ -d /etc/X11/xinit/xinitrc.d ] ; then
 for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
  [ -x "$f" ] && . "$f"
 done
 unset f
fi

exec gnome-session

Let's see if that help - but it could take a while, as the issue occurs in ~week interval... think about reconciling with a deisplay manager since new TeamView requires one to work at all wink
Thanks for pointing me in a promising direction @V1del.

Last edited by bartus (2018-04-05 12:46:08)

Offline

#4 2018-04-05 12:57:04

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,246

Re: [SOLVED] Sytemd dbus not starting properly from time to time.

I find it weird that it would fail randomly and not 100% of the cases (likely some GNOME shenanigans *shrug*), however properly initializing the systemd session bus is a good idea either way.

Offline

#5 2018-04-05 14:40:06

bartus
Member
Registered: 2013-05-13
Posts: 57

Re: [SOLVED] Sytemd dbus not starting properly from time to time.

Single alteration to systemd I made was symlinking NetworkManager-wait-online.service to /dev/null for faster bootup. But it was years before issue first occurred ...

Last edited by bartus (2018-04-09 12:44:44)

Offline

#6 2018-05-03 08:45:50

bartus
Member
Registered: 2013-05-13
Posts: 57

Re: [SOLVED] Sytemd dbus not starting properly from time to time.

I think I have the issue pinned now. After today's sys malfunction I notice this line in journalctl

maj 03 10:29:22 grafZero systemd[1]: systemd 238 running in system mode. (+PAM -AUDIT -SELINUX -IMA -APPARMOR +SMACK -SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN2 +IDN +PCRE2 default-hierarchy=hybrid)
maj 03 10:29:22 grafZero systemd[1]: Detected architecture x86-64.
maj 03 10:29:22 grafZero systemd[1]: Set hostname to <grafZero>.
maj 03 10:29:22 grafZero systemd[1]: sockets.target: Found ordering cycle on dbus.socket/start
maj 03 10:29:22 grafZero systemd[1]: sockets.target: Found dependency on sysinit.target/start
maj 03 10:29:22 grafZero systemd[1]: sockets.target: Found dependency on swap.target/start
maj 03 10:29:22 grafZero systemd[1]: sockets.target: Found dependency on swapspace.service/start
maj 03 10:29:22 grafZero systemd[1]: sockets.target: Found dependency on basic.target/start
maj 03 10:29:22 grafZero systemd[1]: sockets.target: Found dependency on sockets.target/start
maj 03 10:29:22 grafZero systemd[1]: sockets.target: Job dbus.socket/start deleted to break ordering cycle starting with sockets.target/start

Looks like swapspace service is to blame, switch to use systemd-swap as it did basically the same stuff.
The issue was mentioned in AUR

Last edited by bartus (2018-05-03 08:52:30)

Offline

Board footer

Powered by FluxBB