Bug 1873911

Summary: [virtio-win][virtio-fs] can't delete folder in shared dir from guest side ( windows guest)
Product: Red Hat Enterprise Linux 8 Reporter: xiagao
Component: virtio-winAssignee: Gal Hammer <ghammer>
virtio-win sub component: virtio-win-prewhql QA Contact: xiagao
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: medium CC: ghammer, kanderso, lijin, mdean, menli, vrozenfe
Version: 8.3   
Target Milestone: rc   
Target Release: 8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-02-16 14:24:38 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
virtiofsd log
none
virtiofs exe log none

Description xiagao 2020-08-31 02:24:40 UTC
Description of problem:
as $subject

Version-Release number of selected component (if applicable):
qemu-kvm-5.1.0-2.module+el8.3.0+7652+b30e6901.x86_64
kernel-4.18.0-232.el8.x86_64
seabios-1.14.0-1.module+el8.3.0+7638+07cf13d2.x86_64
virtio-win-prewhql-189

How reproducible:
100%

Steps to Reproduce:
Steps to Reproduce:
1. start virtiofsd daemon on host
#/usr/libexec/virtiofsd --socket-path=/tmp/vhostqemu2 -o source=/home/virtiofs_test3 -o cache=always -d

2. boot up windows guest with virtiofs device.
-m 4096 \
-object memory-backend-file,id=mem,size=4G,mem-path=/dev/shm112,share=on \
-numa node,memdev=mem \
-chardev socket,id=char0,path=/tmp/vhostqemu2 \
-device vhost-user-fs-pci,chardev=char0,tag=myfs2,bus=pci.7 \

3. install winfsp tool and virtiofs driver in guest
4. copy winfsp-x86.dll(winfsp program provided) and virtiofs.exe to the same dir
5. run virtiofs.exe in the dir.
virtiofs.exe -d -1 -D -
6. create a folder shared dir(Z:),and delete it,then refresh Z:


Actual results:
The folder can't be deleted from guest and host.

Expected results:
Folder can be deleted.

Additional info:
Folder can be deleted in linux guest

Comment 3 xiagao 2020-08-31 03:02:55 UTC
(In reply to xiagao from comment #0)
> Description of problem:
> as $subject
> 
> Version-Release number of selected component (if applicable):
> qemu-kvm-5.1.0-2.module+el8.3.0+7652+b30e6901.x86_64
> kernel-4.18.0-232.el8.x86_64
> seabios-1.14.0-1.module+el8.3.0+7638+07cf13d2.x86_64
> virtio-win-prewhql-189
> 
> How reproducible:
> 100%
> 
> Steps to Reproduce:
> Steps to Reproduce:
> 1. start virtiofsd daemon on host
> #/usr/libexec/virtiofsd --socket-path=/tmp/vhostqemu2 -o
> source=/home/virtiofs_test3 -o cache=always -d
> 
> 2. boot up windows guest with virtiofs device.
> -m 4096 \
> -object memory-backend-file,id=mem,size=4G,mem-path=/dev/shm112,share=on \
> -numa node,memdev=mem \
> -chardev socket,id=char0,path=/tmp/vhostqemu2 \
> -device vhost-user-fs-pci,chardev=char0,tag=myfs2,bus=pci.7 \
> 
> 3. install winfsp tool and virtiofs driver in guest
> 4. copy winfsp-x86.dll(winfsp program provided) and virtiofs.exe to the same
> dir
> 5. run virtiofs.exe in the dir.
> virtiofs.exe -d -1 -D -
> 6. create a folder shared dir(Z:),and delete it,then refresh Z:
> 
> 
> Actual results:
> The folder can't be deleted from guest and host.

Sorry,I make a wrong description.
Actually, the folder can't be deleted from guest. It can be deleted from host.



> 
> Expected results:
> Folder can be deleted.
> 
> Additional info:
> Folder can be deleted in linux guest

Comment 4 xiagao 2020-08-31 03:08:00 UTC
I would like to delete 'test blocker' from comment 3.

Comment 5 Gal Hammer 2020-08-31 07:11:03 UTC
(In reply to xiagao from comment #0)

> Steps to Reproduce:

> 4. copy winfsp-x86.dll(winfsp program provided) and virtiofs.exe to the same
> dir

This is no longer required.

> 5. run virtiofs.exe in the dir.
> virtiofs.exe -d -1 -D -
> 6. create a folder shared dir(Z:),and delete it,then refresh Z:

How did you create and delete the dir? What error did you see?

I'm unable to reproduce it and I can create and delete a directory from both command line and Windows explorer.
 
> Actual results:
> The folder can't be deleted from guest and host.
> 
> Expected results:
> Folder can be deleted.
> 
> Additional info:
> Folder can be deleted in linux guest

Can you please attach virtiofs.exe and virtiofsd log files?

Comment 6 xiagao 2020-08-31 12:13:44 UTC
(In reply to Gal Hammer from comment #5)
> (In reply to xiagao from comment #0)
> 
> > Steps to Reproduce:
> 
> > 4. copy winfsp-x86.dll(winfsp program provided) and virtiofs.exe to the same
> > dir
> 
> This is no longer required.
Ok.

> 
> > 5. run virtiofs.exe in the dir.
> > virtiofs.exe -d -1 -D -
> > 6. create a folder shared dir(Z:),and delete it,then refresh Z:
> 
> How did you create and delete the dir? What error did you see?
> 
I copy a folder to z: and delete it from Windows explorer.
No error is shown.

> I'm unable to reproduce it and I can create and delete a directory from both
> command line and Windows explorer.
>  
> > Actual results:
> > The folder can't be deleted from guest and host.
> > 
> > Expected results:
> > Folder can be deleted.
> > 
> > Additional info:
> > Folder can be deleted in linux guest
> 
> Can you please attach virtiofs.exe and virtiofsd log files?
See the attachment.

Comment 7 xiagao 2020-08-31 12:14:28 UTC
Created attachment 1713142 [details]
virtiofsd log

Comment 8 xiagao 2020-08-31 12:15:12 UTC
Created attachment 1713143 [details]
virtiofs exe log

Comment 17 Vadim Rozenfeld 2020-11-12 05:06:31 UTC
should be fixed in build 190
https://brewweb.engineering.redhat.com/brew/buildinfo?buildID=1383208

Comment 18 menli@redhat.com 2020-11-13 06:17:03 UTC
 Reproduce with virtio-win-prewhql-189 version(steps same as comment#0)

Test with  build 190
I happened to copy a dir with fifo type file to the shared dir on host then try to delete it on windows guest, the windows guest always stuck.

[root@dell-per440-06 aexpect_6tlnzCob]# ls
ctrlpipe  inpipe  lock-client-starting  lock-server-running  outpipe-expect  outpipe-tail  output  server-log  shell-pid  status
[root@dell-per440-06 aexpect_6tlnzCob]# file -b ctrlpipe 
fifo (named pipe)
[root@dell-per440-06 aexpect_6tlnzCob]# 



Addtional info:
files can deleted successfuly without fifo type file.


Thanks
Menghuan

Comment 19 Gal Hammer 2020-11-15 05:57:45 UTC
(In reply to menli from comment #18)
>  Reproduce with virtio-win-prewhql-189 version(steps same as comment#0)
> 
> Test with  build 190
> I happened to copy a dir with fifo type file to the shared dir on host then
> try to delete it on windows guest, the windows guest always stuck.

What is a fifo type file? and how do I create one? Thanks.
 
> [root@dell-per440-06 aexpect_6tlnzCob]# ls
> ctrlpipe  inpipe  lock-client-starting  lock-server-running  outpipe-expect 
> outpipe-tail  output  server-log  shell-pid  status
> [root@dell-per440-06 aexpect_6tlnzCob]# file -b ctrlpipe 
> fifo (named pipe)
> [root@dell-per440-06 aexpect_6tlnzCob]# 
> 
> 
> 
> Addtional info:
> files can deleted successfuly without fifo type file.
> 
> 
> Thanks
> Menghuan

Comment 21 menli@redhat.com 2020-11-15 11:20:00 UTC
FIFO files are also commonly as named pipes. A named pipe is a special type of file that exists as a file name in the file system.

you can see it in path /tmp/aexpect_kn9bJbNR  on host 10.73.72.181:


[root@dell-per730-48 aexpect_kn9bJbNR]# pwd
/tmp/aexpect_kn9bJbNR
[root@dell-per730-48 aexpect_kn9bJbNR]# ls
ctrlpipe  inpipe  lock-client-starting  lock-server-running  outpipe-tail  output  server-log  shell-pid
[root@dell-per730-48 aexpect_kn9bJbNR]# file -b outpipe-tail
fifo (named pipe)
[root@dell-per730-48 aexpect_kn9bJbNR]#

Comment 22 Gal Hammer 2020-11-17 07:31:43 UTC
(In reply to menli from comment #21)
> FIFO files are also commonly as named pipes. A named pipe is a special type
> of file that exists as a file name in the file system.

Thanks for the clarification.

> you can see it in path /tmp/aexpect_kn9bJbNR  on host 10.73.72.181:
> 
> 
> [root@dell-per730-48 aexpect_kn9bJbNR]# pwd
> /tmp/aexpect_kn9bJbNR
> [root@dell-per730-48 aexpect_kn9bJbNR]# ls
> ctrlpipe  inpipe  lock-client-starting  lock-server-running  outpipe-tail 
> output  server-log  shell-pid
> [root@dell-per730-48 aexpect_kn9bJbNR]# file -b outpipe-tail
> fifo (named pipe)
> [root@dell-per730-48 aexpect_kn9bJbNR]#

Can you please try to verify the fix with a folder without special type of files? Supporting these type is probably a feature rather than a bug related to deleting a folder.

Thanks again, Gal.

Comment 23 menli@redhat.com 2020-11-17 07:40:57 UTC
Reproduce with virtio-win-prewhql-189 version(steps same as comment#0)

Test with  build 190 (test with a folder without special type of files described as comment 21), the folder can be deleted successfully.

So this issue is fixed, change status to verified according to comment 22.


Thanks
Menghuan

Comment 26 errata-xmlrpc 2021-02-16 14:24:38 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/RHEA-2021:0535