Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 758431 - app-emulation/libvirt-6.10.0: libvirtd daemon does crashes when start virtual machine manager
Summary: app-emulation/libvirt-6.10.0: libvirtd daemon does crashes when start virtual...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Matthias Maier
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-12-04 18:25 UTC by Jan Baklo
Modified: 2020-12-08 22:56 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info && libvirt useflags (emerge.info,5.81 KB, text/plain)
2020-12-07 03:42 UTC, Jan Baklo
Details
gdb-stack-trace (gdb-stack-trace,3.63 KB, text/plain)
2020-12-07 13:32 UTC, Marcin Ciupak
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Baklo 2020-12-04 18:25:48 UTC
With new libvirt-6.10.0, libvirtd daemon has crashes when try launch Virtual Machine Manager 3.1.0.
Related message in system log: ... kernel: rpc-worker[4582]: segfault at 2 ip 00007f21c11266c7 sp 00007f21bbd4a9e0 error 4 in libvirt.so.0.6010.0[7f21c0ffc000+27a000]
Downgrading libvirt to 6.9.0-r1 does disappear the issue.
Comment 1 Matthias Maier gentoo-dev 2020-12-04 23:04:56 UTC
Do you mean app-emulation/virt-manager-3.1.0?
Comment 2 Jan Baklo 2020-12-05 03:34:46 UTC
(In reply to Matthias Maier from comment #1)
> Do you mean app-emulation/virt-manager-3.1.0?

If you mean about "Virtual Machine Manager 3.1.0" then yes.
Comment 3 Michal Privoznik 2020-12-06 19:23:48 UTC
(In reply to Jan Baklo from comment #0)
> With new libvirt-6.10.0, libvirtd daemon has crashes when try launch Virtual
> Machine Manager 3.1.0.
> Related message in system log: ... kernel: rpc-worker[4582]: segfault at 2
> ip 00007f21c11266c7 sp 00007f21bbd4a9e0 error 4 in
> libvirt.so.0.6010.0[7f21c0ffc000+27a000]
> Downgrading libvirt to 6.9.0-r1 does disappear the issue.

This is interesting. Jan, what useflags do you have set for libvirt?
Also, if you have debug symbols do you think you can attach gdb and get stack trace, for instance like this (if you're connecting to qemu:///system):

1) gdb -p $(pgrep libvirtd) -ex "continue" -ex "thread apply all backtrace"
2) connect via virt-manager to reproduce the crash
3) at this point, gdb will stop execution of libvirtd mentioning segmentation fault and it will print stack traces for all thread. Attach that to this bug please.

If you're connecting to session daemon (qemu:///session) then the steps will look a bit different:

1) gdb -ex "run" -ex "thread apply all backtrace" $(which libvirtd)
2) connect via virt-manager to reproduce the crash

Also, please attach the output of emerge --info.
Comment 4 Jan Baklo 2020-12-07 03:42:44 UTC
Created attachment 677122 [details]
emerge --info && libvirt useflags

Unfortunately, at the moment I do not have the opportunity to debug the issue, and can't schedule it for the near time. The --info output is attached.
Comment 5 Marcin Ciupak 2020-12-07 13:14:35 UTC
I do have the same issue.
Here is gdb output:
Thread 10 "prio-rpc-worker" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7f5b05c4f640 (LWP 3266)]
0x00007f5b19f11be7 in ?? () from /usr/lib64/libvirt.so.0
(...)
Thread 10 (Thread 0x7f5b05c4f640 (LWP 3266) "prio-rpc-worker"):
#0  0x00007f5b19f11be7 in  () at /usr/lib64/libvirt.so.0
#1  0x00007f5b19f16d2d in virNodeDeviceGetPCIDynamicCaps () at /usr/lib64/libvirt.so.0
#2  0x00007f5b19f16e9e in virNodeDeviceUpdateCaps () at /usr/lib64/libvirt.so.0
#3  0x00007f5b19f17e0a in  () at /usr/lib64/libvirt.so.0
#4  0x00007f5b19e354ae in virHashForEach () at /usr/lib64/libvirt.so.0
#5  0x00007f5b19f18b3c in virNodeDeviceObjListExport () at /usr/lib64/libvirt.so.0
#6  0x00007f5b1a052b4b in virConnectListAllNodeDevices () at /usr/lib64/libvirt.so.0
#7  0x0000564199777c13 in  ()
#8  0x00007f5b19f3bfca in virNetServerProgramDispatch () at /usr/lib64/libvirt.so.0
#9  0x00007f5b19f40f54 in  () at /usr/lib64/libvirt.so.0
#10 0x00007f5b19e82846 in  () at /usr/lib64/libvirt.so.0
#11 0x00007f5b19e81eb5 in  () at /usr/lib64/libvirt.so.0
#12 0x00007f5b19242f9e in start_thread () at /lib64/libpthread.so.0
#13 0x00007f5b198fa65f in clone () at /lib64/libc.so.6
Comment 6 Marcin Ciupak 2020-12-07 13:32:49 UTC
Created attachment 677143 [details]
gdb-stack-trace

Sorry, previous was without debug symbols. Here is correct one.
Comment 7 Michal Privoznik 2020-12-08 08:29:01 UTC
Thanks for the stack trace. This is a known bug and was fixed by the following commit:

https://gitlab.com/libvirt/libvirt/-/commit/4c4d0e2da07b5a035b26a0ff13ec27070f7c7b1a

Unfortunately, it was merged only recently and there is no release yet that contains it. Nevertheless, the problem was caused by a commit that was merged in 6.10.0 release so that's the only affected version. I think we can just backport the commit that fixes the issue.
Comment 8 Larry the Git Cow gentoo-dev 2020-12-08 22:56:54 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=95669102529602e3a5e601270a5b007464cda3f8

commit 95669102529602e3a5e601270a5b007464cda3f8
Author:     Michal Privoznik <mprivozn@redhat.com>
AuthorDate: 2020-12-08 08:33:17 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2020-12-08 22:56:50 +0000

    app-emulation/libvirt-6.10.0: Fix segfault when parsing mdev types
    
    This is a straight backport of upstream commit of
    4c4d0e2da07b5a035b26a0ff13ec27070f7c7b1a which fixes a crasher
    during filling PCI capabilities for
    virConnectListAllNodeDevices() API.
    
    Closes: https://bugs.gentoo.org/758431
    Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
    Closes: https://github.com/gentoo/gentoo/pull/18562
    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>

 ...10.0-Fix-segfault-when-parsing-mdev-types.patch | 61 ++++++++++++++++++++++
 ...t-6.10.0-r1.ebuild => libvirt-6.10.0-r2.ebuild} |  1 +
 2 files changed, 62 insertions(+)