libvirtd.service is Type=notify, using sd_notify to report service startup. Presently libvirt links against libsystemd-daemon to call sd_notify, but this library has been renamed to libsystemd in newer versions of systemd, with the older library present in systemd's compat library support. This support has been removed in systemd git: https://github.com/systemd/systemd/commit/4de282cf9324ab13d17ac334244d0d7cae2df37d . When this change is present on the installed systemd, - old builds of libvirt.so will fail to load because of a lack of libsystemd-daemon.so - new builds of libvirt will appear to work, but will have silently disabled sd_notify support. As a result, libvirtd.service will go into a continuous restart loop. systemd 229 is presently the latest release, but Arch jumped the gun and disabled compat library support in its 229 packages, cf https://bugs.archlinux.org/task/48440 . Debian fixed this last August but failed to upstream the fix. Boooooo. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=779775
We should just ditch use of sd_notify and not link to any systemd library. It is trivial to implementation the notification in libvirt directly - its just a matter of connecting to the UNIX socket path from $NOTIFY_SOCKET env var and sending the string "READY=1".
Sure... because systemd has never broken compatibility in the past, right? ;) Annoying though it is, libvirt probably gains some abstraction benefit out of delegating this work to sd_notify, and if/when they deprecate that API in the future, the issue would manifest itself as a build failure, when otherwise (by hand-stuffing the socket) it would be altogether harder to diagnose.
CCing the debian maintainer guido, comment #0 mentions https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=779775 as a fix, sounds like arch wants this too so maybe we find a way to get it upstream? (but I might be missing the details)
We're linking against libsystemdaemon since some time in Debian: https://anonscm.debian.org/cgit/pkg-libvirt/libvirt.git/tree/debian/patches/debian/libsystemd.patch I did not get around to clean this up to link against either libsystemd-daemon yet.
Now pushed upstream: commit c0bc172383c2c955394589e5808457935ae06f1d Author: Daniel P. Berrange <berrange> AuthorDate: 2016-06-06 15:03:27 +0100 Commit: Daniel P. Berrange <berrange> CommitDate: 2016-06-07 09:37:57 +0100 systemd: directly notify systemd instead of using sd_notify The sd_notify method is used to tell systemd when libvirtd has finished starting up. All it does is send a datagram containing the string parameter to systemd on a UNIX socket named in the NOTIFY_SOCKET environment variable. Rather than pulling in the systemd libraries for this, just code the notification directly in libvirt as this is a stable ABI from systemd's POV which explicitly allows independant implementations: See "Reimplementable Independently" column in the "$NOTIFY_SOCKET Daemon Notifications" row: https://www.freedesktop.org/wiki/Software/systemd/InterfacePortabilityAndStabilityChart/ Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1314881 Signed-off-by: Daniel P. Berrange <berrange> git describe: v1.3.5-11-gc0bc172