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

qemu-kvm crashes after kill virtproxyd on destination host during migration

    • Yes
    • None
    • Regression
    • rhel-sst-virtualization
    • ssg_virtualization
    • 5
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • Automated
    • aarch64
    • None

      What were you trying to do that didn't work?

      qemu-kvm crashes ater kill virtproxyd on destination during zerocopy migration.

      Please provide the package NVR for which bug is seen:

      libvirt-10.4.0-1.el9.aarch64
      qemu-kvm-9.0.0-5.el9.aarch64
      kernel-5.14.0-469.el9.aarch64
      edk2-aarch64-20240524-1.el9.noarch

      Hardware info on source and destination: Ampere(R) Altra(R) Max

      How reproducible:

      30%

      Steps to reproduce

      1. Setup nfs server on src and mount both on source and destination host
      2. Set auth_tcp="none" in virtproxyd.conf on destination and restart the service
        # cat virtproxyd.conf
        auth_tcp="none"
        # systemctl restart virtproxyd-tcp.socket
        # firewall-cmd --add-port=16509/tcp
        
      1. virsh start avocado-vt-vm1
      2. virsh migrate-setspeed avocado-vt-vm1 10
      3. virsh migrate --live --verbose --domain avocado-vt-vm1 --desturi qemu+tcp:// {dest_ip}

        /system --parallel --zerocopy

      4. kill -9 `pidof virtproxyd` on destination

      Expected results

      vm should be running on souce machine and no qemu-kvm crash.

      Actual results

      qemu-kvm crashes after killing virtproxyd on destination.

      # virsh migrate --live --verbose --domain avocado-vt-vm1 --desturi qemu+tcp://10.6.8.34/system --parallel --zerocopy
      Migration: [ 5.35 %]error: operation failed: job 'migration out' failed: Channel error: Input/output error
      # virsh list 
       Id   Name   State
      --------------------
      
      [root@ampere-mtsnow-altramax-12 migrate]# coredumpctl list
      TIME                           PID UID GID SIG     COREFILE EXE       >
      Sun 2024-06-30 12:57:19 EDT 123062 107 107 SIGABRT present  /usr/libex>
      Mon 2024-07-01 02:49:42 EDT 231973 107 107 SIGABRT present  /usr/libex>
      Mon 2024-07-01 03:11:21 EDT 246698 107 107 SIGABRT present  /usr/libex>
      Mon 2024-07-01 03:26:37 EDT 250753 107 107 SIGABRT present  /usr/libex>
      Mon 2024-07-01 05:07:29 EDT 269522 107 107 SIGABRT present  /usr/libex>
      Mon 2024-07-01 06:02:46 EDT 272215 107 107 SIGABRT present  /usr/libex>
      
      # coredumpctl dump 272215
                 PID: 272215 (qemu-kvm)
                 UID: 107 (qemu)
                 GID: 107 (qemu)
              Signal: 6 (ABRT)
           Timestamp: Mon 2024-07-01 06:02:46 EDT (43min ago)
        Command Line: /usr/libexec/qemu-kvm -name guest=avocado-vt-vm1,debug-threads=on -S -object $'{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/var/lib/libvirt/qemu/domain-1-avocado-vt-vm1/master-key.aes"}' -blockdev $'{"driver":"file","filename":"/usr/share/edk2/aarch64/QEMU_EFI-silent-pflash.qcow2","node-name":"libvirt-pflash0-storage","auto-read-only":true,"discard":"unmap"}' -blockdev $'{"node-name":"libvirt-pflash0-format","read-only":true,"driver":"qcow2","file":"libvirt-pflash0-storage"}' -blockdev $'{"driver":"file","filename":"/var/lib/libvirt/qemu/nvram/avocado-vt-vm1_VARS.qcow2","node-name":"libvirt-pflash1-storage","auto-read-only":true,"discard":"unmap"}' -blockdev $'{"node-name":"libvirt-pflash1-format","read-only":false,"driver":"qcow2","file":"libvirt-pflash1-storage"}' -machine virt-rhel9.4.0,usb=off,gic-version=3,dump-guest-core=off,memory-backend=mach-virt.ram,pflash0=libvirt-pflash0-format,pflash1=libvirt-pflash1-format,acpi=on -accel kvm -cpu host -m size=2097152k -object $'{"qom-type":"memory-backend-ram","id":"mach-virt.ram","size":2147483648}' -overcommit mem-lock=off -smp 2,sockets=2,cores=1,threads=1 -uuid 6b0429ae-5b71-491b-91d0-454c9e19c53d -no-user-config -nodefaults -chardev socket,id=charmonitor,fd=23,server=on,wait=off -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-shutdown -boot strict=on -device $'{"driver":"pcie-root-port","port":8,"chassis":1,"id":"pci.1","bus":"pcie.0","multifunction":true,"addr":"0x1"}' -device $'{"driver":"pcie-root-port","port":9,"chassis":2,"id":"pci.2","bus":"pcie.0","addr":"0x1.0x1"}' -device $'{"driver":"pcie-root-port","port":10,"chassis":3,"id":"pci.3","bus":"pcie.0","addr":"0x1.0x2"}' -device $'{"driver":"pcie-root-port","port":11,"chassis":4,"id":"pci.4","bus":"pcie.0","addr":"0x1.0x3"}' -device $'{"driver":"pcie-root-port","port":12,"chassis":5,"id":"pci.5","bus":"pcie.0","addr":"0x1.0x4"}' -device $'{"driver":"pcie-root-port","port":13,"chassis":6,"id":"pci.6","bus":"pcie.0","addr":"0x1.0x5"}' -device $'{"driver":"pcie-root-port","port":14,"chassis":7,"id":"pci.7","bus":"pcie.0","addr":"0x1.0x6"}' -device $'{"driver":"pcie-root-port","port":15,"chassis":8,"id":"pci.8","bus":"pcie.0","addr":"0x1.0x7"}' -device $'{"driver":"pcie-root-port","port":16,"chassis":9,"id":"pci.9","bus":"pcie.0","multifunction":true,"addr":"0x2"}' -device $'{"driver":"pcie-root-port","port":17,"chassis":10,"id":"pci.10","bus":"pcie.0","addr":"0x2.0x1"}' -device $'{"driver":"pcie-root-port","port":18,"chassis":11,"id":"pci.11","bus":"pcie.0","addr":"0x2.0x2"}' -device $'{"driver":"pcie-root-port","port":19,"chassis":12,"id":"pci.12","bus":"pcie.0","addr":"0x2.0x3"}' -device $'{"driver":"pcie-root-port","port":20,"chassis":13,"id":"pci.13","bus":"pcie.0","addr":"0x2.0x4"}' -device $'{"driver":"pcie-root-port","port":21,"chassis":14,"id":"pci.14","bus":"pcie.0","addr":"0x2.0x5"}' -device $'{"driver":"qemu-xhci","p2":15,"p3":15,"id":"usb","bus":"pci.2","addr":"0x0"}' -device $'{"driver":"virtio-serial-pci","id":"virtio-serial0","bus":"pci.3","addr":"0x0"}' -blockdev $'{"driver":"file","filename":"/var/lib/libvirt/migrate/jeos-27-aarch64.qcow2","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' -blockdev $'{"node-name":"libvirt-1-format","read-only":false,"driver":"qcow2","file":"libvirt-1-storage","backing":null}' -device $'{"driver":"virtio-blk-pci","bus":"pci.4","addr":"0x0","drive":"libvirt-1-format","id":"virtio-disk0","bootindex":1}' -netdev $'{"type":"tap","fd":"24","vhost":true,"vhostfd":"26","id":"hostnet0"}' -device $'{"driver":"virtio-net-pci","netdev":"hostnet0","id":"net0","mac":"52:54:00:ea:27:c3","bus":"pci.1","addr":"0x0"}' -chardev pty,id=charserial0 -serial chardev:charserial0 -chardev socket,id=charchannel0,fd=22,server=on,wait=off -device $'{"driver":"virtserialport","bus":"virtio-serial0.0","nr":1,"chardev":"charchannel0","id":"channel0","name":"org.qemu.guest_agent.0"}' -chardev socket,id=chrtpm,path=/run/libvirt/qemu/swtpm/1-avocado-vt-vm1-swtpm.sock -tpmdev emulator,id=tpm-tpm0,chardev=chrtpm -device $'{"driver":"tpm-tis-device","tpmdev":"tpm-tpm0","id":"tpm0"}' -device $'{"driver":"usb-tablet","id":"input0","bus":"usb.0","port":"1"}' -device $'{"driver":"usb-kbd","id":"input1","bus":"usb.0","port":"2"}' -audiodev $'{"id":"audio1","driver":"none"}' -vnc 127.0.0.1:0,audiodev=audio1 -device $'{"driver":"virtio-gpu-pci","id":"video0","max_outputs":1,"bus":"pci.7","addr":"0x0"}' -device $'{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.5","addr":"0x0"}' -object $'{"qom-type":"rng-random","id":"objrng0","filename":"/dev/urandom"}' -device $'{"driver":"virtio-rng-pci","rng":"objrng0","id":"rng0","bus":"pci.6","addr":"0x0"}' -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny -msg timestamp=on
          Executable: /usr/libexec/qemu-kvm
       Control Group: /machine.slice/machine-qemu\x2d1\x2davocado\x2dvt\x2dvm1.scope/libvirt/emulator
                Unit: machine-qemu\x2d1\x2davocado\x2dvt\x2dvm1.scope
               Slice: machine.slice
             Boot ID: 2dc7d4bbb8434858b9288ff1e2a1b2f5
          Machine ID: 7a998271f3ab413d8efdd3901fdf75c6
            Hostname: ampere-mtsnow-altramax-12.khw.eng.rdu2.dc.redhat.com
             Storage: /var/lib/systemd/coredump/core.qemu-kvm.107.2dc7d4bbb8434858b9288ff1e2a1b2f5.272215.1719828166000000.zst (present)
        Size on Disk: 1.7M
             Message: Process 272215 (qemu-kvm) of user 107 dumped core.
                      
                      Stack trace of thread 272215:
                      #0  0x0000ffff902182e8 __pthread_kill_implementation (libc.so.6 + 0x822e8)
                      #1  0x0000ffff901d073c raise (libc.so.6 + 0x3a73c)
                      #2  0x0000ffff901bd034 abort (libc.so.6 + 0x27034)
                      #3  0x0000ffff901ca090 __assert_fail_base (libc.so.6 + 0x34090)
                      #4  0x0000ffff901ca100 __assert_fail (libc.so.6 + 0x34100)
                      #5  0x0000aaaaac1fc160 yank_unregister_instance (qemu-kvm + 0x8bc160)
                      #6  0x0000aaaaabd05b4c migrate_fd_cleanup (qemu-kvm + 0x3c5b4c)
                      #7  0x0000aaaaabd019ac migration_bh_dispatch_bh (qemu-kvm + 0x3c19ac)
                      #8  0x0000aaaaac1fe294 aio_bh_poll (qemu-kvm + 0x8be294)
                      #9  0x0000aaaaac1e4450 aio_dispatch (qemu-kvm + 0x8a4450)
                      #10 0x0000aaaaac1ff0c8 aio_ctx_dispatch (qemu-kvm + 0x8bf0c8)
                      #11 0x0000ffff905100c0 g_main_context_dispatch (libglib-2.0.so.0 + 0x550c0)
                      #12 0x0000aaaaac1ff8dc main_loop_wait (qemu-kvm + 0x8bf8dc)
                      #13 0x0000aaaaabce5c44 qemu_main_loop (qemu-kvm + 0x3a5c44)
                      #14 0x0000aaaaabbf35e4 qemu_default_main (qemu-kvm + 0x2b35e4)
                      #15 0x0000ffff901bd300 __libc_start_call_main (libc.so.6 + 0x27300)
                      #16 0x0000ffff901bd3d8 __libc_start_main@@GLIBC_2.34 (libc.so.6 + 0x273d8)
                      #17 0x0000aaaaabbf34f0 _start (qemu-kvm + 0x2b34f0)
                      
                      Stack trace of thread 272236:
                      #0  0x0000ffff9024b514 clock_nanosleep@@GLIBC_2.17 (libc.so.6 + 0xb5514)
                      #1  0x0000ffff9025064c __nanosleep (libc.so.6 + 0xba64c)
                      #2  0x0000ffff9053a140 g_usleep (libglib-2.0.so.0 + 0x7f140)
                      #3  0x0000aaaaac1f56e8 call_rcu_thread (qemu-kvm + 0x8b56e8)
                      #4  0x0000aaaaac1e89c0 qemu_thread_start (qemu-kvm + 0x8a89c0)
                      #5  0x0000ffff90216698 start_thread (libc.so.6 + 0x80698)
                      #6  0x0000ffff90280bdc thread_start (libc.so.6 + 0xeabdc)
                      
                      Stack trace of thread 272239:
                      #0  0x0000ffff90276960 __poll (libc.so.6 + 0xe0960)
                      #1  0x0000ffff90565f20 g_main_context_iterate.constprop.0 (libglib-2.0.so.0 + 0xaaf20)
                      #2  0x0000ffff9050f71c g_main_loop_run (libglib-2.0.so.0 + 0x5471c)
                      #3  0x0000aaaaac0afac4 iothread_run (qemu-kvm + 0x76fac4)
                      #4  0x0000aaaaac1e89c0 qemu_thread_start (qemu-kvm + 0x8a89c0)
                      #5  0x0000ffff90216698 start_thread (libc.so.6 + 0x80698)
                      #6  0x0000ffff90280bdc thread_start (libc.so.6 + 0xeabdc)
                      
                      Stack trace of thread 272561:
                      #0  0x0000ffff90212dd8 __GI___futex_abstimed_wait_cancelable64 (libc.so.6 + 0x7cdd8)
                      #1  0x0000ffff902159d0 pthread_cond_wait@@GLIBC_2.17 (libc.so.6 + 0x7f9d0)
                      #2  0x0000aaaaac1e7dd4 qemu_cond_wait_impl (qemu-kvm + 0x8a7dd4)
                      #3  0x0000aaaaac1e8548 qemu_sem_wait (qemu-kvm + 0x8a8548)
                      #4  0x0000aaaaabd091a0 multifd_send_thread (qemu-kvm + 0x3c91a0)
                      #5  0x0000aaaaac1e89c0 qemu_thread_start (qemu-kvm + 0x8a89c0)
                      #6  0x0000ffff90216698 start_thread (libc.so.6 + 0x80698)
                      #7  0x0000ffff90280bdc thread_start (libc.so.6 + 0xeabdc)
                      
                      Stack trace of thread 272242:
                      #0  0x0000ffff90212dd8 __GI___futex_abstimed_wait_cancelable64 (libc.so.6 + 0x7cdd8)
                      #1  0x0000ffff902159d0 pthread_cond_wait@@GLIBC_2.17 (libc.so.6 + 0x7f9d0)
                      #2  0x0000aaaaac1e7dd4 qemu_cond_wait_impl (qemu-kvm + 0x8a7dd4)
                      #3  0x0000aaaaabc200f0 vnc_worker_thread (qemu-kvm + 0x2e00f0)
                      #4  0x0000aaaaac1e89c0 qemu_thread_start (qemu-kvm + 0x8a89c0)
                      #5  0x0000ffff90216698 start_thread (libc.so.6 + 0x80698)
                      #6  0x0000ffff90280bdc thread_start (libc.so.6 + 0xeabdc)
                      
                      Stack trace of thread 272241:
                      #0  0x0000ffff90278850 ioctl (libc.so.6 + 0xe2850)
                      #1  0x0000aaaaac065d6c kvm_vcpu_ioctl (qemu-kvm + 0x725d6c)
                      #2  0x0000aaaaac068628 kvm_cpu_exec (qemu-kvm + 0x728628)
                      #3  0x0000aaaaac06db10 kvm_vcpu_thread_fn (qemu-kvm + 0x72db10)
                      #4  0x0000aaaaac1e89c0 qemu_thread_start (qemu-kvm + 0x8a89c0)
                      #5  0x0000ffff90216698 start_thread (libc.so.6 + 0x80698)
                      #6  0x0000ffff90280bdc thread_start (libc.so.6 + 0xeabdc)
                      
                      Stack trace of thread 272240:
                      #0  0x0000ffff90278850 ioctl (libc.so.6 + 0xe2850)
                      #1  0x0000aaaaac065d6c kvm_vcpu_ioctl (qemu-kvm + 0x725d6c)
                      #2  0x0000aaaaac068628 kvm_cpu_exec (qemu-kvm + 0x728628)
                      #3  0x0000aaaaac06db10 kvm_vcpu_thread_fn (qemu-kvm + 0x72db10)
                      #4  0x0000aaaaac1e89c0 qemu_thread_start (qemu-kvm + 0x8a89c0)
                      #5  0x0000ffff90216698 start_thread (libc.so.6 + 0x80698)
                      #6  0x0000ffff90280bdc thread_start (libc.so.6 + 0xeabdc)
                      ELF object binary architecture: AARCH64
      
      

      Additional info:

      I can't reproduce this problem on rhel9.4 aarch64 and rhel9.5 x86_64:
      ===============
      rhel9.4 aarch64:
      libvirt-10.0.0-6.4.el9_4.aarch64
      qemu-kvm-8.2.0-11.el9_4.3.aarch64
      kernel-5.14.0-427.22.1.el9_4.aarch64
      edk2-aarch64-20231122-6.el9_4.2.noarch
      HW: ampere-mtsnow-altramax

      rhel9.5 x86_64:
      libvirt-10.4.0-1.el9.x86_64
      qemu-kvm-9.0.0-5.el9.x86_64

              bdas@redhat.com Bandan Das
              yicui1 Yingshun Cui
              virt-maint virt-maint
              Yingshun Cui Yingshun Cui
              Votes:
              0 Vote for this issue
              Watchers:
              18 Start watching this issue

                Created:
                Updated: