#1112273 qemu-system: rpc-libvirtd segfaults in combination with qemu 10.1.0+ds-1

#1112273#5
Date:
2025-08-28 06:46:35 UTC
From:
To:
Dear Maintainer,

after upgrading today I received the following qemu-* packages:

qemu-block-extra                        1:10.1.0+ds-1
amd64
qemu-system                             1:10.1.0+ds-1
amd64
qemu-system-arm                         1:10.1.0+ds-1
amd64
qemu-system-common                      1:10.1.0+ds-1
amd64
qemu-system-gui                         1:10.1.0+ds-1
amd64
qemu-system-mips                        1:10.1.0+ds-1
amd64
qemu-system-misc                        1:10.1.0+ds-1
amd64
qemu-system-modules-opengl              1:10.1.0+ds-1
amd64
qemu-system-modules-spice               1:10.1.0+ds-1
amd64
qemu-system-ppc                         1:10.1.0+ds-1
amd64
qemu-system-riscv                       1:10.1.0+ds-1
amd64
qemu-system-s390x                       1:10.1.0+ds-1
amd64
qemu-system-sparc                       1:10.1.0+ds-1
amd64
qemu-system-x86                         1:10.1.0+ds-1
amd64
qemu-utils                              1:10.1.0+ds-1
amd64
qemu-system-data                        1:10.1.0+ds-1
all

