-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NFS race condition with locked files (Windows 10) #108
Comments
Ok, there seems to be definitively an issue with winnfsd. |
Hey, i'using phpstorm too and do not experience this problem. I'll try to look into it. |
Do you have files which are changed from inside vagrant? My temporary workaround: when the issue occurs, i execute a simple php script which just deletes these temporary files. Then the nfs service seems to update the local cached filesystem structure and the file can be created again using file_put_contents. Just for backreference, i also added a comment in the winnfs project: winnfsd/winnfsd#32 My assumption is, that in the ProcedureWrite (https://github.com/winnfsd/winnfsd/blob/master/src/NFS3Prog.cpp#L712) the cached file system information should be updated. Otherwise write requests only process cached information and the method throws an access error. Unfortunately this would reduce data throughput a little bit, but it would be more reliable as the filesystem information is not provided from cached information. |
Source of the main issue is found: But we still have sometimes (approximatly 2 times a day) in combination with PHPstorm. It's now handleable for us, but it would be great to also fix this bug, therefore i keep this ticket open. |
@dev-rke Thanks for mentioning the Windows Defender. Helped me solve a problem with Might be related to #104 and composer/composer#5707 |
Hi, i am glad, that you were able to reproduce the issue. :-D |
Hi,
we found out, that re-indexing files using PHPStorm might let the NFS service freeze for a specific file. This seems to be like a race condition, because sometimes it works for multiple hours, sometimes it dies suddenly after vagrant up.
We have a cache directory in our application for generated files and when PHP is writing to these files, it seems that PHPStorm is indexing this file, so it is reading from this file.
Therefore i assume (!) that PHPStorm sets an exclusive lock to this file, and this causes the NFS service to fail. Furthermore the service isn't able to write/read from this file again.
When we set the folder exclusion in PHPStorm for the cache folder (Right click the file/folder, Mark directory as excluded), the issue seems to be gone, but we need to do further testing to ensure this.
Might it be, that the NFS service generally dies, when an exclusive lock to a file exists?
Update:
It is not totally fixed, but we can work now for several hours. We also try now to disable Windows firewall and exclude Windows Defender and Microsoft Security Essentials from watching this cache folder.
Has anybody else issues with Windows 10?
Maybe this also refers to #104, whereas our cache folder is written by the PHP function "file_put_contents".
Environment:
Windows 10
PHPStorm 2017.1.3
vagrant 1.9.3
The text was updated successfully, but these errors were encountered: