Bug 1657666 - while quit destination guest during migrating qemu-kvm coredump,[qemu-kvm: util/qemu-thread-posix.c:258: qemu_sem_timedwait: Assertion `sem->initialized' failed]
Summary: while quit destination guest during migrating qemu-kvm coredump,[qemu-kvm: ut...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux Advanced Virtualization
Classification: Red Hat
Component: qemu-kvm
Version: 8.0
Hardware: ppc64le
OS: Unspecified
medium
medium
Target Milestone: rc
: 8.0
Assignee: Laurent Vivier
QA Contact: Min Deng
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-12-10 09:05 UTC by Min Deng
Modified: 2019-02-22 22:11 UTC (History)
16 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-02-02 07:24:33 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
entire log (33.23 KB, text/plain)
2018-12-10 09:07 UTC, Min Deng
no flags Details

Description Min Deng 2018-12-10 09:05:06 UTC
Description of problem:
while quit destination guest during migrating qemu-kvm coredump

Version-Release number of selected component (if applicable):
Buildinformation
kernel-4.18.0-48.el8.ppc64le
qemu-kvm-3.1.0-0.module+el8+2266+616cf026.next.candidate.ppc64le

How reproducible:

Approximate 10%

Steps to Reproduce:
1.Source guest
    /usr/libexec/qemu-kvm \
    -name 'avocado-vt-vm1'  \
    -sandbox off  \
    -machine pseries  \
    -nodefaults \
    -device VGA,bus=pci.0,addr=0x2  \
    -chardev socket,id=serial_id_serial0,path=/tmp/111,server,nowait \
    -device spapr-vty,reg=0x30000000,chardev=serial_id_serial0 \
    -device nec-usb-xhci,id=usb1,bus=pci.0,addr=0x3 \
    -device virtio-scsi-pci,id=virtio_scsi_pci0,bus=pci.0,addr=0x4 \
    -drive id=drive_image1,if=none,snapshot=off,aio=threads,cache=none,format=qcow2,file=/home/kar/vt_test_images/rhel80-ppc64le-virtio-scsi.qcow2 \
    -device scsi-hd,id=image1,drive=drive_image1 \
    -device virtio-net-pci,mac=9a:31:32:33:34:35,id=idQh8pOj,vectors=4,bus=pci.0,addr=0x5  \
    -m 4096,slots=4,maxmem=32G \
    -object memory-backend-ram,size=1G,policy=default,id=mem-mem1 \
    -device pc-dimm,node=1,id=dimm-mem1,memdev=mem-mem1 \
    -object memory-backend-ram,size=1G,policy=default,id=mem-mem2 \
    -device pc-dimm,node=0,id=dimm-mem2,memdev=mem-mem2  \
    -smp 8,maxcpus=8,cores=4,threads=1,sockets=2  \
    -numa node,nodeid=0  \
    -numa node,nodeid=1 \
    -device usb-tablet,id=usb-tablet1,bus=usb1.0,port=1  \
    -vnc :3  \
    -rtc base=utc,clock=host  \
    -boot order=cdn,once=c,menu=off,strict=off \
    -enable-kvm \
    -monitor stdio

2.Add memory to source guest
(qemu) object_add memory-backend-ram,size=1G,policy=default,id=mem-plug1
(qemu) device_add pc-dimm,memdev=mem-plug1,node=0,id=dimm-plug1
(qemu) object_add memory-backend-ram,size=1G,policy=default,id=mem-plug2
(qemu) device_add pc-dimm,memdev=mem-plug2,node=1,id=dimm-plug2

3.boot up destination guest
   /usr/libexec/qemu-kvm \
    -name 'avocado-vt-vm1'  \
    -sandbox off  \
    -machine pseries  \
    -nodefaults \
    -device VGA,bus=pci.0,addr=0x2  \
    -chardev socket,id=serial_id_serial0,path=/tmp/222,server,nowait \
    -device spapr-vty,reg=0x30000000,chardev=serial_id_serial0 \
    -device nec-usb-xhci,id=usb1,bus=pci.0,addr=0x3 \
    -device virtio-scsi-pci,id=virtio_scsi_pci0,bus=pci.0,addr=0x4 \
    -drive id=drive_image1,if=none,snapshot=off,aio=threads,cache=none,format=qcow2,file=/home/kar/vt_test_images/rhel80-ppc64le-virtio-scsi.qcow2 \
    -device scsi-hd,id=image1,drive=drive_image1 \
    -device virtio-net-pci,mac=9a:31:32:33:34:35,id=idJ4yl44,vectors=4,bus=pci.0,addr=0x5  \
    -m 4096,slots=4,maxmem=32G \
    -object memory-backend-ram,size=1G,policy=default,id=mem-mem1 \
    -device pc-dimm,node=1,id=dimm-mem1,memdev=mem-mem1 \
    -object memory-backend-ram,size=1G,policy=default,id=mem-mem2 \
    -device pc-dimm,node=0,id=dimm-mem2,memdev=mem-mem2 \
    -object memory-backend-ram,size=1G,policy=default,id=mem-plug1 \
    -device pc-dimm,memdev=mem-plug1,node=0,id=dimm-plug1 \
    -object memory-backend-ram,size=1G,policy=default,id=mem-plug2 \
    -device pc-dimm,memdev=mem-plug2,node=1,id=dimm-plug2  \
    -smp 8,maxcpus=8,cores=4,threads=1,sockets=2  \
    -numa node,nodeid=0  \
    -numa node,nodeid=1 \
    -device usb-tablet,id=usb-tablet1,bus=usb1.0,port=1  \
    -vnc :4  \
    -rtc base=utc,clock=host  \
    -boot order=cdn,once=c,menu=off,strict=off \
    -enable-kvm \
    -incoming tcp:0:5200 \
    -monitor stdio

4.
(qemu) q
qemu-kvm: util/qemu-thread-posix.c:258: qemu_sem_timedwait: Assertion `sem->initialized' failed.
g1.sh: line 27: 77581 Aborted                 (core dumped) /usr/libexec/qemu-kvm -name 'avocado-vt-vm1' -sandbox off -machine pseries -nodefaults -device VGA,bus=pci.0,addr=0x2 -chardev socket,id=serial_id_serial0,path=/tmp/111,server,nowait -device spapr-vty,reg=0x30000000,chardev=serial_id_serial0 -device nec-usb-xhci,id=usb1,bus=pci.0,addr=0x3 -device virtio-scsi-pci,id=virtio_scsi_pci0,bus=pci.0,addr=0x4 -drive id=drive_image1,if=none,snapshot=off,aio=threads,cache=none,format=qcow2,file=/home/kar/vt_test_images/rhel80-ppc64le-virtio-scsi.qcow2 -device scsi-hd,id=image1,drive=drive_image1 -device virtio-net-pci,mac=9a:31:32:33:34:35,id=idQh8pOj,vectors=4,bus=pci.0,addr=0x5 -m 4096,slots=4,maxmem=32G -object memory-backend-ram,size=1G,policy=default,id=mem-mem1 -device pc-dimm,node=1,id=dimm-mem1,memdev=mem-mem1 -object memory-backend-ram,size=1G,policy=default,id=mem-mem2 -device pc-dimm,node=0,id=dimm-mem2,memdev=mem-mem2 -smp 8,maxcpus=8,cores=4,threads=1,sockets=2 -numa node,nodeid=0 -numa node,nodeid=1 -device usb-tablet,id=usb-tablet1,bus=usb1.0,port=1 -vnc :3 -rtc base=utc,clock=host -boot order=cdn,once=c,menu=off,strict=off -enable-kvm -monitor stdio


Actual results:
Quit destination guest directly and please check the attachment log.

Expected results:
No core dump.

Additional info:
QE tried this bug about 10 times bug only reproduce it once.

Comment 1 Min Deng 2018-12-10 09:07:24 UTC
Created attachment 1512966 [details]
entire log

Comment 2 Min Deng 2018-12-10 09:09:53 UTC
Update steps,after step 3 
migrate -d tcp:0:5200 from source guest
info migrate 
...

Comment 3 Gu Nini 2018-12-10 09:46:05 UTC
Min, seems you have lost the migration step between step3 and step4.

Comment 4 Min Deng 2018-12-10 09:52:09 UTC
(In reply to Gu Nini from comment #3)
> Min, seems you have lost the migration step between step3 and step4.

  Thanks,Nini,
  I'm aware of it after reporting it and already updated it to comment2,thanks for reminder.

Comment 12 Min Deng 2019-01-07 09:07:55 UTC
Sorry for delay.
Tried the bug on x86 platform and I didn't reproduce it (about 10 times),Thanks
kernel-4.18.0-50.el8.x86_64
qemu-kvm-3.1.0-2.module+el8+2606+2c716ad7.x86_64

Comment 13 Laurent Vivier 2019-01-07 17:27:56 UTC
Tried 20 times on ppc64le with 

host kernel-4.18.0-57.el8.ppc64le
qemu-kvm-3.1.0-3.module+el8+2614+d714d2bb.ppc64le

-> not reproduced

Could you reproduce it and provide the core or at least the backtrace?

Comment 14 Min Deng 2019-01-10 05:42:27 UTC
I'm trying to reproduce the problem again,there's something need to be emphasized here.Setting THP as always is necessary for reproducing,Thanks.

Comment 15 Laurent Vivier 2019-01-30 14:44:24 UTC
(In reply to Min Deng from comment #14)
> I'm trying to reproduce the problem again,there's something need to be
> emphasized here.Setting THP as always is necessary for reproducing,Thanks.

Min, do you reproduce the problem?

Comment 16 Min Deng 2019-02-01 02:27:20 UTC
Laurent,
  Still trying for it and will give your reply as soon as possible.Thanks
Min

Comment 17 Min Deng 2019-02-02 07:24:33 UTC
  After trying it in these days and ,it's hard for QE to reproduce it again.The reproducible ratio was quite lower than the reported initially.
  I'm going to close it temporarily since it wasn't reproduced on the latest build as well.[qemu-kvm-core-3.1.0-11.module+el8+2747+40c9b77e].
  Feel free to re-open it if you need.Thanks.


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