Bug 2024518

Summary: [virtiofs] virtio.exe quit during running iozone test on the shared directory on windows vm
Product: Red Hat Enterprise Linux 9 Reporter: xiagao
Component: virtio-winAssignee: Viktor Prutyanov <vprutyan>
virtio-win sub component: virtio-win-prewhql QA Contact: xiagao
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: medium CC: yvugenfi
Version: 9.0Keywords: Triaged
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Windows   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-11-15 10:45:57 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description xiagao 2021-11-18 08:58:33 UTC
Description of problem:
virtio.exe quit during running iozone test on the shared directory
iozone.exe -az -g 1g -y 32k -i 0 -i  1 -f Z:\zzz -b C:\yyy

Version-Release number of selected component (if applicable):
qemu-kvm-6.1.0-6.el9.x86_64
kernel-5.14.0-5.el9.x86_64
winfsp1.7.20172
virtio-win-prewhql-0.1-214

How reproducible:
100%

Steps to Reproduce:
1.start virtiofsd on host
# /usr/libexec/virtiofsd --socket-path=/tmp/sock1 -o source=/home/test,cache=none
2.boot up win2019 guest with virtiofs device
-chardev socket,id=char0,path=/tmp/sock1 \
-device vhost-user-fs-pci,chardev=char0,tag=myfs_11,bus=pci.11,queue-size=1024,id=dev_virtiofs_fs \
-object memory-backend-file,id=mem,size=4G,mem-path=/dev/shm,share=on \
-numa node,memdev=mem \


3.install winfsp and virtiofs driver on guest

4.submit iozone test.
C:\Program Files (x86)\Benchmarks\Iozone3_414>iozone.exe -az -g 1g -y 32k -i 0 -i  1 -f Z:\zzz -b C:\yyy

Actual results:
1)iozone fail
            4096     256   55691   57316    83605    86866                                                              
            4096     512   87909   82914   125441   137321                                                              
            4096    1024  112109  116315   158892   154755                                                              
            4096    2048  123702  123650   219642   224457                                                              
            4096    4096  119555  127790
Error reading block 0 fed00000
read: Permission denied

2)virtiofs.exe quit on guest.
*** Read: BytesTransferred: 32768
virtiofs[TID=0a54]: FFFFE68B19620E50: <<Read IoStatus=0[32768]
virtiofs[TID=0a54]: FFFFE68B168ECE50: >>Read 0000000000000000:000001B452C07BF0, Address=000001B452BB0000, Offset=0:f000, Length=32768, Key=0
*** Read: Offset: 61440 Length: 32768
*** Read: fh: 21 nodeid: 342
*** VirtFsFuseRequest: >>req: 15 unique: 9119 len: 32808
*** VirtFsFuseRequest: <<len: 32784 error: 0 unique: 9119
*** Read: BytesTransferred: 32768
virtiofs[TID=0a54]: FFFFE68B168ECE50: <<Read IoStatus=0[32768]
virtiofs[TID=0a54]: FFFFE68B16818E50: >>Read 0000000000000000:000001B452C07BF0, Address=000001B4549A0000, Offset=0:0, Length=4194304, Key=0
*** Read: Offset: 0 Length: 4194304
*** Read: fh: 21 nodeid: 342
*** VirtFsFuseRequest: >>req: 15 unique: 9120 len: 4194344
*** VirtFsFuseRequest: <<len: 0 error: 0 unique: 0
*** VirtFsFuseRequest: Bytes Returned: 0 Expected: 4194320
virtiofs[TID=1038]: FFFFE68B18CAAE50: >>Create [UTB--C] "\zzz", FILE_OPEN, CreateOptions=214040, FileAttributes=0, Security=NULL, AllocationSize=0:0, AccessToken=0000000000000264[PID=a84], DesiredAccess=0, GrantedAccess=80, ShareAccess=7
*** GetSecurityByName: "\zzz"
*** VirtFsFuseRequest: >>req: 1 unique: 9121 len: 44
*** VirtFsFuseRequest: <<len: 144 error: 0 unique: 9121
*** SubmitLookupRequest: nodeid=342 ino=372181154 size=4194304 blocks=8192 atime=1637218574 mtime=1637218574 ctime=1637218574 atimensec=540630658 mtimensec=534630618 ctimensec=534630618 mode=81b4 nlink=1 uid=1000 gid=1000 rdev=0 blksize=4096
*** Open: "\zzz" CreateOptions: 0x01214040 GrantedAccess: 0x00000080
*** VirtFsFuseRequest: >>req: 1 unique: 9122 len: 44
*** VirtFsFuseRequest: <<len: 144 error: 0 unique: 9122
*** SubmitLookupRequest: nodeid=342 ino=372181154 size=4194304 blocks=8192 atime=1637218574 mtime=1637218574 ctime=1637218574 atimensec=540630658 mtimensec=534630618 ctimensec=534630618 mode=81b4 nlink=1 uid=1000 gid=1000 rdev=0 blksize=4096
*** VirtFsFuseRequest: >>req: 14 unique: 9123 len: 48
*** VirtFsFuseRequest: <<len: 32 error: 0 unique: 9123
*** SetFileInfo: ino=372181154 size=4194304 blocks=8192 atime=1637218574 mtime=1637218574 ctime=1637218574 atimensec=540630658 mtimensec=534630618 ctimensec=534630618 mode=81b4 nlink=1 uid=1000 gid=1000 rdev=0 blksize=4096
virtiofs[TID=1038]: FFFFE68B18CAAE50: <<Create IoStatus=0[1] UserContext=0000000000000000:000001B452C07EC0, GrantedAccess=80, FileInfo={FileAttributes=20, ReparseTag=0, AllocationSize=0:400000, FileSize=0:400000, CreationTime=2021-11-18T06:56:14.534Z, LastAccessTime=2021-11-18T06:56:14.540Z, LastWriteTime=2021-11-18T06:56:14.534Z, ChangeTime=2021-11-18T06:56:14.534Z, IndexNumber=0:0}
F:\viofs\2k19\amd64>


