systemctl --user: Failed to connect to bus: No such file or directory
Windows version (build number): 21H1 19043.1706
Linux distribution: Ubuntu 21.10
Kernel version: 5.10.102.1-microsoft-standard-WSL2
Genie version: genie 2.3
Describe the bug
Follow up to #6 and #51.
Randomly after some time dbus breaks. Shutting wsl down completely fixes it.
ps aux | grep dbus-daemon
message+ 80 0.0 0.0 8584 3936 ? Ss 10:55 0:00 @dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
sandro 1084567 0.0 0.0 9228 6020 pts/11 S+ 15:11 0:00 grep dbus-daemon
busctl
NAME PID PROCESS USER CONNECTION UNIT SESSION DESCRIPTION
:1.0 1 systemd root :1.0 init.scope - -
:1.1 70 systemd-network systemd-network :1.1 systemd-networkd.service - -
:1.10 452 systemd sandro :1.10 [email protected] - -
:1.12 1079 machinectl root :1.12 - - -
:1.18 42399 polkitd root :1.18 polkit.service - -
:1.2 86 systemd-logind root :1.2 systemd-logind.service - -
:1.4 83 networkd-dispat root :1.4 networkd-dispatcher.service - -
:1.48 1033723 machinectl root :1.48 - - -
:1.51 1036408 machinectl root :1.51 - - -
:1.6 447 machinectl root :1.6 - - -
:1.63 1083073 systemd-resolve systemd-resolve :1.63 systemd-resolved.service - -
:1.65 1083651 machinectl root :1.65 - - -
:1.67 1084677 busctl sandro :1.67 session-c13.scope c13 -
:1.7 448 systemd-machine root :1.7 systemd-machined.service - -
io.netplan.Netplan - - - (activatable) - - -
org.freedesktop.DBus 1 systemd root - init.scope - -
org.freedesktop.PolicyKit1 42399 polkitd root :1.18 polkit.service - -
org.freedesktop.hostname1 - - - (activatable) - - -
org.freedesktop.import1 - - - (activatable) - - -
org.freedesktop.locale1 - - - (activatable) - - -
org.freedesktop.login1 86 systemd-logind root :1.2 systemd-logind.service - -
org.freedesktop.machine1 448 systemd-machine root :1.7 systemd-machined.service - -
org.freedesktop.network1 70 systemd-network systemd-network :1.1 systemd-networkd.service - -
org.freedesktop.portable1 - - - (activatable) - - -
org.freedesktop.resolve1 1083073 systemd-resolve systemd-resolve :1.63 systemd-resolved.service - -
org.freedesktop.systemd1 1 systemd root :1.0 init.scope - -
org.freedesktop.timedate1 - - - (activatable) - - -
org.freedesktop.timesync1 - - - (activatable) - - -
Confirm that you are running inside the bottle: inside
To Reproduce Steps to reproduce the behavior:
- wait until it breaks
- run anything systemd related
Expected behavior A clear and concise description of what you expected to happen.
Screenshots If applicable, add screenshots to help explain your problem.
Additional context Add any other context about the problem here.
I confirm that I have read the ENTIRE supplied readme file and checked for relevant information on the repository wiki before raising this issue, and that if the solution to this issue is found in either location, it will be closed without further comment:
- [x] Yes.
I will look into it (including specifically on Ubuntu 21.10) as best I can, but I feel like I should say in advance that while I've had a lot of long-running sessions, I've never observed this behavior - so I can't say I expect much success.
Any logs or other information you might be able to dig up around the time that dbus breaks would be very useful.
(Also, is this just the user dbus? Can you still connect to system dbus services?)
I think the only common reproduce I found is that it happens when the system is under load.
The only relevant log in dmesgI could find around the crash.
Jun 03 14:21:07 machine-wsl kernel: FS-Cache: Duplicate cookie detected
Jun 03 14:21:07 machine-wsl kernel: FS-Cache: O-cookie c=00000000723f5997 [p=00000000da56b31a fl=226 nc=0 na=1]
Jun 03 14:21:07 machine-wsl kernel: FS-Cache: O-cookie d=00000000634ab4fa n=00000000bf1b624f
Jun 03 14:21:07 machine-wsl kernel: FS-Cache: O-key=[8] 'ea34040000000600'
Jun 03 14:21:07 machine-wsl kernel: FS-Cache: N-cookie c=000000005f7cad42 [p=00000000da56b31a fl=2 nc=0 na=1]
Jun 03 14:21:07 machine-wsl kernel: FS-Cache: N-cookie d=00000000634ab4fa n=00000000498f996f
Jun 03 14:21:07 machine-wsl kernel: FS-Cache: N-key=[8] 'ea34040000000600'
Jun 03 14:21:07 machine-wsl kernel: FS-Cache: Duplicate cookie detected
Jun 03 14:21:07 machine-wsl kernel: FS-Cache: O-cookie c=00000000723f5997 [p=00000000da56b31a fl=226 nc=0 na=1]
Jun 03 14:21:07 machine-wsl kernel: FS-Cache: O-cookie d=00000000634ab4fa n=00000000bf1b624f
Jun 03 14:21:07 machine-wsl kernel: FS-Cache: O-key=[8] 'ea34040000000600'
Jun 03 14:21:07 machine-wsl kernel: FS-Cache: N-cookie c=000000005f7cad42 [p=00000000da56b31a fl=2 nc=0 na=1]
Jun 03 14:21:07 machine-wsl kernel: FS-Cache: N-cookie d=00000000634ab4fa n=00000000d8eaf962
Jun 03 14:21:07 machine-wsl kernel: FS-Cache: N-key=[8] 'ea34040000000600'
Jun 03 14:21:07 machine-wsl kernel: FS-Cache: Duplicate cookie detected
Jun 03 14:21:07 machine-wsl kernel: FS-Cache: O-cookie c=00000000723f5997 [p=00000000da56b31a fl=226 nc=0 na=1]
Jun 03 14:21:07 machine-wsl kernel: FS-Cache: O-cookie d=00000000634ab4fa n=00000000bf1b624f
Jun 03 14:21:07 machine-wsl kernel: FS-Cache: O-key=[8] 'ea34040000000600'
Jun 03 14:21:07 machine-wsl kernel: FS-Cache: N-cookie c=000000002548e0fb [p=00000000da56b31a fl=2 nc=0 na=1]
Jun 03 14:21:07 machine-wsl kernel: FS-Cache: N-cookie d=00000000634ab4fa n=000000005552d082
Jun 03 14:21:07 machine-wsl kernel: FS-Cache: N-key=[8] 'ea34040000000600'
Jun 03 14:21:07 machine-wsl kernel: FS-Cache: Duplicate cookie detected
Jun 03 14:21:07 machine-wsl kernel: FS-Cache: O-cookie c=00000000723f5997 [p=00000000da56b31a fl=226 nc=0 na=1]
Jun 03 14:21:07 machine-wsl kernel: FS-Cache: O-cookie d=00000000634ab4fa n=00000000bf1b624f
Jun 03 14:21:07 machine-wsl kernel: FS-Cache: O-key=[8] 'ea34040000000600'
Jun 03 14:21:07 machine-wsl kernel: FS-Cache: N-cookie c=00000000c2c41e55 [p=00000000da56b31a fl=2 nc=0 na=1]
Jun 03 14:21:07 machine-wsl kernel: FS-Cache: N-cookie d=00000000634ab4fa n=00000000498a6010
Jun 03 14:21:07 machine-wsl kernel: FS-Cache: N-key=[8] 'ea34040000000600'
Jun 03 14:21:07 machine-wsl kernel: FS-Cache: Duplicate cookie detected
Jun 03 14:21:07 machine-wsl kernel: FS-Cache: O-cookie c=00000000723f5997 [p=00000000da56b31a fl=226 nc=0 na=1]
Jun 03 14:21:07 machine-wsl kernel: FS-Cache: O-cookie d=00000000634ab4fa n=00000000bf1b624f
Jun 03 14:21:07 machine-wsl kernel: FS-Cache: O-key=[8] 'ea34040000000600'
Jun 03 14:21:07 machine-wsl kernel: FS-Cache: N-cookie c=000000005f7cad42 [p=00000000da56b31a fl=2 nc=0 na=1]
Jun 03 14:21:07 machine-wsl kernel: FS-Cache: N-cookie d=00000000634ab4fa n=00000000d8eaf962
Jun 03 14:21:07 machine-wsl kernel: FS-Cache: N-key=[8] 'ea34040000000600'
and
Jun 03 15:39:20 machine-wsl WSL2: Performing memory compaction.
Jun 03 15:39:45 machine-wsl systemd-resolved[1083073]: Grace period over, resuming full feature set (UDP+EDNS0) for DNS server 192.168.178.1.
Jun 03 15:39:46 machine-wsl init: (1036860) ERROR: InitCreateProcessUtilityVm:1909: write failed 32
Jun 03 15:39:46 machine-wsl init: (1036860) ERROR: InitCreateProcessUtilityVm:1909: write failed 32
Jun 03 15:39:51 machine-wsl init: (1) WARNING: /etc/resolv.conf updating disabled in /etc/wsl.conf
Jun 03 15:40:39 machine-wsl WSL2: Performing memory compaction.
Jun 03 15:41:40 machine-wsl WSL2: Performing memory compaction.
(Also, is this just the user dbus? Can you still connect to system dbus services?)
This is only for the user dbus.
State: running
Jobs: 0 queued
Failed: 0 units
Since: Fri 2022-06-03 10:55:58 CEST; 6h ago
CGroup: /
├─user.slice
│ └─user-1000.slice
│ ├─[email protected]
│ │ ├─app.slice
│ │ │ └─gpg-agent.service
│ │ │ └─703 /usr/bin/gpg-agent --supervised
│ │ └─init.scope
│ │ ├─452 /lib/systemd/systemd --user
│ │ └─453 (sd-pam)
│ ├─session-c14.scope
│ │ ├─1085733 /bin/bash -l
│ │ ├─1085734 (sd-pam)
│ │ ├─1085862 /bin/bash -l
│ │ └─1085865 /nix/store/7fnxgzhfb489bb1w228w22ngcwlz42gh-gitstatus-1.5.4/bin/gitstatusd -G v1.5.4 --parent-pid=1085733 --num-threads=8 --max-num-staged=1 --max-num-unstaged=1 >
│ ├─session-c1.scope
│ │ ├─ 449 /bin/bash -l
│ │ ├─ 469 (sd-pam)
│ │ ├─ 605 /bin/bash -l
│ │ ├─ 608 /nix/store/i1mm5n5vdc1gjxvbcmn8sw804gyq1q4w-gitstatus-1.5.4/bin/gitstatusd -G v1.5.4 --parent-pid=449 --num-threads=8 --max-num-staged=1 --max-num-unstaged=1 --ma>
│ │ ├─ 634 /nix/store/i5p2zvz0k582v94n54jb3pckl3721qwf-cod-0.1.0/bin/cod api forked-daemon 627
│ │ ├─ 728 ssh-agent -t 86400
│ │ ├─1092651 ssh: /home/sandro/.ssh/sockets/0bf18b36bd7a3ac305724719f560f93efb9737d0 [mux]
│ │ └─1094046 ssh machine
│ ├─session-c11.scope
│ │ ├─1036409 /bin/bash -l
│ │ ├─1036410 (sd-pam)
│ │ ├─1036537 /bin/bash -l
│ │ └─1036540 /nix/store/i1mm5n5vdc1gjxvbcmn8sw804gyq1q4w-gitstatus-1.5.4/bin/gitstatusd -G v1.5.4 --parent-pid=1036409 --num-threads=8 --max-num-staged=1 --max-num-unstaged=1 >
│ └─session-c16.scope
│ ├─1104178 /bin/bash -l
│ ├─1104179 (sd-pam)
│ ├─1104306 /bin/bash -l
│ ├─1104309 /nix/store/7fnxgzhfb489bb1w228w22ngcwlz42gh-gitstatus-1.5.4/bin/gitstatusd -G v1.5.4 --parent-pid=1104178 --num-threads=8 --max-num-staged=1 --max-num-unstaged=1 >
│ ├─1105327 systemctl status
│ └─1105328 pager
├─init.scope
│ └─1 systemd
└─system.slice
├─containerd.service
│ └─101 /usr/bin/containerd
├─systemd-networkd.service
│ └─70 /lib/systemd/systemd-networkd
├─systemd-udevd.service
│ └─61 /lib/systemd/systemd-udevd
├─cron.service
│ └─79 /usr/sbin/cron -f -P
├─docker.service
│ └─128 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
├─polkit.service
│ └─42399 /usr/libexec/polkitd --no-debug
├─networkd-dispatcher.service
│ └─83 /usr/bin/python3 /usr/bin/networkd-dispatcher --run-startup-triggers
├─systemd-journald.service
│ └─33 /lib/systemd/systemd-journald
├─ssh.service
│ └─107 sshd: /usr/sbin/sshd -D [listener] 0 of 10-100 startups
├─nix-daemon.service
│ └─47905 nix-daemon --daemon
├─systemd-machined.service
│ └─448 /lib/systemd/systemd-machined
├─rsyslog.service
│ └─85 /usr/sbin/rsyslogd -n -iNONE
├─console-getty.service
│ └─104 /sbin/agetty -o -p -- \u --noclear --keep-baud console 115200,38400,9600 wezterm
├─systemd-resolved.service
│ └─1083073 /lib/systemd/systemd-resolved
├─dbus.service
│ └─80 @dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
├─system-getty.slice
│ └─[email protected]
│ └─106 /sbin/agetty -o -p -- \u --noclear tty1 linux
└─systemd-logind.service
└─86 /lib/systemd/systemd-logind