9p virtfs device reports error when opening certain files
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
QEMU |
Fix Released
|
Undecided
|
Christian Schoenebeck |
Bug Description
Reading certain files on a 9p mounted FS produces this error message:
qemu-system-x86_64: VirtFS reply type 117 needs 12 bytes, buffer has 12, less than minimum
After this error message is generated, further accesses to the 9p FS hangs whatever tries to access it. The Arch Linux guest system is otherwise usable. This happens with QEMU 5.0.0 and guest kernel version 5.6.11, hosted on an Arch Linux distro. I use the following command to launch QEMU:
exec qemu-system-x86_64 -enable-kvm -display gtk -vga virtio -cpu host -m 4G -netdev tap,ifname=
There's nothing relevant in the guest kernel logs as far as I'm aware of with loglevel set to 7.
I tracked down the issue to readv() with a small buffer(<=12 bytes) and then a large buffer(>= 1024 bytes). A C program is provided to trigger this behavior.
Here's a C program to trigger this behavior. I don't think it matters what the contents of "file" or its size is.