Simon McVittie dixit: >> I read through the bugreport and I can see why it should not >> just be automatically restarted. > >This has been discussed at *extensive* length before, and I'm pretty >sure nothing I say is going to change your opinion anyway, but OK,
I wrote “I can see why”, not “I can’t see why”. >Restarting the system dbus-daemon, `dbus-daemon --system`, on a running >system is not a supported action. It disconnects all system-level D-Bus >clients and services, which nearly always causes them to exit. Of the But that’s OKAY! I want them to exit so that I can restart them. I just need a list of affected services. >Restarting the session dbus-daemon, `dbus-daemon --session`, in a I don’t have such a thing. $ ps ax | fgrep dbus 1497 ? Ss 0:00 /usr/bin/dbus-daemon --system 6883 pts/17 S+ 0:00 grep -F dbus So it’s just system services. >Compare with any other stateful IPC protocol, like X11. In principle, it >is possible to write an X11 client that can reconnect when you restart the >X11 server. In practice, essentially nobody does (I think Emacs might?) Yes, I know, it’s fine. I just want a list of services to restart. >On a typical Debian system, restarting `dbus-daemon --system` will >cause system services to stop working, in a way that is only practical >to recover from by a reboot. If you have an in-depth understanding of WHICH ones? I’m pretty sure this only applies to systemd, which I don’t use. >D-Bus is about 8 years older than systemd, and many things that are >not systemd use it. I don't know what all of them are, in the same way Yes, but which ones, or rather, how can I find them out? >> Is there a “needrestart”-like tool, or something like ps/netstat, >> showing which programs use dbus, for restarting them afterwards? > >The D-Bus protocol operates over an AF_UNIX socket (a lot like X11 and >Wayland), so passing suitable options to netstat or ss will tell you >what is connected to it. Hmm. This? $ sudo netstat -anp | fgrep 1497 unix 2 [ ACC ] STREAM LISTENING 14017 1497/dbus-daemon /run/dbus/system_bus_socket unix 3 [ ] STREAM CONNECTED 1356473 1497/dbus-daemon /run/dbus/system_bus_socket unix 2 [ ] DGRAM 1267167 1497/dbus-daemon unix 3 [ ] STREAM CONNECTED 15526 1497/dbus-daemon unix 3 [ ] STREAM CONNECTED 15527 1497/dbus-daemon And then this? $ sudo netstat -anp | fgrep /run/dbus/system_bus_socket unix 2 [ ACC ] STREAM LISTENING 14017 1497/dbus-daemon /run/dbus/system_bus_socket unix 3 [ ] STREAM CONNECTED 1356473 1497/dbus-daemon /run/dbus/system_bus_socket Does this mean nothing is connected to the running system dbus? Another system has even more: $ sudo netstat -anp | fgrep /run/dbus/system_bus_socket unix 2 [ ACC ] STREAM LISTENING 20510 2203/dbus-daemon /run/dbus/system_bus_socket unix 3 [ ] STREAM CONNECTED 31073 2203/dbus-daemon /run/dbus/system_bus_socket unix 3 [ ] STREAM CONNECTED 24671 2203/dbus-daemon /run/dbus/system_bus_socket unix 3 [ ] STREAM CONNECTED 24022 2203/dbus-daemon /run/dbus/system_bus_socket unix 3 [ ] STREAM CONNECTED 20019 2203/dbus-daemon /run/dbus/system_bus_socket unix 3 [ ] STREAM CONNECTED 20769 2203/dbus-daemon /run/dbus/system_bus_socket unix 3 [ ] STREAM CONNECTED 28910 2203/dbus-daemon /run/dbus/system_bus_socket But still all in $pid/dbus-daemon. $ sudo lsof /run/dbus/system_bus_socket COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME dbus-daem 2203 messagebus 4u unix 0x000000005a3413d3 0t0 20510 /run/dbus/system_bus_socket type=STREAM dbus-daem 2203 messagebus 9u unix 0x00000000ec903f8e 0t0 20769 /run/dbus/system_bus_socket type=STREAM dbus-daem 2203 messagebus 10u unix 0x00000000f91f0f2d 0t0 20019 /run/dbus/system_bus_socket type=STREAM dbus-daem 2203 messagebus 11u unix 0x00000000487984d7 0t0 31073 /run/dbus/system_bus_socket type=STREAM dbus-daem 2203 messagebus 12u unix 0x00000000fb9c734e 0t0 24022 /run/dbus/system_bus_socket type=STREAM dbus-daem 2203 messagebus 13u unix 0x00000000a12611a9 0t0 24671 /run/dbus/system_bus_socket type=STREAM dbus-daem 2203 messagebus 14u unix 0x00000000266ed9ec 0t0 28910 /run/dbus/system_bus_socket type=STREAM Would either of these commands positively find all affected users of dbus? $ ll /run/dbus/ total 4 -rw-r--r-- 1 root root 5 Jun 24 23:53 pid srwxrwxrwx 1 root root 0 Jun 24 23:53 system_bus_socket= (on both systems) That’s all I want to know… bye, //mirabilos -- Yay for having to rewrite other people's Bash scripts because bash suddenly stopped supporting the bash extensions they make use of -- Tonnerre Lombard in #nosec