[Pkg-libvirt-maintainers] Bug#991278: In debian bullseye: libvirtd crashes on virStateShutdownPrepare

Katerina Koukiou kkoukiou at redhat.com
Mon Jul 19 15:06:51 BST 2021


Package: libvirt0
Architecture: amd64
Version: 7.0.0-3

Cockpit Machines (cockpit-project.org/) tests caught the following
libvirt crash. The test is pretty basic, essentially starts libvirtd
and calls List APIs for domains, storage, networks, interfaces and
other resources.
SInce this crash heavily depends on the timing of the tests, I was not
able to reproduce with a CLI reproducer.

However take a look in the following stack trace, I got it with debug
symbols installed.

root at debian:~#  coredumpctl gdb
           PID: 2543 (libvirtd)
           UID: 1003 (test_wheel_user)
           GID: 1004 (test_wheel_user)
        Signal: 11 (SEGV)
     Timestamp: Mon 2021-07-19 13:52:48 UTC (3min 30s ago)
  Command Line: /usr/sbin/libvirtd --timeout=120
    Executable: /usr/sbin/libvirtd
 Control Group:
/user.slice/user-1003.slice/user at 1003.service/app.slice/dbus.service
          Unit: user at 1003.service
     User Unit: dbus.service
         Slice: user-1003.slice
     Owner UID: 1003 (test_wheel_user)
       Boot ID: 29973ed80def406badf3789f0717e6a5
    Machine ID: 442e228e469f4b768a44b4650f0df402
      Hostname: debian
       Storage:
/var/lib/systemd/coredump/core.libvirtd.1003.29973ed80def406badf3789f0717e6a5.2543.1626702768000000.zst
       Message: Process 2543 (libvirtd) of user 1003 dumped core.

                Stack trace of thread 2543:
                #0  0x00007fd400dafbeb qemuStateShutdownPrepare
(libvirt_driver_qemu.so + 0xabbeb)
                #1  0x00007fd409da50e0 virStateShutdownPrepare
(libvirt.so.0 + 0x2d50e0)
                #2  0x00007fd409cb315d virNetDaemonRun (libvirt.so.0 + 0x1e315d)
                #3  0x00005573f0ce5e72 main (libvirtd + 0x24e72)
                #4  0x00007fd4095a4d0a __libc_start_main (libc.so.6 + 0x26d0a)
                #5  0x00005573f0ce67ea _start (libvirtd + 0x257ea)

                Stack trace of thread 2559:
                #0  0x00007fd408ebfe2b __lll_lock_wait
(libpthread.so.0 + 0x12e2b)
                #1  0x00007fd408eb8843 __GI___pthread_mutex_lock
(libpthread.so.0 + 0xb843)
                #2  0x00007fd409cb2b59
virNetDaemonRemoveShutdownInhibition (libvirt.so.0 + 0x1e2b59)
                #3  0x00005573f0ce7250 daemonInhibitCallback (libvirtd
+ 0x26250)
                #4  0x00007fd409bf20e5 virThreadHelper (libvirt.so.0 + 0x1220e5)
                #5  0x00007fd408eb5ea7 start_thread (libpthread.so.0 + 0x8ea7)
                #6  0x00007fd40967bdef __clone (libc.so.6 + 0xfddef)

                Stack trace of thread 2560:
                #0  0x00007fd4096713ff __GI___poll (libc.so.6 + 0xf33ff)
                #1  0x00007fd4099e90ae g_main_context_poll
(libglib-2.0.so.0 + 0x520ae)
                #2  0x00007fd4099e91cf g_main_context_iteration
(libglib-2.0.so.0 + 0x521cf)
                #3  0x00007fd4099e9221 glib_worker_main
(libglib-2.0.so.0 + 0x52221)
                #4  0x00007fd409a120bd g_thread_proxy
(libglib-2.0.so.0 + 0x7b0bd)
                #5  0x00007fd408eb5ea7 start_thread (libpthread.so.0 + 0x8ea7)
                #6  0x00007fd40967bdef __clone (libc.so.6 + 0xfddef)

                Stack trace of thread 2561:
                #0  0x00007fd4096713ff __GI___poll (libc.so.6 + 0xf33ff)
                #1  0x00007fd4099e90ae g_main_context_poll
(libglib-2.0.so.0 + 0x520ae)
                #2  0x00007fd4099e940b g_main_loop_run
(libglib-2.0.so.0 + 0x5240b)
                #3  0x00007fd40987aa36 gdbus_shared_thread_func
(libgio-2.0.so.0 + 0x11ba36)
                #4  0x00007fd409a120bd g_thread_proxy