Expected results:
iozone success to read/write on shared dir.

Additional info:
1. virtiofsd log form host

[2021-11-18 06:59:19.653913+0000] [ID: 00000004] fv_queue_thread: Got queue event on Queue 0
[2021-11-18 06:59:19.653967+0000] [ID: 00000004] fv_queue_thread: Queue 0 gave evalue: 1 available: in: 80 out: 56
[2021-11-18 06:59:19.653989+0000] [ID: 00000004] fv_queue_worker: elem 0: with 1 out desc of length 56
[2021-11-18 06:59:19.654008+0000] [ID: 00000004] unique: 2, opcode: INIT (26), nodeid: 1, insize: 56, pid: 3864
[2021-11-18 06:59:19.654029+0000] [ID: 00000004] fuse_session_process_buf_int: reinit
[2021-11-18 06:59:19.660893+0000] [ID: 00000004] INIT: 7.31
[2021-11-18 06:59:19.660907+0000] [ID: 00000004] flags=0x00002000
[2021-11-18 06:59:19.660914+0000] [ID: 00000004] max_readahead=0x00000000
[2021-11-18 06:59:19.660920+0000] [ID: 00000004] lo_init: disabling readdirplus
[2021-11-18 06:59:19.660926+0000] [ID: 00000004] lo_init: disabling killpriv_v2
[2021-11-18 06:59:19.660936+0000] [ID: 00000004] lo_init: disabling posix_acl
[2021-11-18 06:59:19.660942+0000] [ID: 00000004]    INIT: 7.33
[2021-11-18 06:59:19.660947+0000] [ID: 00000004]    flags=0x00000020
[2021-11-18 06:59:19.660953+0000] [ID: 00000004]    max_readahead=0x00000000
[2021-11-18 06:59:19.660959+0000] [ID: 00000004]    max_write=0x00020000
[2021-11-18 06:59:19.660965+0000] [ID: 00000004]    max_background=0
[2021-11-18 06:59:19.660971+0000] [ID: 00000004]    congestion_threshold=0
[2021-11-18 06:59:19.660977+0000] [ID: 00000004]    time_gran=1
[2021-11-18 06:59:19.660983+0000] [ID: 00000004]    unique: 2, success, outsize: 80
[2021-11-18 06:59:19.660989+0000] [ID: 00000004] virtio_send_msg: elem 0: with 1 in desc of length 80
[2021-11-18 06:59:19.661008+0000] [ID: 00000004] fv_queue_thread: Waiting for Queue 0 event

2. linux guest works with similar cmd
# /home/iozone_inst/src/current/iozone  -az -y 32k -g 1G -i 0 -i 1 -f /tmp/test

Comment 1 xiagao 2021-11-18 09:04:32 UTC
*** Bug 2024519 has been marked as a duplicate of this bug. ***

Comment 2 xiagao 2021-11-18 09:06:13 UTC
*** Bug 2024520 has been marked as a duplicate of this bug. ***

Comment 3 Viktor Prutyanov 2022-04-05 10:37:16 UTC
Upstream PR merged to fix this issue: https://github.com/virtio-win/kvm-guest-drivers-windows/pull/751

Comment 4 xiagao 2022-04-27 03:56:35 UTC
Test according to commen 0 inside Win2019 guest with virtio-win-prewhql-218,the result is pass.

Comment 7 errata-xmlrpc 2022-11-15 10:45:57 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (virtio-win bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2022:8261