With these versions of qemu and its auxiliary packages I am unable to connect
to my local libvirtd daemon (qemu://system). I see the following segfault in
the journal:

Aug 28 08:23:21 hostname kernel: rpc-libvirtd[3284]: segfault at 0 ip
00007f0fe3c8123a sp 00007f100d3fe470 error 4 in
libvirt_driver_qemu.so[8123a,7f0fe3c4b000+135000] likely on CPU 0 (core 0,
socket 0)
Aug 28 08:23:21 hostname kernel: Code: 0f 31 c0 48 83 c4 08 5b 5d 41 5c 41 5d
c3 66 90 41 8b 74 24 78 48 8d 53 38 48 89 ef e8 0f fd ff ff 83 f8 ff 74 dd 4c
8b 6b 38 <49> 83 7d 00 00 74 d0 31 db 48 8d 2d 62 af 10 00 eb 0e 0f 1f 40 00
Aug 28 08:23:21 hostname systemd[1]: libvirtd.service: Main process exited,
code=killed, status=11/SEGV
Aug 28 08:23:21 hostname systemd[1]: libvirtd.service: Failed with result
'signal'.
Aug 28 08:23:21 hostname systemd[1]: libvirtd.service: Unit process 3237 (qemu-
system-alp) remains running after unit stopped.
Aug 28 08:23:21 hostname systemd[1]: libvirtd.service: Unit process 3279 (qemu-
system-alp) remains running after unit stopped.
Aug 28 08:23:21 hostname systemd[1]: libvirtd.service: Unit process 3382 (qemu-
system-alp) remains running after unit stopped.
Aug 28 08:23:21 hostname systemd[1]: libvirtd.service: Consumed 601ms CPU time,
182.4M memory peak.
Aug 28 08:23:21 hostname systemd[1]: libvirtd.service: Scheduled restart job,
restart counter is at 3.
Aug 28 08:23:21 hostname systemd[1]: libvirtd.service: Found left-over process
3237 (qemu-system-alp) in control group while starting unit. Ignoring.
Aug 28 08:23:21 hostname systemd[1]: libvirtd.service: This usually indicates
unclean termination of a previous run, or service implementation deficiencies.
Aug 28 08:23:21 hostname systemd[1]: libvirtd.service: Found left-over process
3279 (qemu-system-alp) in control group while starting unit. Ignoring.
Aug 28 08:23:21 hostname systemd[1]: libvirtd.service: This usually indicates
unclean termination of a previous run, or service implementation deficiencies.
Aug 28 08:23:21 hostname systemd[1]: libvirtd.service: Found left-over process
3382 (qemu-system-alp) in control group while starting unit. Ignoring.
Aug 28 08:23:21 hostname systemd[1]: libvirtd.service: This usually indicates
unclean termination of a previous run, or service implementation deficiencies.
Aug 28 08:23:21 hostname systemd[1]: Starting libvirtd.service - libvirt legacy
monolithic daemon...
Aug 28 08:23:22 hostname systemd[1]: Started libvirtd.service - libvirt legacy
monolithic daemon.

Restarting the system did not solve the problem. Downgrading to the previous
qemu-* package versions as follows fixed the
problem and I am able to connect to the daemon again:

# Download previous packages versions
wget
https://snapshot.debian.org/archive/debian/20250821T204848Z/pool/main/q/qemu/qemu-
block-extra_10.0.3+ds-4_amd64.deb
wget
https://snapshot.debian.org/archive/debian/20250821T204848Z/pool/main/q/qemu/qemu-
system_10.0.3+ds-4_amd64.deb
wget
https://snapshot.debian.org/archive/debian/20250821T204848Z/pool/main/q/qemu/qemu-
system-arm_10.0.3+ds-4_amd64.deb
wget
https://snapshot.debian.org/archive/debian/20250821T204848Z/pool/main/q/qemu/qemu-
system-common_10.0.3+ds-4_amd64.deb
wget
https://snapshot.debian.org/archive/debian/20250821T204848Z/pool/main/q/qemu/qemu-
system-gui_10.0.3+ds-4_amd64.deb
wget
https://snapshot.debian.org/archive/debian/20250821T204848Z/pool/main/q/qemu/qemu-
system-mips_10.0.3+ds-4_amd64.deb
wget
https://snapshot.debian.org/archive/debian/20250821T204848Z/pool/main/q/qemu/qemu-
system-misc_10.0.3+ds-4_amd64.deb
wget
https://snapshot.debian.org/archive/debian/20250821T204848Z/pool/main/q/qemu/qemu-
system-modules-opengl_10.0.3+ds-4_amd64.deb
wget
https://snapshot.debian.org/archive/debian/20250821T204848Z/pool/main/q/qemu/qemu-
system-modules-spice_10.0.3+ds-4_amd64.deb
wget
https://snapshot.debian.org/archive/debian/20250821T204848Z/pool/main/q/qemu/qemu-
system-ppc_10.0.3+ds-4_amd64.deb
wget
https://snapshot.debian.org/archive/debian/20250821T204848Z/pool/main/q/qemu/qemu-
system-riscv_10.0.3+ds-4_amd64.deb
wget
https://snapshot.debian.org/archive/debian/20250821T204848Z/pool/main/q/qemu/qemu-
system-s390x_10.0.3+ds-4_amd64.deb
wget
https://snapshot.debian.org/archive/debian/20250821T204848Z/pool/main/q/qemu/qemu-
system-sparc_10.0.3+ds-4_amd64.deb
wget
https://snapshot.debian.org/archive/debian/20250821T204848Z/pool/main/q/qemu/qemu-
system-x86_10.0.3+ds-4_amd64.deb
wget
https://snapshot.debian.org/archive/debian/20250821T204848Z/pool/main/q/qemu/qemu-
utils_10.0.3+ds-4_amd64.deb
wget
https://snapshot.debian.org/archive/debian/20250821T204848Z/pool/main/q/qemu/qemu-
system-data_10.0.3+ds-4_all.deb
# Perform downgrade
sudo apt install ./qemu-*

Kind regards and thanks for your time,
David

#1112273#10
Date:
2025-08-28 07:39:53 UTC
From:
To:
Control: reassign -1 src:libvirt
Control: affects -1 src:qemu
...

You most likely don't need all these packages, as you seems to
only using x86 version.  It should be enough to install just
qemu-system-x86, and maybe qemu-utils.  But this is unrelated
to your bug report.
...

This is an issue in libvirt, not qemu, - it is the one who segfaults,
and it definitely should not crash.

Reassigning this bug to libvirt.  Unfortunately there's no indication
which version of libvirt you're using, hopefully it's the one in sid?

Thanks,

/mjt

#1112273#21
Date:
2025-08-28 07:48:45 UTC
From:
To:
Hello Michael,

I would agree, however, removing, for example, qemu-system-mips would
also remove qemu-system for me.

Thanks, I am using 11.3.0-3+b1 of libvirt-daemon.

Kind regards,
David

#1112273#26
Date:
2025-08-28 08:01:02 UTC
From:
To:
Control: found -1 11.3.0-3+b1

Sure, - qemu-system is an emtpy meta-package which just depends on all
of qemu-system-* variants -- it's here since old days when there was
single qemu-system package with all qemu system emulators, rather huge -
later on I split it into separate families, and most of the time only
one family is used.  You don't need qemu-system, just particular family
of it.

Hopefully all packages which use qemu (like libvirt) has proper
dependency - on particular family of qemu-system or on qemu-system-any.

Thanks,

/mjt

#1112273#37
Date:
2025-08-28 19:42:22 UTC
From:
To:
libvirt locally? Perhaps including custom changes?

Agreed. Can you try installing libvirt 11.6.0-1 from experimental and
see whether the issue still reproduces? Alternatively, 11.7.0-1
should come to unstable in a week or so. Since there's a non-zero
chance that the issue has already been identified and addressed
upstream, I'm not too eager to start debugging this very second :)

#1112273#42
Date:
2025-08-28 21:44:57 UTC
From:
To:
It's what we have in trixie - libvirt-daemon version 11.3.0-3+b1,
see libvirt package tracking page :)

Thanks,

/mjt

#1112273#47
Date:
2025-08-28 22:36:49 UTC
From:
To:
I checked tracker.debian.org and couldn't find any mention of it, but
of course you're right:

  libvirt (11.3.0-3+b1) sid; urgency=low, binary-only=yes
  .
    * Binary-only non-maintainer upload for amd64; no source changes.
    * Rebuild against libxml2-16
  .
   -- amd64 / i386 Build Daemon (x86-ubc-01) <buildd_amd64-x86-ubc-01@buildd.debian.org>  Sun, 17 Aug 2025 18:38:51 +0000

So that explains the oddity. The rest of my message still applies.

