Description: Libvirt crashed when do blkiotune to running vm with cgroup2 manually mounted How reproducible: 100% Versions: kernel-4.18.0-107.el8.x86_64 libvirt-5.6.0-1.module+el8.1.0+3890+4d3d259c.x86_64 qemu-kvm-4.0.0-6.module+el8.1.0+3736+a2aefea3.x86_64 Steps: 1. adding "cgroup_no_v1=all" in kernel cmd line, and reboot host $ grub2-editenv - list | grep kernelopts kernelopts=root=/dev/mapper/rhel-root ro crashkernel=auto resume=/dev/mapper/rhel-swap rd.lvm.lv=rhel/root rd.lvm.lv=rhel/swap rhgb quiet $ grub2-editenv - set "kernelopts=root=/dev/mapper/rhel-root ro crashkernel=auto resume=/dev/mapper/rhel-swap rd.lvm.lv=rhel/root rd.lvm.lv=rhel/swap rhgb quiet cgroup_no_v1=all" $ reboot 2. having a running vm [root@dell-per740-07 /]# virsh list Id Name State -------------------------------- 2 avocado-vt-vm1 running 3. mount cgroupv2 to some path [root@dell-per740-07 /]# mount -t cgroup2 cgroup2 /cgroup2/ 4. do blkiotune to that vm [root@dell-per740-07 /]# virsh blkiotune avocado-vt-vm1 --weight 999 error: Disconnected from qemu:///system due to keepalive timeout error: Unable to change blkio parameters error: internal error: connection closed due to keepalive timeout ========================================================= The backtrace info for the crash in step 4 is as follow: ========================================================= Thread 2 "libvirtd" received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7fffedf06700 (LWP 9137)] 0x00007ffff7424caa in virCgroupBackendForController () from /lib64/libvirt.so.0 Missing separate debuginfos, use: yum debuginfo-install libiscsi-1.18.0-8.module+el8.1.0+3554+1a3a94a6.x86_64 libselinux-2.9-2.1.el8.x86_64 netcf-libs-0.2.8-11.module+el8.1.0+3554+1a3a94a6.x86_64 (gdb) bt #0 0x00007ffff7424caa in virCgroupBackendForController () from /lib64/libvirt.so.0 #1 0x00007ffff741f645 in virCgroupSetBlkioWeight () from /lib64/libvirt.so.0 #2 0x00007fffae59174b in qemuDomainSetBlkioParameters () from /usr/lib64/libvirt/connection-driver/libvirt_driver_qemu.so #3 0x00007ffff764a6e6 in virDomainSetBlkioParameters () from /lib64/libvirt.so.0 #4 0x000055555558ec03 in remoteDispatchDomainSetBlkioParameters (args=0x7fffe8002cc0, rerr=0x7fffedf05940, msg=0x55555583ff30, client=<optimized out>, server=0x5555558038a0) at remote/remote_daemon_dispatch_stubs.h:10295 #5 remoteDispatchDomainSetBlkioParametersHelper (server=0x5555558038a0, client=<optimized out>, msg=0x55555583ff30, rerr=0x7fffedf05940, args=0x7fffe8002cc0, ret=0x7fffe8002dd0) at remote/remote_daemon_dispatch_stubs.h:10262 #6 0x00007ffff758b256 in virNetServerProgramDispatch () from /lib64/libvirt.so.0 #7 0x00007ffff758fee0 in virNetServerProcessMsg () from /lib64/libvirt.so.0 #8 0x00007ffff75901d4 in virNetServerHandleJob () from /lib64/libvirt.so.0 #9 0x00007ffff74a966d in virThreadPoolWorker () from /lib64/libvirt.so.0 #10 0x00007ffff74a89ae in virThreadHelper () from /lib64/libvirt.so.0 #11 0x00007ffff4d512de in start_thread (arg=<optimized out>) at pthread_create.c:486 #12 0x00007ffff4447463 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
This configuration is not supported in RHEL and in general on systemd based distributions. Moving to upstream as it should be fixed, no need to track it of RHEL.
*** Bug 1741820 has been marked as a duplicate of this bug. ***
Thank you for reporting this issue to the libvirt project. Unfortunately we have been unable to resolve this issue due to insufficient maintainer capacity and it will now be closed. This is not a reflection on the possible validity of the issue, merely the lack of resources to investigate and address it, for which we apologise. If you none the less feel the issue is still important, you may choose to report it again at the new project issue tracker https://gitlab.com/libvirt/libvirt/-/issues The project also welcomes contribution from anyone who believes they can provide a solution.