After adding some debugging messages to vm.py I can confirm the hang happens exactly when vm.undefine() is called at vm.py:445 [1]. But there's more: adding a debugging printout right before vm.undefine() prevents the hang from happening, confirming the idea you had since the beginning that the underlying problem is a race condition.
I am now trying to reproduce the issue without starting the VM with UTAH. Attached to this message is the XML file defining the typical VM which is running when libvirtd hangs. [1] https://bazaar.launchpad.net/~utah/utah/dev/view/head:/utah/provisioning/vm.py#L445 ** Attachment added: "utah-118-bionic-server-s390x.xml" https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1822096/+attachment/5250704/+files/utah-118-bionic-server-s390x.xml -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1822096 Title: libvirt hangs after utah workload is aborted To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1822096/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs