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.
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.