#1112273#52
Date:
2025-08-29 05:32:33 UTC
From:
To:
Thanks, I was not aware of this! I removed the unneeded packages.
#1112273#57
Date:
2025-08-29 05:39:27 UTC
From:
To:
For reasons I don't quite understand, the issue appears to have solved
itself. Just for testing purposes, I re-installed qemu 10.1.0+ds-1 and
now the segfaults upon connecting to qemu://system with virt-manager do
not happen anymore.

I currently have the following versions of qemu and libvirt installed:

dpkg -l | grep -E '(^ii  libvirt|^ii  qemu)'
ii  libvirt-clients                         11.3.0-3+b1
             amd64        virtualization library - clients
ii  libvirt-common                          11.3.0-3+b1
             amd64        virtualization library - common files
ii  libvirt-daemon                          11.3.0-3+b1
             amd64        virtualization daemon
ii  libvirt-daemon-common                   11.3.0-3+b1
             amd64        virtualization daemon - common files
ii  libvirt-daemon-config-network           11.3.0-3
             all          virtualization daemon - configuration files
(default network)
ii  libvirt-daemon-config-nwfilter          11.3.0-3
             all          virtualization daemon - configuration files
(default network filters)
ii  libvirt-daemon-driver-interface         11.3.0-3+b1
             amd64        virtualization daemon - interface driver
ii  libvirt-daemon-driver-lxc               11.3.0-3+b1
             amd64        virtualization daemon - LXC connection driver
ii  libvirt-daemon-driver-network           11.3.0-3+b1
             amd64        virtualization daemon - network driver
ii  libvirt-daemon-driver-nodedev           11.3.0-3+b1
             amd64        virtualization daemon - node device (nodedev)
driver
ii  libvirt-daemon-driver-nwfilter          11.3.0-3+b1
             amd64        virtualization daemon - network filter
(nwfilter) driver
ii  libvirt-daemon-driver-qemu              11.3.0-3+b1
             amd64        virtualization daemon - QEMU connection driver
ii  libvirt-daemon-driver-secret            11.3.0-3+b1
             amd64        virtualization daemon - secret driver
ii  libvirt-daemon-driver-storage           11.3.0-3+b1
             amd64        virtualization daemon - storage driver
ii  libvirt-daemon-driver-storage-disk      11.3.0-3+b1
             amd64        virtualization daemon - disk storage driver
ii  libvirt-daemon-driver-storage-logical   11.3.0-3+b1
             amd64        virtualization daemon - Logical Volume Manager
(LVM) storage driver
ii  libvirt-daemon-driver-storage-mpath     11.3.0-3+b1
             amd64        virtualization daemon - multipath (mpath)
storage driver
ii  libvirt-daemon-driver-storage-scsi      11.3.0-3+b1
             amd64        virtualization daemon - SCSI storage driver
ii  libvirt-daemon-driver-vbox              11.3.0-3+b1
             amd64        virtualization daemon - VirtualBox connection
driver
ii  libvirt-daemon-lock                     11.3.0-3+b1
             amd64        virtualization daemon - locking daemon
ii  libvirt-daemon-log                      11.3.0-3+b1
             amd64        virtualization daemon - logging daemon
ii  libvirt-daemon-plugin-lockd             11.3.0-3+b1
             amd64        virtualization daemon - locking plugin (virtlockd)
ii  libvirt-daemon-system                   11.3.0-3+b1
             amd64        virtualization daemon - typical QEMU-based
deployment
ii  libvirt-glib-1.0-0:amd64                5.0.0-2+b5
             amd64        libvirt GLib and GObject mapping library
ii  libvirt-glib-1.0-data                   5.0.0-2
             all          Common files for libvirt GLib library
ii  libvirt-l10n                            11.3.0-3
             all          virtualization library - localization files
ii  libvirt0:amd64                          11.3.0-3+b1
             amd64        virtualization library
ii  qemu-block-extra                        1:10.1.0+ds-1
             amd64        extra block backend modules for qemu-system
and qemu-utils
ii  qemu-system-common                      1:10.1.0+ds-1
             amd64        QEMU full system emulation binaries (common files)
ii  qemu-system-data                        1:10.1.0+ds-1
             all          QEMU full system emulation (data files)
ii  qemu-system-gui                         1:10.1.0+ds-1
             amd64        QEMU full system emulation binaries (graphical
display and audio modules)
ii  qemu-system-modules-opengl              1:10.1.0+ds-1
             amd64        QEMU full system emulation binaries (OpenGL
display modules)
ii  qemu-system-modules-spice               1:10.1.0+ds-1
             amd64        QEMU full system emulation binaries (spice
display modules)
ii  qemu-system-x86                         1:10.1.0+ds-1
             amd64        QEMU full system emulation binaries (x86)
ii  qemu-utils                              1:10.1.0+ds-1
             amd64        QEMU utilities

I can assist further in debugging if desired. Otherwise the bug can be
closed.

Kind regards and thanks for your time,
David

#1112273#62
Date:
2025-08-29 07:00:24 UTC
From:
To:
https://bugs.debian.org/1112330 (CC'd).

FWIW.

Thanks,

/mjt