If libvirt domains are created or destroyed during gatherd execution there is a possibility of a race condition that can cause gatherd to crash. There are two patches to metricVirt.c. The first patch ensures the count of total libvirt domains is updated on exit from collectDomainStats(). The second patch detects a null domain pointer returned by livirt API when passed a reference to an invalid domain id.
Committed to CVS Head
Patch attached.