Bug 1117181 - Guest will crash when do detach-disk on an transient guest
Summary: Guest will crash when do detach-disk on an transient guest
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: qemu
Version: rawhide
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
Assignee: Fedora Virtualization Maintainers
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-07-08 08:25 UTC by Shanzhi Yu
Modified: 2016-05-16 04:21 UTC (History)
19 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2014-07-09 19:34:50 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Shanzhi Yu 2014-07-08 08:25:47 UTC
Description of problem:

Guest will crash when do detach-disk on an transient guest

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

qemu-kvm-2.1.0-0.1.rc0.fc20.x86_64

with libvirt build from libvirt.git

# cd libvirt && git describe 
v1.2.6-58-g46a811d

How reproducible:

100%

Steps to Reproduce:

1.create an transient guest
# virsh list --transient 
 Id    Name                           State
----------------------------------------------------
 3     rhel6.5                        running

# virsh domblklist rhel6.5 
Target     Source
------------------------------------------------
vda        /var/lib/libvirt/images/kvm-rhel6.5-x86_64-qcow2.img


2.do detach-disk operations

#virsh detach-disk rhel6.5 vda 
Disk detached successfully

3.check guest

# virsh list --all
 Id    Name                           State
----------------------------------------------------


Actual results:

transient guest will crash after detach-disk operations

Expected results:



Additional info:

Comment 1 Peter Krempa 2014-07-08 08:49:56 UTC
Please attach the machine log file /var/log/libvirt/qemu/rhel6.5.log

