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

[cs9, tcg] qemu-kvm crashes in memory_region_get_iommu

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Undefined Undefined
    • None
    • CentOS Stream 9
    • qemu-kvm
    • None
    • No
    • None
    • rhel-sst-virtualization
    • ssg_virtualization
    • None
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • x86_64
    • None

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

      In centos-ci (aws, xen virtualization, TCG),  sometimes (maybe once in 20 retries) we see the following crash when executing qemu-kvm VM:

      # coredumpctl dump 
                 PID: 69976 (qemu-kvm)
                 UID: 0 (root)
                 GID: 0 (root)
              Signal: 11 (SEGV)
           Timestamp: Thu 2024-09-05 10:41:33 UTC (1h 14min ago)
        Command Line: /usr/libexec/qemu-kvm -cpu max -machine q35 -smp 6 -m 1200 -nodefaults -vga none -display none -no-reboot -device virtio-rng -rtc base=localtime -pidfile /var/dracut_test/qemu.pid -drive format=raw,index=0,media=disk,file=/var/dracut_test/client_log.img -drive format=raw,index=1,media=disk,file=/var/dracut_test/client_check.img -drive format=raw,index=2,media=disk,file=/var/dracut_test/client_dumps.img -device virtio-net,netdev=nfs,mac=52:54:00:12:34:00 -netdev tap,id=nfs,script=/root/NetworkManager-ci/contrib/dracut/qemu-ifup/nfs -append $'panic=1 systemd.crash_reboot rd.shell=0 biosdevname=0 net.ifnames=0 noapic loglevel=7 enforcing=0 console=ttyS0,115200n81, intel_iommu=on root=dhcp ro nm.debug' -initrd /var/dracut_test/initramfs.client.NM -serial stdio -kernel /lib/modules/5.14.0-503.el9.x86_64/vmlinuz
          Executable: /usr/libexec/qemu-kvm
       Control Group: /user.slice/user-0.slice/session-3.scope
                Unit: session-3.scope
               Slice: user-0.slice
             Session: 3
           Owner UID: 0 (root)
             Boot ID: 36431b96c20c43c2a12509ddafa5d687
          Machine ID: c13ef1c4f89d456ba87137edc1b0ed80
            Hostname: n27-17-146.pool.ci.centos.org
             Storage: /var/lib/systemd/coredump/core.qemu-kvm.0.36431b96c20c43c2a12509ddafa5d687.69976.1725532893000000.zst (truncated)
        Size on Disk: 59.4M
             Message: Process 69976 (qemu-kvm) of user 0 dumped core.
                      
                      Stack trace of thread 69986:
                      #0  0x000056464af352b3 address_space_translate_for_iotlb (/usr/libexec/qemu-kvm + 0x7712b3)
                      #1  0x000056464af834cc tlb_set_page_full (/usr/libexec/qemu-kvm + 0x7bf4cc)
                      #2  0x000056464ade5059 x86_cpu_tlb_fill (/usr/libexec/qemu-kvm + 0x621059)
                      #3  0x000056464ade6111 mmu_translate (/usr/libexec/qemu-kvm + 0x622111)
                      #4  0x000056464ade4f86 x86_cpu_tlb_fill (/usr/libexec/qemu-kvm + 0x620f86)
                      #5  0x000056464af8e470 mmu_lookup1 (/usr/libexec/qemu-kvm + 0x7ca470)
                      #6  0x000056464af8e1e0 mmu_lookup.llvm.10739711994244380661 (/usr/libexec/qemu-kvm + 0x7ca1e0)
                      #7  0x000056464af852f7 do_ld4_mmu.llvm.10739711994244380661 (/usr/libexec/qemu-kvm + 0x7c12f7)
                      #8  0x000056464ae792c2 do_interrupt_all (/usr/libexec/qemu-kvm + 0x6b52c2)
                      #9  0x000056464adebf61 x86_cpu_exec_interrupt (/usr/libexec/qemu-kvm + 0x627f61)
                      #10 0x000056464af6f189 cpu_exec_loop (/usr/libexec/qemu-kvm + 0x7ab189)
                      #11 0x000056464af6e451 cpu_exec_setjmp (/usr/libexec/qemu-kvm + 0x7aa451)
                      #12 0x000056464af6e27e cpu_exec (/usr/libexec/qemu-kvm + 0x7aa27e)
                      #13 0x00007efe98d7019c n/a (n/a + 0x0)
                      ELF object binary architecture: AMD x86-64 

      The corefile is saved here:
      http://tools.lab.eng.brq2.redhat.com/~fpokryvk/reports/qemu-kvm.core

      Seems very similar to upstream issue:
      https://gitlab.com/qemu-project/qemu/-/issues/2220

       

      Please provide the package NVR for which bug is seen:

      qemu-kvm-9.0.0-9.el9.x86_64

      How reproducible:

      sometimes (maybe 1:20)

      Steps to reproduce

      1. run the following test from NetworkManager-ci in the loop:
      2. ./test_run.sh dracut_NM_NFS_root_dhcp_nm_debug

      Expected results

      the test should pass reliably

      Actual results

      test sometimes fails due to qemu-kvm crash

              virt-maint virt-maint
              fpokryvk@redhat.com Filip Pokryvka
              virt-maint virt-maint
              Chao Yang Chao Yang
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: