Bug 1024943

Summary: libvirt crashes when create a vm which was destroyed by xl command
Product: [Community] Virtualization Tools Reporter: Ji-hoon Kim <relip>
Component: libvirtAssignee: Libvirt Maintainers <libvirt-maint>
Status: CLOSED DEFERRED QA Contact:
Severity: high Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: crobinso, rbalakri
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-04-10 15:10:19 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
libvirtd crashes on startup none

Description Ji-hoon Kim 2013-10-30 15:41:38 UTC
Created attachment 817491 [details]
libvirtd crashes on startup

Description of problem: libvirt fails to create a vm which was destroyed by xl command.

Version-Release number of selected component (if applicable): 1.1.2


How reproducible:
Create a vm using libvirt (python), destroy it using xl and create it using libvirt again. It will shows you an error that saying domain is already running. Cannot be destroyed either, restarting libvirtd or redefining a vm with a XML file that has same vm name are the only way to recreate it normally.

Steps to Reproduce:
1. Create a vm using libvirt
2. Destroy a vm using xl 
3. Create a vm using libvirt again 

Actual results:
Fails to create a vm.

Expected results:
Creates a vm normally.

Additional info:

I'm not sure this is relevant, libvirtd crashes with attached log when restarting it after fails to create a vm. 

libxl/domain.log (when destroying):
libxl: debug: libxl_event.c:503:watchfd_callback: watch w=0x7fc154000f50 wpath=@releaseDomain token=3/25: event epath=@releaseDomain
libxl: debug: libxl.c:999:domain_death_xswatch_callback: [evg=0x7fc15c000920:21] from domid=21 nentries=1 rc=1
libxl: debug: libxl.c:1010:domain_death_xswatch_callback: [evg=0x7fc15c000920:21]   got=domaininfos[0] got->domain=21
libxl: debug: libxl.c:1037:domain_death_xswatch_callback:  exists shutdown_reported=0 dominf.flags=ffff0009
libxl: debug: libxl.c:955:domain_death_occurred: dying
libxl: debug: libxl.c:1003:domain_death_xswatch_callback: [evg=0] all reported
libxl: debug: libxl.c:1067:domain_death_xswatch_callback: domain death search done
libxl: debug: libxl_event.c:1153:egc_run_callbacks: event 0x7fc1818618a0 callback type=domain_death

It seems libvirt caught destroy event handler(?) but it failed to cleanup things? 

No error message on libxl.log and libvirt.log.

Comment 1 Cole Robinson 2016-04-10 15:10:19 UTC
Sorry this never received a response. The libxl driver has been under heavy development since this was filed, so I suspect this is fixed. If anyone is still hitting this issue with recent libvirt + xen, please reopen with a recent backtrace