Comment 2 Shanzhi Yu 2014-07-08 09:03:36 UTC
(In reply to Peter Krempa from comment #1)
> Please attach the machine log file /var/log/libvirt/qemu/rhel6.5.log

Can't attach attachment to bugzilla for now, so put log as below:


2014-07-08 08:52:43.175+0000: starting up
LC_ALL=C PATH=/usr/lib64/qt-3.3/bin:/usr/lib64/ccache:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/home/shyu/.local/bin:/home/shyu/bin HOME=/root USER=shyu LOGNAME=shyu QEMU_AUDIO_DRV=spice /usr/bin/qemu-kvm -name rhel6.5 -S -machine pc-i440fx-1.6,accel=kvm,usb=off -m 1024 -realtime mlock=off -smp 2,maxcpus=4,sockets=4,cores=1,threads=1 -uuid f482f635-e281-426a-ab68-1c974b59fc83 -no-user-config -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/rhel6.5.monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-shutdown -global PIIX4_PM.disable_s3=0 -global PIIX4_PM.disable_s4=0 -boot order=c,strict=on -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x5 -drive file=/var/lib/libvirt/images/kvm-rhel6.5-x86_64-qcow2.img,if=none,id=drive-virtio-disk0,format=qcow2,cache=none -device virtio-blk-pci,bus=pci.0,addr=0x6,drive=drive-virtio-disk0,id=virtio-disk0 -netdev tap,fd=25,id=hostnet0,vhost=on,vhostfd=26 -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:e9:4b:7a,bus=pci.0,addr=0x3 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -chardev socket,id=charchannel0,path=/var/lib/libvirt/qemu/guest.agent,server,nowait -device virtserialport,bus=virtio-serial0.0,nr=2,chardev=charchannel0,id=channel0,name=org.qemu.guest_agent.0 -chardev spicevmc,id=charchannel1,name=vdagent -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel1,id=channel1,name=com.redhat.spice.0 -device usb-tablet,id=input0 -spice port=5900,addr=127.0.0.1,disable-ticketing,seamless-migration=on -device qxl-vga,id=video0,ram_size=67108864,vram_size=67108864,bus=pci.0,addr=0x2 -device intel-hda,id=sound0,bus=pci.0,addr=0x4 -device hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x7 -msg timestamp=on
Domain id=2 is tainted: high-privileges
2014-07-08 08:52:43.177+0000: 6302: debug : virFileClose:99 : Closed fd 24
2014-07-08 08:52:43.177+0000: 6302: debug : virFileClose:99 : Closed fd 31
2014-07-08 08:52:43.178+0000: 6303: debug : virExec:616 : Run hook 0x7f9a994c3530 0x7f9aa4e47140
2014-07-08 08:52:43.178+0000: 6302: debug : virFileClose:99 : Closed fd 3
2014-07-08 08:52:43.178+0000: 6303: debug : qemuProcessHook:2719 : Obtaining domain lock
2014-07-08 08:52:43.178+0000: 6303: debug : virSecuritySELinuxSetSecuritySocketLabel:2123 : Setting VM rhel6.5 socket context unconfined_u:system_r:svirt_t:s0:c358,c662
2014-07-08 08:52:43.178+0000: 6303: debug : virDomainLockProcessStart:175 : plugin=0x7f9a90165520 dom=0x7f9a78003290 paused=1 fd=0x7f9aa4e46cb4
2014-07-08 08:52:43.178+0000: 6303: debug : virDomainLockManagerNew:133 : plugin=0x7f9a90165520 dom=0x7f9a78003290 withResources=1
2014-07-08 08:52:43.178+0000: 6303: debug : virLockManagerPluginGetDriver:281 : plugin=0x7f9a90165520
2014-07-08 08:52:43.178+0000: 6303: debug : virLockManagerNew:305 : driver=0x7f9ab4ef7460 type=0 nparams=5 params=0x7f9aa4e46b60 flags=0
2014-07-08 08:52:43.178+0000: 6303: debug : virLockManagerLogParams:98 :   key=uuid type=uuid value=f482f635-e281-426a-ab68-1c974b59fc83
2014-07-08 08:52:43.178+0000: 6303: debug : virLockManagerLogParams:91 :   key=name type=string value=rhel6.5
2014-07-08 08:52:43.178+0000: 6303: debug : virLockManagerLogParams:79 :   key=id type=uint value=2
2014-07-08 08:52:43.178+0000: 6303: debug : virLockManagerLogParams:79 :   key=pid type=uint value=6303
2014-07-08 08:52:43.178+0000: 6303: debug : virLockManagerLogParams:94 :   key=uri type=cstring value=qemu:///system
2014-07-08 08:52:43.178+0000: 6303: debug : virDomainLockManagerNew:145 : Adding leases
2014-07-08 08:52:43.178+0000: 6303: debug : virDomainLockManagerNew:150 : Adding disks
2014-07-08 08:52:43.178+0000: 6303: debug : virDomainLockManagerAddDisk:91 : Add disk /var/lib/libvirt/images/kvm-rhel6.5-x86_64-qcow2.img
2014-07-08 08:52:43.178+0000: 6303: debug : virLockManagerAddResource:332 : lock=0x7f9a7800b8a0 type=0 name=/var/lib/libvirt/images/kvm-rhel6.5-x86_64-qcow2.img nparams=0 params=(nil) flags=0
2014-07-08 08:52:43.178+0000: 6303: debug : virLockManagerAcquire:350 : lock=0x7f9a7800b8a0 state='<null>' flags=3 action=0 fd=0x7f9aa4e46cb4
2014-07-08 08:52:43.178+0000: 6303: debug : virLockManagerFree:387 : lock=0x7f9a7800b8a0
2014-07-08 08:52:43.178+0000: 6303: debug : virObjectUnref:259 : OBJECT_UNREF: obj=0x7f9a90153690
2014-07-08 08:52:43.178+0000: 6303: debug : qemuProcessHook:2746 : Hook complete ret=0
2014-07-08 08:52:43.178+0000: 6303: debug : virExec:618 : Done hook 0
2014-07-08 08:52:43.178+0000: 6303: debug : virExec:625 : Setting child security label to unconfined_u:system_r:svirt_t:s0:c358,c662
2014-07-08 08:52:43.178+0000: 6303: debug : virExec:655 : Setting child uid:gid to 0:0 with caps 0
2014-07-08 08:52:43.179+0000: 6303: debug : virCommandHandshakeChild:358 : Notifying parent for handshake start on 28
2014-07-08 08:52:43.179+0000: 6303: debug : virCommandHandshakeChild:366 : Waiting on parent for handshake complete on 29
2014-07-08 08:52:43.193+0000: 6303: debug : virFileClose:99 : Closed fd 28
2014-07-08 08:52:43.193+0000: 6303: debug : virFileClose:99 : Closed fd 29
2014-07-08 08:52:43.193+0000: 6303: debug : virCommandHandshakeChild:386 : Handshake with parent is done
char device redirected to /dev/pts/5 (label charserial0)
**
ERROR:qom/object.c:725:object_unref: assertion failed: (obj->ref > 0)
2014-07-08 08:53:10.032+0000: shutting down

Comment 3 Peter Krempa 2014-07-08 09:14:44 UTC
Looks like a qemu crash:
ERROR:qom/object.c:725:object_unref: assertion failed: (obj->ref > 0)

Comment 4 Cole Robinson 2014-07-08 17:50:17 UTC
Confirmed with qemu rc0, but fixed in qemu.git and the rc1 tag

Comment 5 Shanzhi Yu 2014-07-09 05:02:10 UTC
Test with v2.1.0-rc1 show it work well.

# git describe 
v2.1.0-rc1

# .configure && make && make install

1. create transient guest
# virsh list --transient
 Id    Name                           State
----------------------------------------------------
 18    rhel6.5                        running
# virsh dumpxml rhel6.5 |grep qemu-system
    <emulator>/usr/local/bin/qemu-system-x86_64</emulator>

# /usr/local/bin/qemu-system-x86_64 --version
QEMU emulator version 2.0.91, Copyright (c) 2003-2008 Fabrice Bellard

2. do detach-disk operations

# virsh domblklist rhel6.5 
Target     Source
------------------------------------------------
vda        /var/lib/libvirt/images/kvm-rhel6.5-x86_64-qcow2.img

# virsh detach-disk rhel6.5 vda 
Disk detached successfully


# virsh list --transient
 Id    Name                           State
----------------------------------------------------
 18    rhel6.5                        running

# virsh domblklist rhel6.5 
Target     Source
------------------------------------------------

Comment 6 Cole Robinson 2014-07-09 19:34:50 UTC
qemu 2.1.0-rc1 is built for rawhide now


Note You need to log in before you can comment on or make changes to this bug.