Since I don't have the original email to reply-to, here is a link:
https://www.redhat.com/archives/libvirt-cim/2012-December/msg00038.html
In instance_from_dom():
* virDomainIsActive returns: Returns 1 if running, 0 if inactive, -1 on
error. You are testing for < 0 (error condition) and an else with no
determination about whether it's really active or not. Your comments in
the code and the CU_DEBUG statements don't seem to sync. How is
VSSD_RECOVERABLE true when active = -1?
NOTE: In looking at get_dominfo() again - and thinking about this as a
caller - why does it matter if autostart is set or not?
I really think the "get_domain_list()" should change to use
virConnectListAllDomains() - it may solve more timing issues.
John