Comment 16 for bug 1397130

Revision history for this message
Serge Hallyn (serge-hallyn) wrote : Re: [Bug 1397130] Re: libvirt-bin crashes / refuses to restart if cgmanager is restarted

Hi Don,

indeed the underlying libs (mainly the libnih-dbus ones) are not thread-safe.
We've had to serialize access to cgmanager-client in lxc for the same
reason.

The cgm_dbus_connect() happens once on every cgmanager action, not once
at libvirt startup. So doing pthread_once() is not going to do the right
thing here IIUC. Rather we should just take a pthread lock at connect
and drop it at disconnect.