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

[s390x][RHEL9.7.0][virtio_block] there would be memory leak with virtio_blk disks

Linking RHIVOS CVEs to...Migration: Automation ...SWIFT: POC ConversionSync from "Extern...XMLWordPrintable

    • qemu-kvm-9.1.0-25.el9
    • No
    • Low
    • 1
    • rhel-virt-hwe-s390x
    • ssg_virtualization
    • 17
    • 22
    • 100
    • False
    • False
    • Hide

      None

      Show
      None
    • None
    • zKVM CY25 sprint 3
    • Unspecified
    • Unspecified
    • Unspecified
    • s390x
    • None

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

      I was read/write virtio-blk devices on s390x with the system disk, two attditional scsi-hd disk and two addtional virtio-blk disk as storage disk

      What is the impact of this issue to you?

      valgrind shows some error with memory leak

      Please provide the package NVR for which the bug is seen:

      compose id: RHEL-9.7.0-20250521.6

      host kernel version: kernel-5.14.0-585.el9.s390x

      guest kernel version: kernel-5.14.0-590.el9.s390x

      qemu version: qemu-kvm-9.1.0-21.el9.s390x

      libvirt version: libvirt-10.10.0-10.el9.s390x

      How reproducible is this bug?:

      100%

      Steps to reproduce

      1. boot guest wih valgrind and define two scsi-hd and two virtio-blk for storage disk and one virtio-blk disk for the system
        1. valgrind \ [stdlog] --trace-children=yes \ [stdlog] --track-origins=yes \ [stdlog] --leak-check=full \ [stdlog] --show-leak-kinds=definite \ [stdlog] --log-file=/tmp/valgrind.log /usr/libexec/qemu-kvm \
        2. -device '{"id": "virtio_scsi_ccw0", "driver": "virtio-scsi-ccw"}' \ [stdlog] -blockdev '{"node-name": "drive_stg1", "driver": "file", "read-only": false, "discard": "unmap", "aio": "threads", "filename": "/home/kar/vt_test_images/stg1.raw", "cache": {"direct": true, "no-flush": false}}' \ [stdlog] -device '{"driver": "scsi-hd", "id": "stg1", "drive": "drive_stg1", "bootindex": 1, "write-cache": "on", "rerror": "stop", "werror": "stop", "serial": "stg1"}' \ [stdlog] -blockdev '{"node-name": "file_stg2", "driver": "file", "auto-read-only": true, "discard": "unmap", "aio": "threads", "filename": "/home/kar/vt_test_images/stg2.qcow2", "cache": {"direct": true, "no-flush": false}}' \ [stdlog] -blockdev '{"node-name": "drive_stg2", "driver": "qcow2", "read-only": false, "cache": {"direct": true, "no-flush": false}

          , "file": "file_stg2"}' \ [stdlog] -device '{"driver": "scsi-hd", "id": "stg2", "drive": "drive_stg2", "bootindex": 2, "write-cache": "on", "rerror": "stop", "werror": "stop", "serial": "stg2"}' \ [stdlog] -blockdev '{"node-name": "drive_stg3", "driver": "file", "read-only": false, "discard": "unmap", "aio": "threads", "filename": "/home/kar/vt_test_images/stg3.raw", "cache": {"direct": true, "no-flush": false}}' \ [stdlog] -device '{"driver": "virtio-blk-ccw", "id": "stg3", "drive": "drive_stg3", "bootindex": 3, "write-cache": "on", "rerror": "stop", "werror": "stop", "serial": "stg3"}' \ [stdlog] -blockdev '{"node-name": "file_stg4", "driver": "file", "auto-read-only": true, "discard": "unmap", "aio": "threads", "filename": "/home/kar/vt_test_images/stg4.qcow2", "cache": {"direct": true, "no-flush": false}}' \ [stdlog] -blockdev '

          Unknown macro: {"node-name"}

          ' \ [stdlog] -device '{"driver": "virtio-blk-ccw", "id": "stg4", "drive": "drive_stg4", "bootindex": 4, "write-cache": "on", "rerror": "stop", "werror": "stop", "serial": "stg4"}' \

      1. run io test for multi-disk
        1. # /home/guest_fio_on_disks.sh -n 10 -s 10g -d 'sdb sdc vdb vda '
      2. stop IO by destroying the VM
        1. # cat /tmp/mpid|xargs kill -SIGINT;pgrep fio|xargs kill -9;sleep 2
      3.  check if there's error reported by valgrind

      Expected results

      no error report by valgrind
       

      Actual results

      errors in valgrind.log [1]

      ==226648== HEAP SUMMARY: ==226648== in use at exit: 4,918,154 bytes in 14,062 blocks ==226648== total heap usage: 2,017,095 allocs, 2,003,033 frees, 522,289,231 bytes allocated ==226648== ==226648== 9 bytes in 1 blocks are definitely lost in loss record 351 of 2,578 ==226648== at 0x513D528: malloc (vg_replace_malloc.c:446) ==226648== by 0x5D9944B: g_malloc (in /usr/lib64/libglib-2.0.so.0.6800.4) ==226648== by 0x5DB1ADD: g_strdup (in /usr/lib64/libglib-2.0.so.0.6800.4) ==226648== by 0x45F77B1: ??? (in /usr/libexec/qemu-kvm) ==226648== by 0x45F6E6B: visit_type_str (in /usr/libexec/qemu-kvm) ==226648== by 0x432D5DB: ??? (in /usr/libexec/qemu-kvm) ==226648== by 0x445828B: object_property_set (in /usr/libexec/qemu-kvm) ==226648== by 0x445CD09: object_property_set_qobject (in /usr/libexec/qemu-kvm) ==226648== by 0x44583A9: object_property_set_str (in /usr/libexec/qemu-kvm) ==226648== by 0x431E637: s390_ipl_prepare_cpu (in /usr/libexec/qemu-kvm) ==226648== by 0x432D7EF: ??? (in /usr/libexec/qemu-kvm) ==226648== by 0x42102D3: process_queued_cpu_work (in /usr/libexec/qemu-kvm) ==226648== ==226648== 9 bytes in 1 blocks are definitely lost in loss record 352 of 2,578 ==226648== at 0x513D528: malloc (vg_replace_malloc.c:446) ==226648== by 0x5D9944B: g_malloc (in /usr/lib64/libglib-2.0.so.0.6800.4) ==226648== by 0x5DB1ADD: g_strdup (in /usr/lib64/libglib-2.0.so.0.6800.4) ==226648== by 0x45F77B1: ??? (in /usr/libexec/qemu-kvm) ==226648== by 0x45F6E6B: visit_type_str (in /usr/libexec/qemu-kvm) ==226648== by 0x432D5DB: ??? (in /usr/libexec/qemu-kvm) ==226648== by 0x445828B: object_property_set (in /usr/libexec/qemu-kvm) ==226648== by 0x445CD09: object_property_set_qobject (in /usr/libexec/qemu-kvm) ==226648== by 0x44583A9: object_property_set_str (in /usr/libexec/qemu-kvm) ==226648== by 0x431E10F: s390_ipl_update_diag308 (in /usr/libexec/qemu-kvm) ==226648== by 0x4312A91: handle_diag_308 (in /usr/libexec/qemu-kvm) ==226648== by 0x4383BFF: kvm_arch_handle_exit (in /usr/libexec/qemu-kvm) ==226648== ==226648== LEAK SUMMARY: ==226648== definitely lost: 18 bytes in 2 blocks ==226648== indirectly lost: 0 bytes in 0 blocks ==226648== possibly lost: 28,800 bytes in 72 blocks ==226648== still reachable: 4,887,320 bytes in 13,967 blocks ==226648== suppressed: 0 bytes in 0 blocks ==226648== Reachable blocks (those to which a pointer was found) are not shown. ==226648== To see them, rerun with: --leak-check=full --show-leak-kinds=all ==226648== ==226648== For lists of detected and suppressed errors, rerun with: -s ==226648== ERROR SUMMARY: 7 errors from 7 contexts (suppressed: 0 from 0)

       

       

       

              rhn-support-xuma Xujun Ma
              bfu@redhat.com Leo Fu
              Thomas Huth Thomas Huth
              Leo Fu Leo Fu
              Votes:
              0 Vote for this issue
              Watchers:
              11 Start watching this issue

                Created:
                Updated: