Created attachment 646333 [details] test-parallel.c Description of problem: See the attached test script. Occasionally threads fail with this error: libvir: QEMU Driver error : Requested operation is not valid: domain is not running Although most of the time domain launch works fine. Version-Release number of selected component (if applicable): libvirt-0.10.2.1-2.fc18.x86_64 How reproducible: Rare, but easy to reproduce using the attached script if you run it for long enough. Steps to Reproduce: 1. Run attached script.
I added a bit of extra debug to the script to find that this happens in virDomainDestroyFlags, when the domain should definitely be up and running.
I think this is probably not a bug, but is caused by us calling close on the socket before calling virDomainDestroy*, which caused a race where the daemon might exit (causing qemu to exit) before virDomainDestroy was called.
Just seen it happen again, even though I moved the close to right after virConnectClose.
Similarly, the example script doesn't run anymore, the referenced appliance URL doesn't exist. Given the age I assume this is fixed, but Rich please reopen if I'm wrong