RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1747440 - [cgroup_v2] Crash happens when set cpu related cgroup values by “schedinfo”
Summary: [cgroup_v2] Crash happens when set cpu related cgroup values by “schedinfo”
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: libvirt
Version: 8.1
Hardware: x86_64
OS: Linux
high
high
Target Milestone: rc
: 8.0
Assignee: Pavel Hrdina
QA Contact: yisun
URL:
Whiteboard:
Depends On:
Blocks: 1747482
TreeView+ depends on / blocked
 
Reported: 2019-08-30 12:48 UTC by yisun
Modified: 2020-11-06 04:08 UTC (History)
8 users (show)

Fixed In Version: libvirt-4.5.0-34.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1747482 (view as bug list)
Environment:
Last Closed: 2019-11-05 20:51:11 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2019:3345 0 None None None 2019-11-05 20:51:39 UTC

Description yisun 2019-08-30 12:48:36 UTC
Description:
[cgroup_v2] Crash happens when set cpu related cgroup values by “schedinfo”

Versions:
kernel-4.18.0-135.el8.x86_64
libvirt-4.5.0-33.module+el8.1.0+4066+0f1aadab.x86_64

How reproducible:
100%

Steps:
1. Having a running vm
# virsh list
 Id    Name                           State
----------------------------------------------------
 1     avocado-vt-vm1                 running

2. Set cpu related cgroup params by schedinfo, crash happened
# virsh schedinfo avocado-vt-vm1 --set vcpu_period=9999 --set vcpu_quota=8888
Scheduler      : posix
error: Disconnected from qemu:///system due to end of file
error: End of file while reading data: Input/output error

3 backtrace info as follow:
#gdb -p `pidof libvirtd`
…
(gdb) c
Continuing.

Thread 6 "libvirtd" received signal SIGABRT, Aborted.
[Switching to Thread 0x7f33eaf71700 (LWP 26133)]
0x00007f33f2bf08df in raise () from /lib64/libc.so.6
(gdb) bt
#0  0x00007f33f2bf08df in raise () from /lib64/libc.so.6
#1  0x00007f33f2bdacf5 in abort () from /lib64/libc.so.6
#2  0x00007f33f2c33c17 in __libc_message () from /lib64/libc.so.6
#3  0x00007f33f2c3a53c in malloc_printerr () from /lib64/libc.so.6
#4  0x00007f33f2c3bc64 in _int_free () from /lib64/libc.so.6
#5  0x00007f33f60a514f in virFree () from /lib64/libvirt.so.0
#6  0x00007f33f60b6143 in virCgroupV2GetCpuCfsQuota () from /lib64/libvirt.so.0
#7  0x00007f33ad84cd40 in qemuGetVcpuBWLive () from /usr/lib64/libvirt/connection-driver/libvirt_driver_qemu.so
#8  0x00007f33ad85b4f4 in qemuDomainGetSchedulerParametersFlags () from /usr/lib64/libvirt/connection-driver/libvirt_driver_qemu.so
#9  0x00007f33f62bd111 in virDomainGetSchedulerParameters () from /lib64/libvirt.so.0
#10 0x000055c934e9ef7c in remoteDispatchDomainGetSchedulerParametersHelper ()
#11 0x00007f33f61f88b4 in virNetServerProgramDispatch () from /lib64/libvirt.so.0
#12 0x00007f33f61fed6c in virNetServerHandleJob () from /lib64/libvirt.so.0
#13 0x00007f33f612cba0 in virThreadPoolWorker () from /lib64/libvirt.so.0
#14 0x00007f33f612beac in virThreadHelper () from /lib64/libvirt.so.0
#15 0x00007f33f2f842de in start_thread () from /lib64/libpthread.so.0
#16 0x00007f33f2cb5133 in clone () from /lib64/libc.so.6


Expected result:
No crash

Additional info:
Setting other values have same crash and backtrace, record it here for future reference. 
 virsh schedinfo avocado-vt-vm1 --set vcpu_period=9999 --set vcpu_quota=8888
Scheduler : posix
error: Disconnected from qemu:///system due to end of file
error: End of file while reading data: Input/output error


# virsh schedinfo avocado-vt-vm1 --set emulator_period=-1 --set emulator_quota=8888
Scheduler : posix
error: Disconnected from qemu:///system due to end of file
error: End of file while reading data: Input/output error


# virsh schedinfo avocado-vt-vm1 --set global_period=9999 --set global_quota=8888
Scheduler : posix
error: Disconnected from qemu:///system due to end of file
error: End of file while reading data: Input/output error


# virsh schedinfo avocado-vt-vm1 --set iothread_period=2000 --set iothread_quota=2000
Scheduler : posix
error: Disconnected from qemu:///system due to end of file
error: End of file while reading data: Input/output error

Comment 1 Pavel Hrdina 2019-08-30 14:33:08 UTC
Upstream commit:

commit 9a99b01f8d3b2be491f9f8412c6f894d30d7e2fe
Author: Pavel Hrdina <phrdina>
Date:   Fri Aug 30 16:15:15 2019 +0200

    vircgroupv2: fix abort in VIR_AUTOFREE

Comment 7 yisun 2019-09-05 11:29:35 UTC
no crash happens with libvirt-4.5.0-34.module+el8.1.0+4158+21722aaf, PASSED

Comment 9 errata-xmlrpc 2019-11-05 20:51:11 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2019:3345


Note You need to log in before you can comment on or make changes to this bug.