(libglib-2.0.so.0 + 0x7b0bd)
                #5  0x00007fd408eb5ea7 start_thread (libpthread.so.0 + 0x8ea7)
                #6  0x00007fd40967bdef __clone (libc.so.6 + 0xfddef)

GNU gdb (Debian 10.1-1.7) 10.1.90.20210103-git
Copyright (C) 2021 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/sbin/libvirtd...
Reading symbols from
/usr/lib/debug/.build-id/53/da5d393aa215310e305a658d9b35d6bd0bd5c9.debug...
[New LWP 2543]
[New LWP 2559]
[New LWP 2560]
[New LWP 2561]
b[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
tCore was generated by `/usr/sbin/libvirtd --timeout=120'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00007fd400dafbeb in qemuStateShutdownPrepare () at
../../src/qemu/qemu_driver.c:1075
1075    ../../src/qemu/qemu_driver.c: No such file or directory.
[Current thread is 1 (Thread 0x7fd4065e7ac0 (LWP 2543))]
(gdb) bt full
#0  0x00007fd400dafbeb in qemuStateShutdownPrepare () at
../../src/qemu/qemu_driver.c:1075
No locals.
#1  0x00007fd409da50e0 in virStateShutdownPrepare () at ../../src/libvirt.c:691
        i = 8
#2  0x00007fd409cb315d in virNetDaemonRun
(dmn=dmn at entry=0x5573f1e4e020) at ../../src/rpc/virnetdaemon.c:869
        timerid = 1
        timerActive = true
        shutdownThread = {thread = 0}
        __FUNCTION__ = "virNetDaemonRun"
        __func__ = "virNetDaemonRun"
#3  0x00005573f0ce5e72 in main (argc=<optimized out>, argv=<optimized
out>) at ../../src/remote/remote_daemon.c:1209
        dmn = 0x5573f1e4e020
        srv = <optimized out>
        srvAdm = 0x5573f1e4f160
        adminProgram = 0x3eb
        lxcProgram = 0x5573f1e4f080
        remote_config_file = 0x5573f1e4ae00
"/home/test_wheel_user/.config/libvirt/libvirtd.conf"
        statuswrite = -1
        ret = 1
        pid_file_fd = 4
        pid_file = 0x5573f1e4d770 "/run/user/1003/libvirt/libvirtd.pid"
        sock_file = 0x5573f1e4d6d0 "/run/user/1003/libvirt/libvirt-sock"
        sock_file_ro = 0x0
        sock_file_adm = 0x5573f1e4aa00
"/run/user/1003/libvirt/libvirt-admin-sock"
        timeout = 120
        verbose = 0
        godaemon = 0
        ipsock = 0
        config = 0x7
        privileged = <optimized out>
        implicit_conf = <optimized out>
        run_dir = 0x5573f1e4d7d0 "/run/user/1003/libvirt"
        old_umask = <optimized out>
        opts = {{name = 0x5573f0d192ff "verbose", has_arg = 0, flag =
0x7ffc3c600d44, val = 118}, {name = 0x5573f0d199fb "daemon", has_arg =
0, flag = 0x7ffc3c600d48, val = 100}, {name = 0x5573f0d1932d "listen",
has_arg = 0,
            flag = 0x7ffc3c600d4c, val = 108}, {name = 0x5573f0d19638
"config", has_arg = 1, flag = 0x0, val = 102}, {name = 0x5573f0d19681
"timeout", has_arg = 1, flag = 0x0, val = 116}, {name = 0x5573f0d1963f
"pid-file", has_arg = 1,
            flag = 0x0, val = 112}, {name = 0x5573f0d193b1 "version",
has_arg = 0, flag = 0x0, val = 86}, {name = 0x5573f0d192c9 "help",
has_arg = 0, flag = 0x0, val = 104}, {name = 0x0, has_arg = 0, flag =
0x0, val = 0}}
        __func__ = "main"

Attaching the core files.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: core.libvirtd.1003.29973ed80def406badf3789f0717e6a5.2440.1626702757000000.zst
Type: application/zstd
Size: 533324 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-libvirt-maintainers/attachments/20210719/c9a33c2b/attachment-0003.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: core.libvirtd.1003.29973ed80def406badf3789f0717e6a5.2492.1626702762000000.zst
Type: application/zstd
Size: 532193 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-libvirt-maintainers/attachments/20210719/c9a33c2b/attachment-0004.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: core.libvirtd.1003.29973ed80def406badf3789f0717e6a5.2362.1626702751000000.zst
Type: application/zstd
Size: 533296 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-libvirt-maintainers/attachments/20210719/c9a33c2b/attachment-0005.bin>


More information about the Pkg-libvirt-maintainers mailing list