RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1967914 - [virtio-fs] virtiofsd quit when coping file to a folder in virtio-fs mounted volume(windows guest)
Summary: [virtio-fs] virtiofsd quit when coping file to a folder in virtio-fs mounted ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: qemu-kvm
Version: 8.5
Hardware: x86_64
OS: Windows
high
high
Target Milestone: beta
: ---
Assignee: Hanna Czenczek
QA Contact: xiagao
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-06-04 12:08 UTC by xiagao
Modified: 2021-12-07 22:45 UTC (History)
3 users (show)

Fixed In Version: qemu-kvm-4.2.0-53.module+el8.5.0+11673+72138537
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-11-09 18:01:39 UTC
Type: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2021:4191 0 None None None 2021-11-09 18:02:15 UTC

Description xiagao 2021-06-04 12:08:33 UTC
Description of problem:
Boot up win2019 guest with vhost-fs device,install winfsp and start virtiofs service in guest.
Create a folder and a file in the shared volume,then copy file to the folder via 'copy' command, copy action is hang and virtiofsd in host quit.


Version-Release number of selected component (if applicable):
host:
kernel-4.18.0-310.el8.x86_64
qemu-kvm-4.2.0-51.module+el8.5.0+11141+9dff516f.x86_64
seabios-bin-1.13.0-2.module+el8.3.0+7353+9de0a3cc.noarch
virtio-win-prewhql-199
RHEL-8.5.0-20210531.n.0
winfsp-1.7.20172.msi

guest:
win2019

How reproducible:
100%

Steps to Reproduce:
1.Boot up winows guest with virtio fs device.
# /usr/libexec/virtiofsd --socket-path=/tmp/socket2 -o source=/home/test2 -o cache=auto  -d

qemu cmd line:
    -m 4096 \
    -object memory-backend-file,size=4G,mem-path=/dev/shm,share=yes,id=mem-mem1  \
    -smp 10,maxcpus=20,cores=10,threads=1,dies=1,sockets=2  \
    -numa node,memdev=mem-mem1,nodeid=0  \
    -chardev socket,id=char_virtiofs_fs2,path=/tmp/socket2 \
    -device vhost-user-fs-pci,id=vufs_virtiofs_fs2,chardev=char_virtiofs_fs2,tag=myfs2,queue-size=1024,bus=pcie.0,addr=0x4 \


2.install winfsp and start virtiofs.exe in guest and get Z: volume

3.create a file and folder,then copy file to the folder via 'copy' command.
dd if=/dev/random of=Z:/fs_test bs=1M count=200
md Z:\test_folder
copy Z:\fs_test Z:\test_folder

Actual results:
Hang during copy file to folder in Z: volume, and can't cancel the copy action.
virtiofsd quit.

Expected results:
Copy successfully

Additional info:
1. virtiofsd log:
....
[289057727970151] [ID: 00509398] virtio_session_mount: Waiting for vhost-user socket connection...
[276746003088231] [ID: 00000056] virtio_send_msg: elem 0: with 1 in desc of length 32
[276746005678896] [ID: 00000002] fv_queue_thread: Got queue event on Queue 0
[276746005718962] [ID: 00000002] fv_queue_thread: Queue 0 gave evalue: 1 available: in: 120 out: 128
[276746005753100] [ID: 00000002] fv_queue_thread: Waiting for Queue 0 event
[276746005771484] [ID: 00000006] fv_queue_worker: elem 0: with 1 out desc of length 128
[276746005805495] [ID: 00000006] unique: 1775, opcode: SETATTR (4), nodeid: 11, insize: 128, pid: 4228
[root@hp-dl580g8-01 home]# 

2. virtiofs.exe log
.....
*** Open: "\test_folder\file.txt" CreateOptions: 0x01200020 GrantedAccess: 0x00100100
*** VirtFsFuseRequest: >>req: 1 unique: 1772 len: 52
*** VirtFsFuseRequest: <<len: 144 error: 0 unique: 1772
*** SubmitLookupRequest: nodeid=8 ino=503318341 size=37 blocks=0 atime=1622794256 mtime=1622794300 ctime=1622794300 atimensec=204151588 mtimensec=299693863 ctimensec=299693863 mode=41fd nlink=2 uid=0 gid=0 rdev=0 blksize=4096
*** VirtFsFuseRequest: >>req: 1 unique: 1773 len: 49
*** VirtFsFuseRequest: <<len: 144 error: 0 unique: 1773
*** SubmitLookupRequest: nodeid=11 ino=503318343 size=0 blocks=0 atime=1622794300 mtime=1622794283 ctime=1622794300 atimensec=299693863 mtimensec=716865900 ctimensec=322693624 mode=81b4 nlink=1 uid=0 gid=0 rdev=0 blksize=4096
*** VirtFsFuseRequest: >>req: 14 unique: 1774 len: 48
*** VirtFsFuseRequest: <<len: 32 error: 0 unique: 1774
*** SetFileInfo: ino=503318343 size=0 blocks=0 atime=1622794300 mtime=1622794283 ctime=1622794300 atimensec=299693863 mtimensec=716865900 ctimensec=322693624 mode=81b4 nlink=1 uid=0 gid=0 rdev=0 blksize=4096
virtiofs[TID=0f60]: FFFFE08B7505CE50: <<Create IoStatus=0[1] UserContext=0000000000000000:00000203B1BEBC00, GrantedAccess=100100, FileInfo={FileAttributes=20, ReparseTag=0, AllocationSize=0:0, FileSize=0:0, CreationTime=2021-06-04T08:11:40.322Z, LastAccessTime=2021-06-04T08:11:40.299Z, LastWriteTime=2021-06-04T08:11:23.716Z, ChangeTime=2021-06-04T08:11:23.716Z, IndexNumber=0:0}
virtiofs[TID=0f60]: FFFFE08B75678E50: >>SetInformation [Basic] 0000000000000000:00000203B1BEBC00, FileAttributes=20, CreationTime=0, LastAccessTime=0, LastWriteTime=0
*** SetBasicInfo: fh: 1 nodeid: 11
*** VirtFsFuseRequest: >>req: 4 unique: 1775 len: 128
virtiofs[TID=1204]: FFFFE08B75684E50: >>Create [UTB--C] "\test_folder\file.txt", FILE_OPEN, CreateOptions=214040, FileAttributes=0, Security=NULL, AllocationSize=0:0, AccessToken=0000000000000340[PID=b54], DesiredAccess=0, GrantedAccess=80, ShareAccess=7
*** GetSecurityByName: "\test_folder\file.txt"
*** VirtFsFuseRequest: >>req: 1 unique: 1776 len: 52
virtiofs[TID=1210]: FFFFE08B757C2E50: >>Create [UT---C] "\", FILE_OPEN, CreateOptions=21, FileAttributes=10, Security=NULL, AllocationSize=0:0, AccessToken=0000000000000334[PID=109c], DesiredAccess=100000, GrantedAccess=0, ShareAccess=3
*** GetSecurityByName: "\"
*** VirtFsFuseRequest: >>req: 1 unique: 1777 len: 42
virtiofs[TID=120c]: FFFFE08B757C0E50: >>Create [UT---C] "\", FILE_OPEN, CreateOptions=200000, FileAttributes=0, Security=NULL, AllocationSize=0:0, AccessToken=000000000000033C[PID=109c], DesiredAccess=80, GrantedAccess=0, ShareAccess=7
*** GetSecurityByName: "\"
*** VirtFsFuseRequest: >>req: 1 unique: 1778 len: 42
virtiofs[TID=1194]: FFFFE08B7506CE50: >>Create [UT---C] "\", FILE_OPEN, CreateOptions=21, FileAttributes=10, Security=NULL, AllocationSize=0:0, AccessToken=0000000000000300[PID=109c], DesiredAccess=100000, GrantedAccess=0, ShareAccess=3
*** GetSecurityByName: "\"
*** VirtFsFuseRequest: >>req: 1 unique: 1779 len: 42
virtiofs[TID=0b0c]: FFFFE08B73DF8E50: >>Create [UT---C] "\", FILE_OPEN, CreateOptions=800021, FileAttributes=10, Security=NULL, AllocationSize=0:0, AccessToken=00000000000002F8[PID=109c], DesiredAccess=100000, GrantedAccess=0, ShareAccess=0
*** GetSecurityByName: "\"
*** VirtFsFuseRequest: >>req: 1 unique: 1780 len: 42
virtiofs[TID=0d5c]: FFFFE08B75006E50: >>Create [UT---C] "\", FILE_OPEN, CreateOptions=21, FileAttributes=10, Security=NULL, AllocationSize=0:0, AccessToken=00000000000002F4[PID=109c], DesiredAccess=100000, GrantedAccess=0, ShareAccess=3
*** GetSecurityByName: "\"
*** VirtFsFuseRequest: >>req: 1 unique: 1781 len: 42
virtiofs[TID=0ae8]: FFFFE08B75060E50: >>Create [UT---C] "\", FILE_OPEN, CreateOptions=800021, FileAttributes=10, Security=NULL, AllocationSize=0:0, AccessToken=00000000000002F0[PID=109c], DesiredAccess=100000, GrantedAccess=0, ShareAccess=0
*** GetSecurityByName: "\"
*** VirtFsFuseRequest: >>req: 1 unique: 1782 len: 42

3. could not hit this issue on RHEL8.5.0 fast train
pkg:
kernel-4.18.0-310.el8.x86_64
qemu-kvm-6.0.0-17.module+el8.5.0+11173+c9fce0bb.x86_64

Comment 1 Klaus Heinrich Kiwi 2021-06-08 18:50:07 UTC
Max,

 is this something you can have a look on?

Comment 2 Hanna Czenczek 2021-06-09 07:31:03 UTC
I don’t know, to be honest I have never run Windows inside qemu ever so far.  I don’t even know where I’d get a Windows guest.

The only thing that comes to my mind is that perhaps something wasn’t in our seccomp allowlist that should be there.  I do remember 63659fe74e76f5c5285466f0c5cfbdca65b3688e adding fchmod() to the seccomp list, which could be invoked from SETATTR.

Comment 3 Hanna Czenczek 2021-06-09 08:07:19 UTC
Could you perhaps test for me whether the packages from https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=37332956 fix the problem?

Comment 4 Klaus Heinrich Kiwi 2021-06-15 15:43:19 UTC
(In reply to Max Reitz from comment #3)
> Could you perhaps test for me whether the packages from
> https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=37332956 fix the
> problem?

Xia Gao,

 any updates?

Comment 5 xiagao 2021-06-16 02:34:32 UTC
(In reply to Klaus Heinrich Kiwi from comment #4)
> (In reply to Max Reitz from comment #3)
> > Could you perhaps test for me whether the packages from
> > https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=37332956 fix the
> > problem?
> 
> Xia Gao,
> 
>  any updates?

Sorry to reply late as I'm PTO and have some holiday.

Yes, it works with https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=37332956.

qemu-kvm version:
qemu-kvm-4.2.0-51.module+el8.5.0+10875+d90dbc7e.hreitz202106090942.x86_64

Comment 6 Hanna Czenczek 2021-06-16 07:32:51 UTC
(In reply to xiagao from comment #5)
> Yes, it works with
> https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=37332956.
> 
> qemu-kvm version:
> qemu-kvm-4.2.0-51.module+el8.5.0+10875+d90dbc7e.hreitz202106090942.x86_64

Great, thanks!

Comment 11 xiagao 2021-07-05 01:25:27 UTC
Test pass with qemu-kvm-4.2.0-53.module+el8.5.0+11673+72138537.x86_64
Change status to verify.

Comment 12 Yanan Fu 2021-07-05 02:06:04 UTC
QE bot(pre verify): Set 'Verified:Tested,SanityOnly' as gating/tier1 test pass.

Comment 13 xiagao 2021-07-05 02:38:06 UTC
Verified with qemu-kvm-4.2.0-53.module+el8.5.0+11673+72138537.x86_64 according to comment0
remove SanityOnly flag.

Comment 15 errata-xmlrpc 2021-11-09 18:01:39 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 (Moderate: virt:rhel and virt-devel:rhel security, 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/RHSA-2021:4191


Note You need to log in before you can comment on or make changes to this bug.