Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-43409

aio=io_uring: Assertion failure `luringcb->co->ctx == s->aio_context' with block_resize

    • qemu-kvm-9.0.0-3.el10
    • Yes
    • Important
    • Regression
    • rhel-sst-virtualization-storage
    • ssg_virtualization
    • 1
    • QE ack
    • False
    • Hide

      None

      Show
      None
    • None
    • Red Hat Enterprise Linux
    • None
    • x86_64
    • Linux
    • None

      (clone from https://issues.redhat.com/browse/RHEL-34618 ,same issue exist on rhel10-beta)
      
      What were you trying to do that didn't work?
      Hotplug virtio disk with aio=io_uring, then execute block_resize on the disk.
      
      qemu crash on  qemu-kvm: ../block/io_uring.c:218: void luring_process_completions(LuringState *): Assertion `luringcb->co->ctx == s->aio_context' failed
      
                     Stack trace of thread 508356:
                      #0  0x00007f75b3e8b94c __pthread_kill_implementation (libc.so.6>
                      #1  0x00007f75b3e3e646 raise (libc.so.6 + 0x3e646)
                      #2  0x00007f75b3e287f3 abort (libc.so.6 + 0x287f3)
                      #3  0x00007f75b3e2871b __assert_fail_base.cold (libc.so.6 + 0x2>
                      #4  0x00007f75b3e37386 __assert_fail (libc.so.6 + 0x37386)
                      #5  0x0000557b29db61bc luring_process_completions (qemu-kvm + 0>
                      #6  0x0000557b29db599d qemu_luring_completion_cb.llvm.551030252>
                      #7  0x0000557b29f196c1 aio_dispatch_handler.llvm.10985774631750>
                      #8  0x0000557b29f1836c aio_dispatch (qemu-kvm + 0xa5436c)
                      #9  0x0000557b29f382bf aio_ctx_dispatch (qemu-kvm + 0xa742bf)
                      #10 0x00007f75b4719f4f g_main_context_dispatch (libglib-2.0.so.>
                      #11 0x0000557b29f392de main_loop_wait (qemu-kvm + 0xa752de)
                      #12 0x0000557b29a31f14 qemu_main_loop (qemu-kvm + 0x56df14)
                      #13 0x0000557b29862e1a qemu_default_main (qemu-kvm + 0x39ee1a)
                      #14 0x00007f75b3e29590 __libc_start_call_main (libc.so.6 + 0x29>
                      #15 0x00007f75b3e29640 __libc_start_main@@GLIBC_2.34 (libc.so.6>
                      #16 0x0000557b29862535 _start (qemu-kvm + 0x39e535)
      
       Please provide the package NVR for which bug is seen:
      Red Hat Enterprise Linux release 10.0 Beta (Plow)
      6.9.0-0.rc2.1.el10.x86_64
      qemu-kvm-9.0.0-2.el10.x86_64
      seabios-bin-1.16.3-3.el10.noarch
      edk2-ovmf-20240214-1.el10.noarch
      libvirt-10.0.0-3.el10.x86_64
       
      
      How reproducible:
      100%
      
      Steps to reproduce
      1. Create data file 
      qemu-img create -f qcow2 /home/kvm_autotest_root/images/storage0.qcow2 10G
      
      2.Boot VM
      /usr/libexec/qemu-kvm \
           -name 'avocado-vt-vm1'  \
           -machine q35,memory-backend=mem-machine_mem \
           -device '{"id": "pcie-root-port-0", "driver": "pcie-root-port", "multifunction": true, "bus": "pcie.0", "addr": "0x1", "chassis": 1}' \
           -device '{"id": "pcie-pci-bridge-0", "driver": "pcie-pci-bridge", "addr": "0x0", "bus": "pcie-root-port-0"}'  \
           -nodefaults \
           -device '{"driver": "VGA", "bus": "pcie.0", "addr": "0x2"}' \
           -m 12288 \
           -object '{"size": 12884901888, "id": "mem-machine_mem", "qom-type": "memory-backend-ram"}'  \
           -smp 8,maxcpus=8,cores=4,threads=1,dies=1,sockets=2  \
           -cpu 'Skylake-Server',+kvm_pv_unhalt \
           -device '{"id": "pcie-root-port-1", "port": 1, "driver": "pcie-root-port", "addr": "0x1.0x1", "bus": "pcie.0", "chassis": 2}' \
           -device '{"driver": "qemu-xhci", "id": "usb1", "bus": "pcie-root-port-1", "addr": "0x0"}' \
           -device '{"driver": "usb-tablet", "id": "usb-tablet1", "bus": "usb1.0", "port": "1"}' \
           -blockdev '{"node-name": "file_image1", "driver": "file", "auto-read-only": true, "discard": "unmap", "aio": "io_uring", "filename": "/home/kvm_autotest_root/images/rhel950-64-virtio.qcow2", "cache": {"direct": true, "no-flush": false}}' \
           -blockdev '{"node-name": "drive_image1", "driver": "qcow2", "read-only": false, "cache": {"direct": true, "no-flush": false}, "file": "file_image1"}' \
           -device '{"id": "pcie-root-port-2", "port": 2, "driver": "pcie-root-port", "addr": "0x1.0x2", "bus": "pcie.0", "chassis": 3}' \
           -device '{"driver": "virtio-blk-pci", "id": "image1", "drive": "drive_image1", "bootindex": 0, "write-cache": "on", "bus": "pcie-root-port-2", "addr": "0x0"}' \
           -device '{"id": "pcie-root-port-3", "port": 3, "driver": "pcie-root-port", "addr": "0x1.0x3", "bus": "pcie.0", "chassis": 4}' \
           -device '{"driver": "virtio-net-pci", "mac": "9a:b3:ea:71:62:fb", "id": "idPTdSDf", "netdev": "idy1GpeM", "bus": "pcie-root-port-3", "addr": "0x0"}' \
           -netdev  '{"id": "idy1GpeM", "type": "tap", "vhost": true}'  \
           -enable-kvm \
           -device '{"id": "pcie_extra_root_port_0", "driver": "pcie-root-port", "multifunction": true, "bus": "pcie.0", "addr": "0x3", "chassis": 5}' \
           -vnc :5 \
           -monitor stdio \
           -qmp tcp:0:5955,server=on,wait=off \
           -rtc base=utc,clock=host,driftfix=slew  \
           -boot menu=off,order=cdn,once=c,strict=off \
           -enable-kvm \
      
      3. hotplug disk with aio=io_uring
      
      {"execute": "blockdev-add", "arguments": {"node-name": "file_stg0", "driver": "file", "auto-read-only": true, "discard": "unmap", "aio": "io_uring", "filename": "/home/kvm_autotest_root/images/storage0.qcow2", "cache": {"direct": true, "no-flush": false}}, "id": "hul0bYT2"}
      {"execute": "blockdev-add", "arguments": {"node-name": "drive_stg0", "driver": "qcow2", "read-only": false, "cache": {"direct": true, "no-flush": false}, "file": "file_stg0"}, "id": "De38S5OW"}
      {"execute": "device_add", "arguments": {"driver": "virtio-blk-pci", "id": "stg0", "drive": "drive_stg0", "write-cache": "on", "serial": "TARGET_DISK0", "bus": "pcie_extra_root_port_0", "addr": "0x0"}, "id": "niQrUGeT"}  Expected results
      
      4. execute block_resize on disk
      {"execute": "block_resize", "arguments": {"node-name": "drive_stg0", "size": 16106127360}, "id": "BskGR36w"}
      
      Actual results
      qemu crash  
      
      PS: 
      not hit the issue on
      qemu-kvm-8.2.0-11.el9_4.x86_64
      
      not hit issue when hotplug disk with aio=threads
      
      

              kwolf@redhat.com Kevin Wolf
              qingwangrh qing wang
              virt-maint virt-maint
              qing wang qing wang
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

                Created:
                Updated: