FS#73856 - [qemu] virtiofsd crashes on glibc 2.35

Attached to Project: Arch Linux
Opened by hexchain (hexchain) - Friday, 18 February 2022, 11:18 GMT
Last edited by David Runge (dvzrv) - Monday, 21 February 2022, 21:00 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Anatol Pomozov (anatolik)
David Runge (dvzrv)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No


QEMU's VirtioFS daemon is killed by SIGSYS every time when a VM utilizing a virtiofs mount is started.

Upstream patch: https://lists.gnu.org/archive/html/qemu-devel/2022-02/msg01957.html

After applying this patch, virtiofsd no longer crashes.

Additional info:
package versions:
glibc 2.35-2
qemu 6.2.0-3

Signal: 31 (SYS)

(gdb) thr apply all bt

Thread 3 (Thread 0x7f7dee344e00 (LWP 1)):
#0 0x00007f7dee4c83ae in ppoll () from /usr/lib/libc.so.6
#1 0x000055f14ebda7c5 in virtio_loop ()
#2 0x000055f14ebd1d22 in main ()

Thread 2 (Thread 0x7f7dee343640 (LWP 2)):
#0 0x00007f7dee4cda9d in syscall () from /usr/lib/libc.so.6
#1 0x000055f14ebe50fb in qemu_event_wait ()
#2 0x000055f14ebf118c in ?? ()
#3 0x000055f14ebe3eef in ?? ()
#4 0x00007f7dee44f5c2 in start_thread () from /usr/lib/libc.so.6
#5 0x00007f7dee4d4584 in clone () from /usr/lib/libc.so.6

Thread 1 (Thread 0x7f7deda22640 (LWP 3)):
#0 0x00007f7dee44f3c6 in start_thread () from /usr/lib/libc.so.6
#1 0x00007f7dee4d4584 in clone () from /usr/lib/libc.so.6

Steps to reproduce:
In my case it was a Windows guest in libvirt. The relevant section looks like this:

<filesystem type="mount" accessmode="passthrough">
<driver type="virtiofs" queue="1024"/>
<binary path="/usr/lib/qemu/virtiofsd" xattr="on">
<cache mode="always"/>
<lock posix="on" flock="on"/>
<source dir="/path/to/share/"/>
<target dir="share"/>
<address type="pci" domain="0x0000" bus="0x0c" slot="0x00" function="0x0"/>
This task depends upon

Closed by  David Runge (dvzrv)
Monday, 21 February 2022, 21:00 GMT
Reason for closing:  Fixed
Additional comments about closing:  Fixed with qemu 6.2.0-4
Comment by hexchain (hexchain) - Friday, 18 February 2022, 11:21 GMT
As a side note, please also consider enabling the "debug" option to generate debuginfo for this package.
Comment by Anatol Pomozov (anatolik) - Friday, 18 February 2022, 18:41 GMT
I added the fix as SVN rev 437708. @David, do you plan to rebuild QEMU in the near future? If not then I'll create a new build for it.
Comment by David Runge (dvzrv) - Friday, 18 February 2022, 22:36 GMT
@anatolik: No, please go ahead and rebuild this (including debug packagge) for [testing].

My modularization rebuild might still take some time, as I am a bit short on time right now.
Comment by Shulhan (sulhan) - Monday, 21 February 2022, 14:09 GMT
The patch working as expected, tested on my local machine.

BTW, this patch [1] should increase pkgrel to 4, no?

[1] https://lists.archlinux.org/pipermail/arch-commits/2022-February/1142052.html
Comment by David Runge (dvzrv) - Monday, 21 February 2022, 15:15 GMT
@sulhan: It should have

I will rebuild qemu now in [testing] and then move it to [extra].
Comment by David Runge (dvzrv) - Monday, 21 February 2022, 16:20 GMT
The rebuild with 6.2.0-4 is now in [testing] (including debug package).