Ticket #9753 (closed defect: fixed)
Shared folders in Windows guest randomly getting ERROR_NOT_SUPPORTED error from CreateFile call
|Reported by:||khoffman||Owned by:|
Description (last modified by frank) (diff)
Inside of a guest VM running Windows 7 amd64 or Server 2008 R2 amd64, we are accessing shared folders via the \vboxsvr custom kernel mini redirector.
We have found that in rare cases an attempt to create a file (CreateFile Win32 API call) fails (returns an invalid handle) and GetLastError returns error 0x32 (decimal 50, ERROR_NOT_SUPPORTED). If you attempt to call CreateFile with exactly the same arguments, the next API call will succeed.
We have written a short test program that reproduces the problem. You first install Windows into a guest VM, install the guest tools, and then run the test program. The test program will enter an infinite loop where it attempts to create/delete the same file 2000 times and then pause for 5 seconds. The test program source/binary is attached. You run the test program like:
C:\TestVBoxFS.exe "\VBOXSVR\data\temp2.chk" > c:\test.log.txt
Also, we have found that if nothing accesses the \vboxsvr filesystem for about 10-15 minutes, and then we run our test application, the very first CreateFile call fails, but the remaining call fails. We have found this is the best way to reproduce this problem. However, if the filesystem is being accessed 24/7 we still see the CreateFile failure in about 1 out of every million CreateFile calls.
We've tried this on both Windows hosts and Solaris hosts and the error seen by the guest is the same. The ticket mentions 4.1.2 I believe we have reproduced this on 4.1.4 as well.
In general we've found the shared folder mechanism to be both reliable and fast for basic file I/O (e.g., 500 MB/sec), but the random CreateFile failures is impacting the reliability of applications using the shared folder filesystem.
Thanks a lot for your time and consideration.