Bug 1937287
Summary: | libvirtd crashed when starting guest after setting the max_threads_per_process to non default value | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux Advanced Virtualization | Reporter: | Lili Zhu <lizhu> | ||||
Component: | libvirt | Assignee: | Peter Krempa <pkrempa> | ||||
Status: | CLOSED ERRATA | QA Contact: | yisun | ||||
Severity: | high | Docs Contact: | |||||
Priority: | high | ||||||
Version: | 8.4 | CC: | jdenemar, jen, jsuchane, lmen, pkrempa, virt-maint, xuzhang, yafu, yisun | ||||
Target Milestone: | rc | Keywords: | Regression, Triaged | ||||
Target Release: | 8.4 | Flags: | pm-rhel:
mirror+
|
||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Whiteboard: | |||||||
Fixed In Version: | libvirt-7.0.0-9.el8 | Doc Type: | If docs needed, set a value | ||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2021-05-25 06:48:26 UTC | Type: | Bug | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
Description
Lili Zhu
2021-03-10 09:49:16 UTC
Created attachment 1762239 [details]
backtrace
The problem is in the format string used to construct a numeric gvariant. Unfortunately the code path isn't covered by tests. Glib also reports: (process:3561615): GLib-CRITICAL **: 14:32:08.663: 'llu' does not have a valid GVariant format string as a prefix (process:3561615): GLib-CRITICAL **: 14:32:08.663: g_variant_new_va: assertion 'valid_format_string (format_string, !endptr, NULL)' failed Fixed upstream by: commit 7b8f78a3afcb51f74cc81b69226a3c49a49f0b9b Author: Peter Krempa <pkrempa> Date: Wed Mar 10 14:37:56 2021 +0100 virsystemdtest: Call at least one virSystemdCreateMachine with 'maxthreads' > 0 There was a bug in the code adding TasksMax property. It remained undetected because all tests used '0' for @maxthreads. Signed-off-by: Peter Krempa <pkrempa> Reviewed-by: Pavel Hrdina <phrdina> commit 07c6e493b2466c47401b6eb8a3f9b7d2d20df83e Author: Peter Krempa <pkrempa> Date: Wed Mar 10 14:33:06 2021 +0100 virSystemdCreateMachine: Use proper format string for uint64_t when constructing gvariant g_variant_new_parsed uses '%t' for a uint64_t rather than printf-like %llu. Additionally ensure that the passed value is a uint64_t since the argument used is a 'unsigned int'. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1937287 Fixes: bf5f2ed09c2 Signed-off-by: Peter Krempa <pkrempa> Reviewed-by: Pavel Hrdina <phrdina> Exception approved in review meeting on 12 Mar 2021. Verified on: libvirt-7.0.0-9.module+el8.4.0+10326+5e50a3b6.x86_64 Result: PASS Cgroup1 ENV: [root@lenovo-sr630-10 ~]# grep -i ^max_threads /etc/libvirt/qemu.conf max_threads_per_process = 2 [root@lenovo-sr630-10 ~]# systemctl restart libvirtd [root@lenovo-sr630-10 ~]# virsh start gls error: Failed to start domain 'gls' error: internal error: process exited while connecting to monitor: qemu: qemu_thread_create: Resource temporarily unavailable [root@lenovo-sr630-10 ~]# grep -i ^max_threads /etc/libvirt/qemu.conf max_threads_per_process = 128 [root@lenovo-sr630-10 ~]# systemctl restart libvirtd [root@lenovo-sr630-10 ~]# virsh start gls Domain 'gls' started [root@lenovo-sr630-10 ~]# cat /sys/fs/cgroup/pids/machine.slice/machine-qemu\\x2d1\\x2dgls.scope/pids.max 128 [root@lenovo-sr630-10 ~]# grep -i ^max_threads /etc/libvirt/qemu.conf max_threads_per_process = 99999 [root@lenovo-sr630-10 ~]# systemctl restart libvirtd [root@lenovo-sr630-10 ~]# virsh start gls Domain 'gls' started [root@lenovo-sr630-10 ~]# cat /sys/fs/cgroup/pids/machine.slice/machine-qemu\\x2d1\\x2dgls.scope/pids.max 99999 Cgroup2 ENV: [root@dell-per740-01 ~]# grep -i ^max_threads /etc/libvirt/qemu.conf max_threads_per_process = 100 [root@dell-per740-01 ~]# systemctl restart libvirtd [root@dell-per740-01 ~]# virsh start vm1 Domain 'vm1' started [root@dell-per740-01 ~]# grep -i ^max_threads /etc/libvirt/qemu.conf max_threads_per_process = 2 [root@dell-per740-01 ~]# systemctl restart libvirtd [root@dell-per740-01 ~]# virsh start vm1 error: Failed to start domain 'vm1' error: internal error: process exited while connecting to monitor: qemu: qemu_thread_create: Resource temporarily unavailable [root@dell-per740-01 ~]# grep -i ^max_threads /etc/libvirt/qemu.conf max_threads_per_process = 99999 [root@dell-per740-01 ~]# systemctl restart libvirtd [root@dell-per740-01 ~]# virsh start vm1 Domain 'vm1' started [root@dell-per740-01 ~]# cat /sys/fs/cgroup/machine.slice/machine-qemu\\x2d1\\x2dvm1.scope/pids.max 99999 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 (virt:av bug fix and enhancement update), 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/RHBA-2021:2098 |