Activity log for bug #1877688

Date Who What changed Old value New value Message
2020-05-09 00:05:23 A A bug added bug
2020-05-09 00:27:21 A A 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=vmtap0,id=vn0,script=no,downscript=no -device virtio-net-pci,netdev=vn0 -kernel kernel.img -drive file=file.img,format=raw,if=virtio -virtfs local,path=mnt,mount_tag=host0,security_model=passthrough,id=host0 -append "console=ttyS0 root=/dev/vda rw" There's nothing relevant in the guest kernel logs as far as I'm aware of with loglevel set to 7. 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=vmtap0,id=vn0,script=no,downscript=no -device virtio-net-pci,netdev=vn0 -kernel kernel.img -drive file=file.img,format=raw,if=virtio -virtfs local,path=mnt,mount_tag=host0,security_model=passthrough,id=host0 -append "console=ttyS0 root=/dev/vda rw" There's nothing relevant in the guest kernel logs as far as I'm aware of with loglevel set to 7. Aha, I found the cursed file. See this strace log: openat(AT_FDCWD, "/home/user/.local/share/nvim/shada/main.shada", O_RDONLY|O_CLOEXEC) = 25 mmap(NULL, 880640, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f3ab8427000 mmap(NULL, 880640, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f3ab8350000 mmap(NULL, 880640, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f3ab8279000 mmap(NULL, 880640, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f3ab81a2000 mmap(NULL, 880640, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f3ab80cb000 readv(25,
2020-05-09 01:41:55 A A 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=vmtap0,id=vn0,script=no,downscript=no -device virtio-net-pci,netdev=vn0 -kernel kernel.img -drive file=file.img,format=raw,if=virtio -virtfs local,path=mnt,mount_tag=host0,security_model=passthrough,id=host0 -append "console=ttyS0 root=/dev/vda rw" There's nothing relevant in the guest kernel logs as far as I'm aware of with loglevel set to 7. Aha, I found the cursed file. See this strace log: openat(AT_FDCWD, "/home/user/.local/share/nvim/shada/main.shada", O_RDONLY|O_CLOEXEC) = 25 mmap(NULL, 880640, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f3ab8427000 mmap(NULL, 880640, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f3ab8350000 mmap(NULL, 880640, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f3ab8279000 mmap(NULL, 880640, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f3ab81a2000 mmap(NULL, 880640, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f3ab80cb000 readv(25, 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=vmtap0,id=vn0,script=no,downscript=no -device virtio-net-pci,netdev=vn0 -kernel kernel.img -drive file=file.img,format=raw,if=virtio -virtfs local,path=mnt,mount_tag=host0,security_model=passthrough,id=host0 -append "console=ttyS0 root=/dev/vda rw" 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.
2020-05-09 01:42:43 A A attachment added readv.c https://bugs.launchpad.net/qemu/+bug/1877688/+attachment/5368749/+files/readv.c
2020-05-09 16:56:05 Christian Schoenebeck attachment added bug1877688_kvm_fix.patch https://bugs.launchpad.net/qemu/+bug/1877688/+attachment/5369130/+files/bug1877688_kvm_fix.patch
2020-05-09 16:58:58 Christian Schoenebeck qemu: status New In Progress
2020-05-09 16:59:17 Christian Schoenebeck qemu: assignee Christian Schoenebeck (schoenebeck)
2020-05-27 15:12:13 Christian Schoenebeck qemu: status In Progress Fix Committed
2020-08-15 11:36:31 Christian Schoenebeck qemu: status Fix Committed Fix Released