Bug 1933590 - libvirtd crash after executing "systemctl restart libvirtd; virsh list ; systemctl restart libvirtd;"
Summary: libvirtd crash after executing "systemctl restart libvirtd; virsh list ; syst...
Keywords:
Status: CLOSED DUPLICATE of bug 1836865
Alias: None
Product: Red Hat Enterprise Linux Advanced Virtualization
Classification: Red Hat
Component: libvirt
Version: ---
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: 8.4
Assignee: Jonathon Jongsma
QA Contact: yafu
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-03-01 08:09 UTC by yalzhang@redhat.com
Modified: 2021-03-17 01:37 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-03-17 01:37:02 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
the backtrack for the crashed libvirtd (3.57 KB, text/plain)
2021-03-01 08:09 UTC, yalzhang@redhat.com
no flags Details

Description yalzhang@redhat.com 2021-03-01 08:09:58 UTC
Created attachment 1759899 [details]
the backtrack for the crashed libvirtd

Description of problem:
libvirtd crash after executing "systemctl restart libvirtd; virsh list ; systemctl restart libvirtd;"

Version-Release number of selected component (if applicable):
# rpm -q libvirt qemu-kvm kernel
libvirt-7.0.0-6.module+el8.4.0+10144+c3d3c217.x86_64
qemu-kvm-5.2.0-8.module+el8.4.0+10093+e085f1eb.x86_64
kernel-4.18.0-291.el8.x86_64

How reproducible:
100%

Steps to Reproduce:
1. On one terminal, track the syslog by:
# tail -f /var/log/messages

2. On another terminal, execute below command:
# systemctl restart libvirtd; virsh list ; systemctl restart libvirtd;

3. check the output on the first terminal, there are information about libvirtd coredump:
Mar  1 02:42:28 dell-per730-37 kernel: nodedev-init[1922933]: segfault at 0 ip 00007f8515178774 sp 00007f84c2457970 error 4 in libglib-2.0.so.0.5600.4[7f851513c000+116000]
Mar  1 02:42:28 dell-per730-37 kernel: Code: 00 49 89 f6 48 85 f6 0f 84 b9 00 00 00 8b 07 48 89 fd 44 8b 6f 44 85 c0 7e 79 49 89 d7 31 db 0f 1f 80 00 00 00 00 48 8b 45 20 <83> 3c 98 01 76 6e 48 8b 45 28 4c 89 fa 4c 8b 24 d8 48 8b 45 18 4c
...
Mar  1 02:42:28 dell-per730-37 systemd-coredump[1922946]: Process 1922863 (libvirtd) of user 0 dumped core...

Actual results:
libvirtd coredump

Expected results:
libvirtd should not crash

Additional info:
the backtrack attached as attachment

Comment 1 Peter Krempa 2021-03-01 10:53:17 UTC
According to the attached backtrace it seems we are trying to clean up the node device driver state while other thread is using it:

                Stack trace of thread 1922933:
                #0  0x00007f8515178774 g_hash_table_find (libglib-2.0.so.0)
                #1  0x00007f851593ea98 virHashSearch (libvirt.so.0)
                #2  0x00007f8515a1dd83 virNodeDeviceObjListSearch (libvirt.so.0)
                #3  0x00007f84cceb40a1 udevAddOneDevice (libvirt_driver_nodedev.so)
                #4  0x00007f84cceb5fae nodeStateInitializeEnumerate (libvirt_driver_nodedev.so)
                #5  0x00007f85159840cb virThreadHelper (libvirt.so.0)
                #6  0x00007f8511c7d14a start_thread (libpthread.so.0)
                #7  0x00007f851442bdb3 __clone (libc.so.6)
                
                Stack trace of thread 1922863:
                #0  0x00007f851442651d syscall (libc.so.6)
                #1  0x00007f85159842d4 virThreadSelfID (libvirt.so.0)
                #2  0x00007f851594e240 virLogFormatString (libvirt.so.0)
                #3  0x00007f851596635d vir_object_finalize (libvirt.so.0)
                #4  0x00007f8514efe8e9 g_object_unref (libgobject-2.0.so.0)
                #5  0x00007f85159667f8 virObjectUnref (libvirt.so.0)
                #6  0x00007f851517755f g_hash_table_remove_all_nodes.part.0 (libglib-2.0.so.0)
                #7  0x00007f8515177e62 g_hash_table_unref (libglib-2.0.so.0)
                #8  0x00007f851596637e vir_object_finalize (libvirt.so.0)
                #9  0x00007f8514efe8e9 g_object_unref (libgobject-2.0.so.0)
                #10 0x00007f85159667f8 virObjectUnref (libvirt.so.0)
                #11 0x00007f84cceb2b42 nodeStateCleanup (libvirt_driver_nodedev.so)
                #12 0x00007f8515b37950 virStateCleanup (libvirt.so.0)
                #13 0x00005648085348e8 main (libvirtd)
                #14 0x00007f8514352493 __libc_start_main (libc.so.6)
                #15 0x00005648085350fe _start (libvirtd)

Comment 2 yalzhang@redhat.com 2021-03-17 01:37:02 UTC
close as duplicate, refer to bug 1836865#c11

*** This bug has been marked as a duplicate of bug 1836865 ***


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