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

QEMU gets SIGABRT when '-loadvm SNAP' is combined with '-incoming defer'

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor Minor
    • rhel-9.5
    • rhel-9.3.0, rhel-9.4
    • qemu-kvm
    • None
    • Moderate
    • TestOnly
    • rhel-sst-virtualization-storage
    • ssg_virtualization
    • 3
    • QE ack
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • x86_64
    • None

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

      As subject

      Please provide the package NVR for which bug is seen:

      libvirt v9.9.0-60-g3ad5817053

      qemu-kvm-8.0.0-16.el9_3.1.x86_64

      How reproducible:

      100%

      Steps to reproduce

      1.  Prepare a running domain. Create an internal snapshot for it
        1. ➜  ~ virsh snapshot-create-as rhel-9.2 a                                 
          Domain snapshot a created
      2. Revert to the snapshot:
        1. ➜  ~ virsh snapshot-revert rhel-9.2 a   
          error: Failed to revert snapshot a
          error: internal error: QEMU unexpectedly closed the monitor (vm='rhel-9.2'): qemu-kvm: ../block/io.c:1955: int bdrv_co_write_req_prepare(BdrvChild *, int64_t, int64_t, BdrvTrackedRequest *, int): Assertion `!(bs->open_flags & BDRV_O_INACTIVE)' failed.
      3. Check the coredump:
        1. ➜  ~ coredumpctl -1
          TIME                           PID UID GID SIG     COREFILE EXE                   SIZE
          Fri 2023-11-17 03:24:57 EST 740268 107 107 SIGABRT present  /usr/libexec/qemu-kvm 1.2M
           

      QMP logs:

      Step1:

       67.217 > 0x7f8a9003f010 {"execute":"human-monitor-command","arguments":{"command-line":"savevm \"a\""},"id":"libvirt-435"}
       67.219 ! 0x7f8a9003f010 {"timestamp": {"seconds": 1700209672, "microseconds": 204096}, "event": "MIGRATION", "data": {"status": "setup"}}
       67.220 ! 0x7f8a9003f010 {"timestamp": {"seconds": 1700209672, "microseconds": 205635}, "event": "MIGRATION_PASS", "data": {"pass": 1}}
       67.538 ! 0x7f8a9003f010 {"timestamp": {"seconds": 1700209672, "microseconds": 523001}, "event": "MIGRATION_PASS", "data": {"pass": 2}}
       67.541 ! 0x7f8a9003f010 {"timestamp": {"seconds": 1700209672, "microseconds": 526664}, "event": "MIGRATION", "data": {"status": "completed"}}
       67.936 < 0x7f8a9003f010 {"return": "", "id": "libvirt-435"}
       67.936 > 0x7f8a9003f010 {"execute":"cont","id":"libvirt-436"}
       67.936 ! 0x7f8a9003f010 {"timestamp": {"seconds": 1700209672, "microseconds": 921787}, "event": "RESUME"}
       67.939 < 0x7f8a9003f010 {"return": {}, "id": "libvirt-436"}
      

      Step2:

       86.428 > 0x7f8a9003f010 {"execute":"qmp_capabilities","id":"libvirt-1"}
      

      Backtrace:

      (gdb) bt
      #0  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
      #1  0x00007fd6136a36c3 in __pthread_kill_internal (signo=6, threadid=<optimized out>) at pthread_kill.c:78
      #2  0x00007fd613654d06 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
      #3  0x00007fd6136287f3 in __GI_abort () at abort.c:79
      #4  0x00007fd61362871b in __assert_fail_base
          (fmt=<optimized out>, assertion=<optimized out>, file=<optimized out>, line=<optimized out>, function=<optimized out>) at assert.c:92
      #5  0x00007fd61364dca6 in __assert_fail
          (assertion=0x55bf9fba0671 "!(bs->open_flags & BDRV_O_INACTIVE)", file=0x55bf9fbadb30 <str.1.llvm> "../block/io.c", line=1955, function=0x55bf9fbaed46 "int bdrv_co_write_req_prepare(BdrvChild *, int64_t, int64_t, BdrvTrackedRequest *, int)") at assert.c:101
      #6  0x000055bf9f8b728f in bdrv_co_write_req_prepare (child=0x55bfa0f759a0, offset=131072, bytes=65536, req=0x7fd579ddde38, flags=0)
          at ../block/io.c:1955
      #7  0x000055bf9f8b4ead in bdrv_aligned_pwritev
          (child=0x55bfa0f759a0, req=0x7fd579ddde38, offset=131072, bytes=65536, align=1, qiov=0x7fd579dddf50, qiov_offset=0, flags=0)
          at ../block/io.c:2070
      #8  0x000055bf9f8b46a3 in bdrv_co_pwritev_part
          (child=<optimized out>, offset=131072, bytes=<optimized out>, qiov=0xa2e64656c6961, qiov_offset=<optimized out>, flags=0) at ../block/io.c:2287
      #9  0x000055bf9f8685e9 in bdrv_co_pwritev (child=0x55bfa0f759a0, offset=131072, bytes=65536, flags=0, qiov=<optimized out>) at ../block/io.c:2204
      #10 bdrv_co_pwrite (child=0x55bfa0f759a0, offset=131072, bytes=65536, buf=0x7fd610016000, flags=0)
          at /usr/src/debug/qemu-kvm-8.0.0-16.el9_3.1.x86_64/include/block/block_int-io.h:77
      #11 bdrv_pwrite (child=0x55bfa0f759a0, offset=131072, bytes=65536, buf=0x7fd610016000, flags=0) at block/block-gen.c:158
      #12 0x000055bf9f8d1621 in qcow2_cache_entry_flush (bs=<optimized out>, c=0x55bfa0f75e70, i=<optimized out>) at ../block/qcow2-cache.c:227
      #13 0x000055bf9f8d112e in qcow2_cache_write (bs=0x55bfa0f6d950, c=0x55bfa0f75e70) at ../block/qcow2-cache.c:248
      #14 0x000055bf9f8e9c69 in qcow2_write_caches (bs=0x55bfa0f6d950) at ../block/qcow2-refcount.c:1221
      #15 qcow2_co_flush_to_os (bs=0x55bfa0f6d950) at ../block/qcow2.c:4991
      #16 0x000055bf9f8b2d8a in bdrv_co_flush (bs=0x55bfa0f6d950) at ../block/io.c:3018
      #17 0x000055bf9f8695a1 in bdrv_co_flush_entry (opaque=0x7fd61265fd70) at block/block-gen.c:646
      #18 0x000055bf9fa8bc86 in coroutine_trampoline (i0=<optimized out>, i1=<optimized out>) at ../util/coroutine-ucontext.c:177
      #19 0x00007fd61362a360 in __start_context () at ../sysdeps/unix/sysv/linux/x86_64/__start_context.S:91
      #20 0x00007fd61265f930 in  ()
      #21 0x0000000000000000 in  ()
      

       

      See the domain XML and full backtrace in the attachment internal-snapshot-sigabrt.tar.gz

      Expected results

      No SIGABRT

      Actual results

      As above

              kwolf@redhat.com Kevin Wolf
              hanhansolo Han Han
              virt-maint virt-maint
              Tingting Mao Tingting Mao
              Votes:
              0 Vote for this issue
              Watchers:
              11 Start watching this issue

                Created:
                Updated:
                Resolved: