Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
Both qemu and guest hang when performing live snapshot transaction with data-plane.
It only occurs when use same one iothread object for multiple block.
If use separate iothreads for different block, the issue does not exist.
Version-Release number of selected component (if applicable):
qemu-kvm-rhev-2.10.0-9.el7.x86_64
kernel-3.10.0-800.el7.x86_64
How reproducible:
100%
Steps to Reproduce:
1. Launch guest with 3 block devices, all start with a same iothread "iothread1":
# /usr/libexec/qemu-kvm \
-name 'avocado-vt-vm1' \
-object iothread,id=iothread1 \
-drive id=drive_image1,if=none,snapshot=off,aio=native,cache=none,format=qcow2,file=/home/kvm_autotest_root/images/rhel74-64-virtio.qcow2 \
-device virtio-blk-pci,id=image1,drive=drive_image1,bootindex=0,iothread=iothread1,bus=pci.0,addr=0x3 \
-drive id=drive_sn1,if=none,snapshot=off,aio=native,cache=none,format=qcow2,file=/home/kvm_autotest_root/images/sn1.qcow2 \
-device virtio-blk-pci,id=sn1,drive=drive_sn1,bootindex=1,iothread=iothread1,bus=pci.0,addr=0x4 \
-drive id=drive_sn2,if=none,snapshot=off,aio=native,cache=none,format=qcow2,file=/home/kvm_autotest_root/images/sn2.qcow2 \
-device virtio-blk-pci,id=sn2,drive=drive_sn2,bootindex=2,iothread=iothread1,bus=pci.0,addr=0x5 \
-device virtio-net-pci,mac=9a:29:2a:2b:2c:2d,id=idoE4ENA,vectors=4,netdev=idgbsOIs,bus=pci.0,addr=0x6 \
-netdev tap,id=idgbsOIs \
-m 2048 \
-smp 4,maxcpus=4,cores=2,threads=1,sockets=2 \
-cpu 'SandyBridge',+kvm_pv_unhalt \
-vnc :0 \
-qmp stdio
2. Live snapshot three block devices together within a transaction command:
{'execute': 'transaction', 'arguments': {'actions': [{'data': {'device':'drive_image1', 'snapshot-file': '/home/kvm_autotest_root/images/image1-snap', 'mode': 'absolute-paths', 'format': 'qcow2'}, 'type': 'blockdev-snapshot-sync'}, {'data': {'device': 'drive_sn1', 'snapshot-file': '/home/kvm_autotest_root/images/sn1-snap', 'mode': 'absolute-paths', 'format': 'qcow2'}, 'type': 'blockdev-snapshot-sync'}, {'data': {'device': 'drive_sn2', 'snapshot-file': '/home/kvm_autotest_root/images/sn2-snap', 'mode': 'absolute-paths', 'format': 'qcow2'}, 'type': 'blockdev-snapshot-sync'}]}, 'id': 'bYyCHqv5'}
Actual results:
Both qemu and guest hang there, qmp only shows formating the first snapshot files, and then hang there without any other returns:
Formatting '/home/kvm_autotest_root/images/image1-snap', fmt=qcow2 size=21474836480 backing_file=/home/kvm_autotest_root/images/rhel74-64-virtio.qcow2 backing_fmt=qcow2 cluster_size=65536 lazy_refcounts=off refcount_bits=16
Expected results:
Formatting '/home/kvm_autotest_root/images/image1-snap', fmt=qcow2 size=21474836480 backing_file=/home/kvm_autotest_root/images/rhel74-64-virtio.qcow2 backing_fmt=qcow2 cluster_size=65536 lazy_refcounts=off refcount_bits=16
Formatting '/home/kvm_autotest_root/images/sn1-snap', fmt=qcow2 size=21474836480 backing_file=/home/kvm_autotest_root/images/sn1.qcow2 backing_fmt=qcow2 cluster_size=65536 lazy_refcounts=off refcount_bits=16
Formatting '/home/kvm_autotest_root/images/sn2-snap', fmt=qcow2 size=21474836480 backing_file=/home/kvm_autotest_root/images/sn2.qcow2 backing_fmt=qcow2 cluster_size=65536 lazy_refcounts=off refcount_bits=16
{"return": {}, "id": "bYyCHqv5"}
Additional info:
If use three different iothreads object for each block as below, both qemu and guest works well, and qmp returned information is same as above expected results.
/usr/libexec/qemu-kvm \
-name 'avocado-vt-vm1' \
-object iothread,id=iothread1 \
-object iothread,id=iothread2 \
-object iothread,id=iothread3 \
-drive id=drive_image1,if=none,snapshot=off,aio=native,cache=none,format=qcow2,file=/home/kvm_autotest_root/images/rhel74-64-virtio.qcow2 \
-device virtio-blk-pci,id=image1,drive=drive_image1,bootindex=0,iothread=iothread1,bus=pci.0,addr=0x3 \
-drive id=drive_sn1,if=none,snapshot=off,aio=native,cache=none,format=qcow2,file=/home/kvm_autotest_root/images/sn1.qcow2 \
-device virtio-blk-pci,id=sn1,drive=drive_sn1,bootindex=1,iothread=iothread2,bus=pci.0,addr=0x4 \
-drive id=drive_sn2,if=none,snapshot=off,aio=native,cache=none,format=qcow2,file=/home/kvm_autotest_root/images/sn2.qcow2 \
-device virtio-blk-pci,id=sn2,drive=drive_sn2,bootindex=2,iothread=iothread3,bus=pci.0,addr=0x5 \
-device virtio-net-pci,mac=9a:29:2a:2b:2c:2d,id=idoE4ENA,vectors=4,netdev=idgbsOIs,bus=pci.0,addr=0x6 \
-netdev tap,id=idgbsOIs \
-m 2048 \
-smp 4,maxcpus=4,cores=2,threads=1,sockets=2 \
-cpu 'SandyBridge',+kvm_pv_unhalt \
-vnc :0 \
-qmp stdio
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHSA-2018:1104
Description of problem: Both qemu and guest hang when performing live snapshot transaction with data-plane. It only occurs when use same one iothread object for multiple block. If use separate iothreads for different block, the issue does not exist. Version-Release number of selected component (if applicable): qemu-kvm-rhev-2.10.0-9.el7.x86_64 kernel-3.10.0-800.el7.x86_64 How reproducible: 100% Steps to Reproduce: 1. Launch guest with 3 block devices, all start with a same iothread "iothread1": # /usr/libexec/qemu-kvm \ -name 'avocado-vt-vm1' \ -object iothread,id=iothread1 \ -drive id=drive_image1,if=none,snapshot=off,aio=native,cache=none,format=qcow2,file=/home/kvm_autotest_root/images/rhel74-64-virtio.qcow2 \ -device virtio-blk-pci,id=image1,drive=drive_image1,bootindex=0,iothread=iothread1,bus=pci.0,addr=0x3 \ -drive id=drive_sn1,if=none,snapshot=off,aio=native,cache=none,format=qcow2,file=/home/kvm_autotest_root/images/sn1.qcow2 \ -device virtio-blk-pci,id=sn1,drive=drive_sn1,bootindex=1,iothread=iothread1,bus=pci.0,addr=0x4 \ -drive id=drive_sn2,if=none,snapshot=off,aio=native,cache=none,format=qcow2,file=/home/kvm_autotest_root/images/sn2.qcow2 \ -device virtio-blk-pci,id=sn2,drive=drive_sn2,bootindex=2,iothread=iothread1,bus=pci.0,addr=0x5 \ -device virtio-net-pci,mac=9a:29:2a:2b:2c:2d,id=idoE4ENA,vectors=4,netdev=idgbsOIs,bus=pci.0,addr=0x6 \ -netdev tap,id=idgbsOIs \ -m 2048 \ -smp 4,maxcpus=4,cores=2,threads=1,sockets=2 \ -cpu 'SandyBridge',+kvm_pv_unhalt \ -vnc :0 \ -qmp stdio 2. Live snapshot three block devices together within a transaction command: {'execute': 'transaction', 'arguments': {'actions': [{'data': {'device':'drive_image1', 'snapshot-file': '/home/kvm_autotest_root/images/image1-snap', 'mode': 'absolute-paths', 'format': 'qcow2'}, 'type': 'blockdev-snapshot-sync'}, {'data': {'device': 'drive_sn1', 'snapshot-file': '/home/kvm_autotest_root/images/sn1-snap', 'mode': 'absolute-paths', 'format': 'qcow2'}, 'type': 'blockdev-snapshot-sync'}, {'data': {'device': 'drive_sn2', 'snapshot-file': '/home/kvm_autotest_root/images/sn2-snap', 'mode': 'absolute-paths', 'format': 'qcow2'}, 'type': 'blockdev-snapshot-sync'}]}, 'id': 'bYyCHqv5'} Actual results: Both qemu and guest hang there, qmp only shows formating the first snapshot files, and then hang there without any other returns: Formatting '/home/kvm_autotest_root/images/image1-snap', fmt=qcow2 size=21474836480 backing_file=/home/kvm_autotest_root/images/rhel74-64-virtio.qcow2 backing_fmt=qcow2 cluster_size=65536 lazy_refcounts=off refcount_bits=16 Expected results: Formatting '/home/kvm_autotest_root/images/image1-snap', fmt=qcow2 size=21474836480 backing_file=/home/kvm_autotest_root/images/rhel74-64-virtio.qcow2 backing_fmt=qcow2 cluster_size=65536 lazy_refcounts=off refcount_bits=16 Formatting '/home/kvm_autotest_root/images/sn1-snap', fmt=qcow2 size=21474836480 backing_file=/home/kvm_autotest_root/images/sn1.qcow2 backing_fmt=qcow2 cluster_size=65536 lazy_refcounts=off refcount_bits=16 Formatting '/home/kvm_autotest_root/images/sn2-snap', fmt=qcow2 size=21474836480 backing_file=/home/kvm_autotest_root/images/sn2.qcow2 backing_fmt=qcow2 cluster_size=65536 lazy_refcounts=off refcount_bits=16 {"return": {}, "id": "bYyCHqv5"} Additional info: If use three different iothreads object for each block as below, both qemu and guest works well, and qmp returned information is same as above expected results. /usr/libexec/qemu-kvm \ -name 'avocado-vt-vm1' \ -object iothread,id=iothread1 \ -object iothread,id=iothread2 \ -object iothread,id=iothread3 \ -drive id=drive_image1,if=none,snapshot=off,aio=native,cache=none,format=qcow2,file=/home/kvm_autotest_root/images/rhel74-64-virtio.qcow2 \ -device virtio-blk-pci,id=image1,drive=drive_image1,bootindex=0,iothread=iothread1,bus=pci.0,addr=0x3 \ -drive id=drive_sn1,if=none,snapshot=off,aio=native,cache=none,format=qcow2,file=/home/kvm_autotest_root/images/sn1.qcow2 \ -device virtio-blk-pci,id=sn1,drive=drive_sn1,bootindex=1,iothread=iothread2,bus=pci.0,addr=0x4 \ -drive id=drive_sn2,if=none,snapshot=off,aio=native,cache=none,format=qcow2,file=/home/kvm_autotest_root/images/sn2.qcow2 \ -device virtio-blk-pci,id=sn2,drive=drive_sn2,bootindex=2,iothread=iothread3,bus=pci.0,addr=0x5 \ -device virtio-net-pci,mac=9a:29:2a:2b:2c:2d,id=idoE4ENA,vectors=4,netdev=idgbsOIs,bus=pci.0,addr=0x6 \ -netdev tap,id=idgbsOIs \ -m 2048 \ -smp 4,maxcpus=4,cores=2,threads=1,sockets=2 \ -cpu 'SandyBridge',+kvm_pv_unhalt \ -vnc :0 \ -qmp stdio