[PATCH 1/3] DO NOT APPLY: Simple reproducer for virDomainObjListRemove

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This bug demonstrates itself for other objects too, but let's
show it for domains. Assume that dummy.xml contains a valid
domain definition. Then

  1) virsh create dummy.xml && sleep 1
  2) virsh destroy dummy &
  3) virsh create ../dummy.xml

Observe error:
  error: Failed to create domain from dummy.xml
  error: internal error: Duplicate key

Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
---
 src/conf/virdomainobjlist.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/conf/virdomainobjlist.c b/src/conf/virdomainobjlist.c
index a814fc10a3..3631cf16d0 100644
--- a/src/conf/virdomainobjlist.c
+++ b/src/conf/virdomainobjlist.c
@@ -396,6 +396,7 @@ virDomainObjListRemove(virDomainObjListPtr doms,
     dom->removing = true;
     virObjectRef(dom);
     virObjectUnlock(dom);
+    sleep(60);
     virObjectRWLockWrite(doms);
     virObjectLock(dom);
     virDomainObjListRemoveLocked(doms, dom);
-- 
2.19.2

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux