On 2012年09月17日 20:04, Michal Privoznik wrote:
On agent EOF the qemuProcessHandleAgentEOF() callback is called which locks virDomainObjPtr. Then qemuAgentClose() is called (with domain object locked) which eventually calls qemuAgentFree()
Guess you mean qemuAgentDispose here.
and qemuProcessHandleAgentDestroy(). This tries to lock the domain object again. Hence the deadlock. --- src/qemu/qemu_process.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 5ac1d2b..8f42c83 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -115,7 +115,7 @@ extern struct qemud_driver *qemu_driver; * performed */ static void -qemuProcessHandleAgentEOF(qemuAgentPtr agent ATTRIBUTE_UNUSED, +qemuProcessHandleAgentEOF(qemuAgentPtr agent, virDomainObjPtr vm) { struct qemud_driver *driver = qemu_driver; @@ -127,12 +127,12 @@ qemuProcessHandleAgentEOF(qemuAgentPtr agent ATTRIBUTE_UNUSED, virDomainObjLock(vm); priv = vm->privateData; - - qemuAgentClose(agent); priv->agent = NULL; virDomainObjUnlock(vm); qemuDriverUnlock(driver); + + qemuAgentClose(agent); }
ACK with the commit msg fixed. -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list