Bug 1976149
Summary: | Qemu hang when do stream with backing-file whose node behind the base node(iothread enable) | |||
---|---|---|---|---|
Product: | Red Hat Enterprise Linux 8 | Reporter: | aihua liang <aliang> | |
Component: | qemu-kvm | Assignee: | Sergio Lopez <slopezpa> | |
qemu-kvm sub component: | Block Jobs | QA Contact: | aihua liang <aliang> | |
Status: | CLOSED CURRENTRELEASE | Docs Contact: | ||
Severity: | high | |||
Priority: | high | CC: | coli, jferlan, jinzhao, juzhang, ngu, qzhang, virt-maint | |
Version: | 8.5 | Keywords: | Triaged | |
Target Milestone: | rc | |||
Target Release: | 8.6 | |||
Hardware: | Unspecified | |||
OS: | Unspecified | |||
Whiteboard: | ||||
Fixed In Version: | Doc Type: | If docs needed, set a value | ||
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 1977549 (view as bug list) | Environment: | ||
Last Closed: | 2021-09-18 10:43:22 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: | ||
Embargoed: | ||||
Bug Depends On: | 1997410 | |||
Bug Blocks: | 1977549 |
Description
aihua liang
2021-06-25 10:22:08 UTC
May be interesting to know if this same sequence occurs in the previous packages (e.g., qemu-kvm-6.0.0-20.module+el8.5.0+11499+199527ef) or earlier. There was a change in -21 for IOThreads. I'm going to set ITR=8.5.0 to plan to fix for the release. Keypoint to reproduce this bug is: NBD+iothread. Seems there's been a copy/paste issue in the reproducer: {'execute':'blockdev-create','arguments':{'options': {'driver':'file','filename':'/root/sn$i','size':21474836480},'job-id':'job1'}} {'execute':'blockdev-add','arguments':{'driver':'file','node-name':'drive_sn$i','filename':'/root/sn$i'}} {'execute':'blockdev-create','arguments':{'options': {'driver': 'qcow2','file':'drive_sn$i','size':21474836480},'job-id':'job2'}} {'execute':'blockdev-a{'execute':'blockdev-snapshot','arguments':{'node':'drive_image1','overlay':'sn1'}}dd','arguments':{'driver':'qcow2','node-name':'sn$i','file':'drive_sn$i'}} {'execute':'job-dismiss','arguments':{'id':'job1'}} {'execute':'job-dismiss','arguments':{'id':'job2'}} Note the broken 'blockdev-a' command in the fourth line. Could you please paste this section of the reproducer again? (In reply to Sergio Lopez from comment #3) > Seems there's been a copy/paste issue in the reproducer: > > {'execute':'blockdev-create','arguments':{'options': > {'driver':'file','filename':'/root/sn$i','size':21474836480},'job-id': > 'job1'}} > > {'execute':'blockdev-add','arguments':{'driver':'file','node-name': > 'drive_sn$i','filename':'/root/sn$i'}} > {'execute':'blockdev-create','arguments':{'options': {'driver': > 'qcow2','file':'drive_sn$i','size':21474836480},'job-id':'job2'}} > > {'execute':'blockdev-a{'execute':'blockdev-snapshot','arguments':{'node': > 'drive_image1','overlay':'sn1'}}dd','arguments':{'driver':'qcow2','node- > name':'sn$i','file':'drive_sn$i'}} > {'execute':'job-dismiss','arguments':{'id':'job1'}} > {'execute':'job-dismiss','arguments':{'id':'job2'}} correct cmd: {'execute':'blockdev-add','arguments':{'driver':'qcow2','node-name':'sn$i','file':'drive_sn$i'}} Sorry, I pasted the snapshot cmd by mistake and truncated the blockdev-add cmd. > > Note the broken 'blockdev-a' command in the fourth line. Could you please > paste this section of the reproducer again? 3. Create snapshot chain: base->sn1->sn2->sn3 #create snapshot nodes for i in range(1,4) {'execute':'blockdev-create','arguments':{'options': {'driver':'file','filename':'/root/sn$i','size':21474836480},'job-id':'job1'}} {'execute':'blockdev-add','arguments':{'driver':'file','node-name':'drive_sn$i','filename':'/root/sn$i'}} {'execute':'blockdev-create','arguments':{'options': {'driver': 'qcow2','file':'drive_sn$i','size':21474836480},'job-id':'job2'}} {'execute':'blockdev-add','arguments':{'driver':'qcow2','node-name':'sn$i','file':'drive_sn$i'}} {'execute':'job-dismiss','arguments':{'id':'job1'}} {'execute':'job-dismiss','arguments':{'id':'job2'}} #do snapshot {'execute':'blockdev-snapshot','arguments':{'node':'drive_image1','overlay':'sn1'}} {'execute':'blockdev-snapshot','arguments':{'node':'sn1','overlay':'sn2'}} {'execute':'blockdev-snapshot','arguments':{'node':'sn2','overlay':'sn3'}} Thanks, I was able to reproduce the problem with qemu-img-6.0.0-23.module+el8.5.0+11740+35571f13.x86_64. With current upstream, the issue is not reproducible. I've been tracing back to find when it was fixed, and found it to be part of this series: - https://patchew.org/QEMU/20210428151804.439460-1-vsementsov@virtuozzo.com/ As noted in comment 7, the issue is fixed by a specific upstream series that was determined to be too risky to backport into 8.5.0. Move this to 8.6.0 where qemu-6.1 is expected to be picked up as part of a planned rebase Bulk update: Move RHEL-AV bugs to RHEL8 with existing RHEL9 clone. Please provide the qa_ack+/ITM - this should be resolved by the qemu-6.1 rebase bug 1997410 Test on qemu-kvm-6.1.0-1.module+el8.6.0+12535+4e2af250, both virtio_blk+iothread+nbd and virtio_scsi+iothread+nbd don't hit this issue any more. Test Env: kernel version:4.18.0-340.el8.x86_64 qemu-kvm version:qemu-kvm-6.1.0-1.module+el8.6.0+12535+4e2af250 Test Steps: 1.Expose image via nbd #qemu-nbd -f qcow2 /home/kvm_autotest_root/images/rhel860-64-virtio-scsi.qcow2 -p 9000 -t 2.Start guest with this exposed image /usr/libexec/qemu-kvm \ -name 'avocado-vt-vm1' \ -sandbox on \ -machine q35,memory-backend=mem-machine_mem \ -device pcie-root-port,id=pcie-root-port-0,multifunction=on,bus=pcie.0,addr=0x1,chassis=1 \ -device pcie-pci-bridge,id=pcie-pci-bridge-0,addr=0x0,bus=pcie-root-port-0 \ -nodefaults \ -device VGA,bus=pcie.0,addr=0x2 \ -m 30720 \ -object memory-backend-ram,size=30720M,id=mem-machine_mem \ -smp 10,maxcpus=10,cores=5,threads=1,dies=1,sockets=2 \ -cpu 'Cascadelake-Server-noTSX',+kvm_pv_unhalt \ -chardev socket,id=qmp_id_qmpmonitor1,server=on,path=/tmp/monitor-qmpmonitor1-20210913-223137-drnRdJs8,wait=off \ -mon chardev=qmp_id_qmpmonitor1,mode=control \ -chardev socket,id=qmp_id_catch_monitor,server=on,path=/tmp/monitor-catch_monitor-20210913-223137-drnRdJs8,wait=off \ -mon chardev=qmp_id_catch_monitor,mode=control \ -device pvpanic,ioport=0x505,id=idM2Q7IB \ -chardev socket,id=chardev_serial0,server=on,path=/tmp/serial-serial0-20210913-223137-drnRdJs8,wait=off \ -device isa-serial,id=serial0,chardev=chardev_serial0 \ -chardev socket,id=seabioslog_id_20210913-223137-drnRdJs8,path=/tmp/seabios-20210913-223137-drnRdJs8,server=on,wait=off \ -device isa-debugcon,chardev=seabioslog_id_20210913-223137-drnRdJs8,iobase=0x402 \ -device pcie-root-port,id=pcie-root-port-1,port=0x1,addr=0x1.0x1,bus=pcie.0,chassis=2 \ -device qemu-xhci,id=usb1,bus=pcie-root-port-1,addr=0x0 \ -device usb-tablet,id=usb-tablet1,bus=usb1.0,port=1 \ -object iothread,id=iothread0 \ -device pcie-root-port,id=pcie-root-port-2,port=0x2,addr=0x1.0x2,bus=pcie.0,chassis=3 \ -blockdev node-name=file_image1,driver=nbd,auto-read-only=on,discard=unmap,server.host=10.73.114.14,server.port=9000,server.type=inet,cache.direct=on,cache.no-flush=off \ -blockdev node-name=drive_image1,driver=raw,read-only=off,cache.direct=on,cache.no-flush=off,file=file_image1 \ -device virtio-blk-pci,id=image1,drive=drive_image1,write-cache=on,bus=pcie-root-port-2,addr=0x0,iothread=iothread0 \ -device pcie-root-port,id=pcie-root-port-3,port=0x3,addr=0x1.0x3,bus=pcie.0,chassis=4 \ -device virtio-net-pci,mac=9a:fb:5a:e8:4b:7b,id=idVnkhgS,netdev=id9XmH0X,bus=pcie-root-port-3,addr=0x0 \ -netdev tap,id=id9XmH0X,vhost=on \ -vnc :0 \ -rtc base=utc,clock=host,driftfix=slew \ -boot menu=off,order=cdn,once=c,strict=off \ -enable-kvm \ -device pcie-root-port,id=pcie_extra_root_port_0,multifunction=on,bus=pcie.0,addr=0x3,chassis=5 \ -monitor stdio \ 3. Create snapshot chain:base->sn1->sn2->sn3 3.1 create snapshot targets for i in range(1,4) {'execute':'blockdev-create','arguments':{'options': {'driver':'file','filename':'/root/sn$i','size':21474836480},'job-id':'job1'}} {'execute':'blockdev-add','arguments':{'driver':'file','node-name':'drive_sn$i','filename':'/root/sn$i'}} {'execute':'blockdev-create','arguments':{'options': {'driver': 'qcow2','file':'drive_sn$i','size':21474836480},'job-id':'job2'}} {'execute':'blockdev-add','arguments':{'driver':'qcow2','node-name':'sn$i','file':'drive_sn$i'}} {'execute':'job-dismiss','arguments':{'id':'job1'}} {'execute':'job-dismiss','arguments':{'id':'job2'}} 3.2 do snapshot {'execute':'blockdev-snapshot','arguments':{'node':'drive_image1','overlay':'sn1'}} {'execute':'blockdev-snapshot','arguments':{'node':'sn1','overlay':'sn2'}} {'execute':'blockdev-snapshot','arguments':{'node':'sn2','overlay':'sn3'}} 4. Do stream with backing file, the file behind the base {"execute":"block-stream","arguments":{"device":"sn3","base-node":"sn2","job-id":"j1","backing-file":"/root/sn1"}} {"timestamp": {"seconds": 1631950557, "microseconds": 133915}, "event": "JOB_STATUS_CHANGE", "data": {"status": "created", "id": "j1"}} {"timestamp": {"seconds": 1631950557, "microseconds": 133968}, "event": "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "j1"}} {"return": {}} {"timestamp": {"seconds": 1631950557, "microseconds": 134022}, "event": "JOB_STATUS_CHANGE", "data": {"status": "waiting", "id": "j1"}} {"timestamp": {"seconds": 1631950557, "microseconds": 134047}, "event": "JOB_STATUS_CHANGE", "data": {"status": "pending", "id": "j1"}} {"timestamp": {"seconds": 1631950557, "microseconds": 134186}, "event": "BLOCK_JOB_COMPLETED", "data": {"device": "j1", "len": 0, "offset": 0, "speed": 0, "type": "stream"}} {"timestamp": {"seconds": 1631950557, "microseconds": 134224}, "event": "JOB_STATUS_CHANGE", "data": {"status": "concluded", "id": "j1"}} {"timestamp": {"seconds": 1631950557, "microseconds": 134247}, "event": "JOB_STATUS_CHANGE", "data": {"status": "null", "id": "j1"}} Test Result: In step4, stream can finished successfully. |