/usr/sbin/libvirtd:11:__GI___pthread_mutex_lock:virThreadPoolStop:qemuStateShutdownPrepare:virStateShutdownPrepare:virNetDaemonRun

Bug #1926122 reported by errors.ubuntu.com bug bridge
16
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libvirt (Ubuntu)
Triaged
Low
Unassigned

Bug Description

The Ubuntu Error Tracker has been receiving reports about a problem regarding libvirt. This problem was most recently seen with package version 7.0.0-2ubuntu2, the problem page at https://errors.ubuntu.com/problem/2674fbe14e2077b4fb7a36a0b06ed829a69671b9 contains more details, including versions of packages affected, stacktrace or traceback, and individual crash reports.
If you do not have access to the Ubuntu Error Tracker and are a software developer, you can request it at http://forms.canonical.com/reports/.

Tags: hirsute
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

This very much looks like
https://gitlab.com/libvirt/libvirt/-/commit/69977ff10560a80bcf5bf93f1a3f819a2d1623ca

We've seen this crash spike on the release of Ubuntu 21.04.
That probably are upgraders with a bad configuration that was always wrong but now trigger this case.

It would hit
a) users that kill libvirt immediately after starting (not very important)
b) users with a broken qemu.conf that leads to qemu init to fail asap

Repro:
$ echo "default_tls_x509_verify = anythingthatiswrong" >> /etc/libvirt/qemu.conf
$ systemctl restart libvirtd

In the log you'll see
Apr 26 05:55:52 h libvirtd[465671]: configuration file syntax error: /etc/libvirt/qemu.conf:937: expecting a value
Apr 26 05:55:52 h libvirtd[465671]: Initialization of QEMU state driver failed: configuration file syntax error: /etc/libvirt/qemu.conf:937: expecting a value
Apr 26 05:55:52 h libvirtd[465671]: Driver state initialization failed

And that means libvirt will die due to bad config and it is rather clear that this is the reson.
The only "problem" with it is that it is less graceful than it should be.

Journal:
Apr 26 05:55:52 h systemd[1]: libvirtd.service: Main process exited, code=dumped, status=11/SEGV
Apr 26 05:55:52 h systemd[1]: libvirtd.service: Failed with result 'core-dump'.

dmesg:
[590441.309462] libvirtd[1278529]: segfault at 38 ip 00007fcf1d22c3ff sp 00007ffe82baaad0 error 4 in libvirt_driver_qemu.so[7fcf1d1b8000+11b000]
[590441.309468] Code: d3 31 d2 e8 23 1d fa ff 48 8b bb a8 00 00 00 5b 48 89 c6 e9 73 b8 f9 ff 0f 1f 00 f3 0f 1e fa 48 83 ec 08 48 8b 05 e1 3a 12 00 <48> 8b 78 38 e8 c8 98 f9 ff 31 c0 48 83 c4 08 c3 90 f3 0f 1e fa 48

And you'd get a crash like the report here has linked.

Since this seems to:
- only affect unreal cases (kill it asap after starting) or "bad configs".
- Still has valid log entries pointing to the actual issue
- is already fixed upstream and thereby will be in the next Ubuntu version
=> This seems to be low importance and can be picked up at low prio.

If anyone runs into this with a more realistic case or a more severe consequence (e.g. dat
 corruption of any kind) then please speak up and providing this will get more prio.

Changed in libvirt (Ubuntu):
status: New → Triaged
importance: Undecided → Low
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Yeah as expected with a broken config this was broken all the time.
E.g. in Bionic

Apr 26 06:01:23 b libvirtd[6154]: 2021-04-26 06:01:23.898+0000: 6172: error : virConfParseValue:529 : configuration file syntax error: /etc/libvirt/qemu.conf:784: expecting a value
Apr 26 06:01:23 b libvirtd[6154]: 2021-04-26 06:01:23.898+0000: 6172: error : virStateInitialize:775 : Initialization of QEMU state driver failed: configuration file syntax error: /etc/libvirt/qemu.conf:784: expecting a value
Apr 26 06:01:23 b libvirtd[6154]: 2021-04-26 06:01:23.898+0000: 6172: error : daemonRunStateInit:849 : Driver state initialization failed

The only difference is that before a fix (for other init issues) this wasn't a crash/segfault.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.