pid1: lookup owning PID of BusName= name of services asynchronously
authorLennart Poettering <lennart@poettering.net>
Thu, 17 Feb 2022 13:40:25 +0000 (14:40 +0100)
committerLuca Boccassi <luca.boccassi@gmail.com>
Sat, 5 Mar 2022 21:03:32 +0000 (21:03 +0000)
commitcf390149cb25248169c482e315a1a7ff02eaf956
treeb3662bafc1e28df8b76b969f8691ba2ba58f9865
parenta51e540b278827c0fc59760b9c77cd42cbddc0d2
pid1: lookup owning PID of BusName= name of services asynchronously

A first step of removing blocking calls to the D-Bus broker from PID 1.
There's a lot more to got (i.e. grep src/core/ for sd_bus_creds
basically), but it's a start.

Removing blocking calls to D-Bus broker deals systematicallly with
deadlocks caused by dbus-daemon blocking on synchronous IPC calls back
to PID1 (e.g. Varlink calls through nss-systemd). Bugs such as #15316.

Also-see: https://github.com/systemd/systemd/pull/22038#issuecomment-1042958390
(cherry picked from commit e39eb045a502d599e6cd3fda7a46020dd438d018)
src/core/service.c
src/core/service.h