* [Bug 1877688] Re: 9p virtfs device reports error when opening certain files
2020-05-09 0:05 [Bug 1877688] [NEW] 9p virtfs device reports error when opening certain files A A
@ 2020-05-09 0:27 ` A A
2020-05-09 1:42 ` A A
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: A A @ 2020-05-09 0:27 UTC (permalink / raw)
To: qemu-devel
** Description changed:
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,
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1877688
Title:
9p virtfs device reports error when opening certain files
Status in QEMU:
New
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=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,
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1877688/+subscriptions
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug 1877688] Re: 9p virtfs device reports error when opening certain files
2020-05-09 0:05 [Bug 1877688] [NEW] 9p virtfs device reports error when opening certain files A A
2020-05-09 0:27 ` [Bug 1877688] " A A
@ 2020-05-09 1:42 ` A A
2020-05-09 14:39 ` Christian Schoenebeck
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: A A @ 2020-05-09 1:42 UTC (permalink / raw)
To: qemu-devel
Here's a C program to trigger this behavior. I don't think it matters
what the contents of "file" or its size is.
** Description changed:
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,
+ 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.
** Attachment added: "readv.c"
https://bugs.launchpad.net/qemu/+bug/1877688/+attachment/5368749/+files/readv.c
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1877688
Title:
9p virtfs device reports error when opening certain files
Status in QEMU:
New
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=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.
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1877688/+subscriptions
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug 1877688] Re: 9p virtfs device reports error when opening certain files
2020-05-09 0:05 [Bug 1877688] [NEW] 9p virtfs device reports error when opening certain files A A
2020-05-09 0:27 ` [Bug 1877688] " A A
2020-05-09 1:42 ` A A
@ 2020-05-09 14:39 ` Christian Schoenebeck
2020-05-09 16:56 ` Christian Schoenebeck
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Christian Schoenebeck @ 2020-05-09 14:39 UTC (permalink / raw)
To: qemu-devel
Looks like being introduced by this change:
https://patchwork.kernel.org/patch/11319993/
More specifically this one exactly:
- if (buf_size < size) {
+ if (buf_size < P9_IOHDRSZ) {
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1877688
Title:
9p virtfs device reports error when opening certain files
Status in QEMU:
New
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=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.
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1877688/+subscriptions
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug 1877688] Re: 9p virtfs device reports error when opening certain files
2020-05-09 0:05 [Bug 1877688] [NEW] 9p virtfs device reports error when opening certain files A A
` (2 preceding siblings ...)
2020-05-09 14:39 ` Christian Schoenebeck
@ 2020-05-09 16:56 ` Christian Schoenebeck
2020-05-09 19:13 ` A A
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Christian Schoenebeck @ 2020-05-09 16:56 UTC (permalink / raw)
To: qemu-devel
The following patch should fix this bug for the kvm backend (not for the
XEN backend yet).
Please let me know if it fixes this bug for you.
** Patch added: "bug1877688_kvm_fix.patch"
https://bugs.launchpad.net/qemu/+bug/1877688/+attachment/5369130/+files/bug1877688_kvm_fix.patch
** Changed in: qemu
Status: New => In Progress
** Changed in: qemu
Assignee: (unassigned) => Christian Schoenebeck (schoenebeck)
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1877688
Title:
9p virtfs device reports error when opening certain files
Status in QEMU:
In Progress
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=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.
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1877688/+subscriptions
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug 1877688] Re: 9p virtfs device reports error when opening certain files
2020-05-09 0:05 [Bug 1877688] [NEW] 9p virtfs device reports error when opening certain files A A
` (3 preceding siblings ...)
2020-05-09 16:56 ` Christian Schoenebeck
@ 2020-05-09 19:13 ` A A
2020-05-27 15:11 ` Christian Schoenebeck
2020-08-15 11:36 ` Christian Schoenebeck
6 siblings, 0 replies; 8+ messages in thread
From: A A @ 2020-05-09 19:13 UTC (permalink / raw)
To: qemu-devel
Thanks, it works.
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1877688
Title:
9p virtfs device reports error when opening certain files
Status in QEMU:
In Progress
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=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.
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1877688/+subscriptions
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug 1877688] Re: 9p virtfs device reports error when opening certain files
2020-05-09 0:05 [Bug 1877688] [NEW] 9p virtfs device reports error when opening certain files A A
` (4 preceding siblings ...)
2020-05-09 19:13 ` A A
@ 2020-05-27 15:11 ` Christian Schoenebeck
2020-08-15 11:36 ` Christian Schoenebeck
6 siblings, 0 replies; 8+ messages in thread
From: Christian Schoenebeck @ 2020-05-27 15:11 UTC (permalink / raw)
To: qemu-devel
Fix is now committed on master as SHA-1 cf45183b718f02b1369e18c795dc51bc1821245d, which actually just reverted the mentioned commit that was leading to this broken behavior:
https://github.com/qemu/qemu/commit/cf45183b718f02b1369e18c795dc51bc1821245d
The original Xen transport bug that motivated that change, was now fixed differently by handling that Xen issue solely on Xen transport driver side:
https://github.com/qemu/qemu/commit/a4c4d462729466c4756bac8a0a8d77eb63b21ef7
** Changed in: qemu
Status: In Progress => Fix Committed
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1877688
Title:
9p virtfs device reports error when opening certain files
Status in QEMU:
Fix Committed
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=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.
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1877688/+subscriptions
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug 1877688] Re: 9p virtfs device reports error when opening certain files
2020-05-09 0:05 [Bug 1877688] [NEW] 9p virtfs device reports error when opening certain files A A
` (5 preceding siblings ...)
2020-05-27 15:11 ` Christian Schoenebeck
@ 2020-08-15 11:36 ` Christian Schoenebeck
6 siblings, 0 replies; 8+ messages in thread
From: Christian Schoenebeck @ 2020-08-15 11:36 UTC (permalink / raw)
To: qemu-devel
Fixed in QEMU 5.1 release.
** Changed in: qemu
Status: Fix Committed => Fix Released
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1877688
Title:
9p virtfs device reports error when opening certain files
Status in QEMU:
Fix Released
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=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.
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1877688/+subscriptions
^ permalink raw reply [flat|nested] 8+ messages in thread