winnfsd / vagrant-winnfsd

Manage and adds support for NFS for Vagrant on Windows.
Other
567 stars 62 forks source link

NFS freeze after failed write #87

Open alexsapran opened 8 years ago

alexsapran commented 8 years ago

Hi all,

In general i am trying to mount a directory from windows 10 host to coreos guest and after executing a command that writes files the guest freezes and i can no longer access the share folder. More details: The host source folder is mounted and after the initial vagrant up command i can ssh into the guest and see the files (for example with ls -la) but when i issue a composer install which will download php dependencies after a while it freeze, for example:

....
- Installing googleads/googleads-php-lib (5.2.3)
    Downloading: 100%

I have started the winnfsd with logging on and i see this

....
[18:20:6] NFS WRITE \\?\C:\Users\Alexandros\pph\pph\vendor\googleads\googleads-php-lib\.git\objects\pack\tmp_pack_JS9vD4  fail
....

I see alot of issues related to NFS WRITE fail.

Can you provide some more insights on the issue?

Alex.

marcharding commented 8 years ago

This should be fixed with v1.2.0. Give it a try.

alexsapran commented 8 years ago

Hi @marcharding ,

Unfortunately my issue remains, when i executing the composer install it start reading and writing to the directory and freezes. Here the output of the command and the NFS with logging.

command:

Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
  - Installing googleads/googleads-php-lib (5.2.3)
    Downloading: 100%

NFS logging:

[9:50:38] NFS ACCESS \\?\C:\Users\Alexandros\pph\pph\vendor\googleads\googleads-php-lib  OK
[9:50:38] NFS LOOKUP \\?\C:\Users\Alexandros\pph\pph\vendor\googleads\googleads-php-lib\5726d4a373bc0e764e7ee122ce7fc6fd  NOENT
[9:50:38] NFS CREATE \\?\C:\Users\Alexandros\pph\pph\vendor\googleads\googleads-php-lib\5726d4a373bc0e764e7ee122ce7fc6fd  OK
[9:50:38] NFS WRITE \\?\C:\Users\Alexandros\pph\pph\vendor\googleads\googleads-php-lib\5726d4a373bc0e764e7ee122ce7fc6fd  OK
[9:50:38] NFS WRITE \\?\C:\Users\Alexandros\pph\pph\vendor\googleads\googleads-php-lib\5726d4a373bc0e764e7ee122ce7fc6fd  OK
[9:50:38] NFS WRITE \\?\C:\Users\Alexandros\pph\pph\vendor\googleads\googleads-php-lib\5726d4a373bc0e764e7ee122ce7fc6fd  OK
[9:50:38] NFS WRITE \\?\C:\Users\Alexandros\pph\pph\vendor\googleads\googleads-php-lib\5726d4a373bc0e764e7ee122ce7fc6fd  OK
[9:50:38] NFS WRITE \\?\C:\Users\Alexandros\pph\pph\vendor\googleads\googleads-php-lib\5726d4a373bc0e764e7ee122ce7fc6fd  OK
[9:50:38] NFS WRITE \\?\C:\Users\Alexandros\pph\pph\vendor\googleads\googleads-php-lib\5726d4a373bc0e764e7ee122ce7fc6fd  OK
[9:50:38] NFS WRITE \\?\C:\Users\Alexandros\pph\pph\vendor\googleads\googleads-php-lib\5726d4a373bc0e764e7ee122ce7fc6fd  OK
[9:50:38] NFS WRITE \\?\C:\Users\Alexandros\pph\pph\vendor\googleads\googleads-php-lib\5726d4a373bc0e764e7ee122ce7fc6fd  OK
[9:50:38] NFS WRITE \\?\C:\Users\Alexandros\pph\pph\vendor\googleads\googleads-php-lib\5726d4a373bc0e764e7ee122ce7fc6fd  OK
[9:50:38] NFS WRITE \\?\C:\Users\Alexandros\pph\pph\vendor\googleads\googleads-php-lib\5726d4a373bc0e764e7ee122ce7fc6fd  OK
[9:50:38] NFS WRITE \\?\C:\Users\Alexandros\pph\pph\vendor\googleads\googleads-php-lib\5726d4a373bc0e764e7ee122ce7fc6fd  OK
[9:50:38] NFS WRITE \\?\C:\Users\Alexandros\pph\pph\vendor\googleads\googleads-php-lib\5726d4a373bc0e764e7ee122ce7fc6fd  OK
[9:50:38] NFS WRITE \\?\C:\Users\Alexandros\pph\pph\vendor\googleads\googleads-php-lib\5726d4a373bc0e764e7ee122ce7fc6fd  OK
[9:50:38] NFS WRITE \\?\C:\Users\Alexandros\pph\pph\vendor\googleads\googleads-php-lib\5726d4a373bc0e764e7ee122ce7fc6fd  OK
[9:50:38] NFS WRITE \\?\C:\Users\Alexandros\pph\pph\vendor\googleads\googleads-php-lib\5726d4a373bc0e764e7ee122ce7fc6fd  OK
[9:50:38] NFS WRITE \\?\C:\Users\Alexandros\pph\pph\vendor\googleads\googleads-php-lib\5726d4a373bc0e764e7ee122ce7fc6fd  OK
[9:50:38] NFS WRITE \\?\C:\Users\Alexandros\pph\pph\vendor\googleads\googleads-php-lib\5726d4a373bc0e764e7ee122ce7fc6fd  OK
[9:50:38] NFS WRITE \\?\C:\Users\Alexandros\pph\pph\vendor\googleads\googleads-php-lib\5726d4a373bc0e764e7ee122ce7fc6fd  OK
[9:50:38] NFS WRITE \\?\C:\Users\Alexandros\pph\pph\vendor\googleads\googleads-php-lib\5726d4a373bc0e764e7ee122ce7fc6fd  OK
[9:50:38] NFS WRITE \\?\C:\Users\Alexandros\pph\pph\vendor\googleads\googleads-php-lib\5726d4a373bc0e764e7ee122ce7fc6fd  OK
[9:50:38] NFS WRITE \\?\C:\Users\Alexandros\pph\pph\vendor\googleads\googleads-php-lib\5726d4a373bc0e764e7ee122ce7fc6fd  OK
[9:50:38] NFS WRITE \\?\C:\Users\Alexandros\pph\pph\vendor\googleads\googleads-php-lib\5726d4a373bc0e764e7ee122ce7fc6fd  OK
[9:50:38] NFS WRITE \\?\C:\Users\Alexandros\pph\pph\vendor\googleads\googleads-php-lib\5726d4a373bc0e764e7ee122ce7fc6fd  OK
[9:50:38] NFS WRITE \\?\C:\Users\Alexandros\pph\pph\vendor\googleads\googleads-php-lib\5726d4a373bc0e764e7ee122ce7fc6fd  OK
[9:50:38] NFS WRITE \\?\C:\Users\Alexandros\pph\pph\vendor\googleads\googleads-php-lib\5726d4a373bc0e764e7ee122ce7fc6fd  OK
[9:50:38] NFS WRITE \\?\C:\Users\Alexandros\pph\pph\vendor\googleads\googleads-php-lib\5726d4a373bc0e764e7ee122ce7fc6fd  OK
[9:50:38] NFS WRITE \\?\C:\Users\Alexandros\pph\pph\vendor\googleads\googleads-php-lib\5726d4a373bc0e764e7ee122ce7fc6fd  OK
[9:50:38] NFS WRITE \\?\C:\Users\Alexandros\pph\pph\vendor\googleads\googleads-php-lib\5726d4a373bc0e764e7ee122ce7fc6fd  OK
[9:50:38] NFS WRITE \\?\C:\Users\Alexandros\pph\pph\vendor\googleads\googleads-php-lib\5726d4a373bc0e764e7ee122ce7fc6fd  OK
[9:50:38] NFS WRITE \\?\C:\Users\Alexandros\pph\pph\vendor\googleads\googleads-php-lib\5726d4a373bc0e764e7ee122ce7fc6fd  OK
[9:50:38] NFS WRITE \\?\C:\Users\Alexandros\pph\pph\vendor\googleads\googleads-php-lib\5726d4a373bc0e764e7ee122ce7fc6fd  OK
[9:50:38] NFS WRITE \\?\C:\Users\Alexandros\pph\pph\vendor\googleads\googleads-php-lib\5726d4a373bc0e764e7ee122ce7fc6fd  OK
[9:50:38] NFS WRITE \\?\C:\Users\Alexandros\pph\pph\vendor\googleads\googleads-php-lib\5726d4a373bc0e764e7ee122ce7fc6fd  fail
[9:50:38] NFS WRITE \\?\C:\Users\Alexandros\pph\pph\vendor\googleads\googleads-php-lib\5726d4a373bc0e764e7ee122ce7fc6fd  fail
[9:51:38] NFS WRITE \\?\C:\Users\Alexandros\pph\pph\vendor\googleads\googleads-php-lib\5726d4a373bc0e764e7ee122ce7fc6fd  OK
[9:51:38] NFS WRITE \\?\C:\Users\Alexandros\pph\pph\vendor\googleads\googleads-php-lib\5726d4a373bc0e764e7ee122ce7fc6fd  OK
[9:51:38] NFS WRITE \\?\C:\Users\Alexandros\pph\pph\vendor\googleads\googleads-php-lib\5726d4a373bc0e764e7ee122ce7fc6fd  OK
[9:51:38] NFS WRITE \\?\C:\Users\Alexandros\pph\pph\vendor\googleads\googleads-php-lib\5726d4a373bc0e764e7ee122ce7fc6fd  OK
[9:51:38] NFS WRITE \\?\C:\Users\Alexandros\pph\pph\vendor\googleads\googleads-php-lib\5726d4a373bc0e764e7ee122ce7fc6fd  OK
[9:51:38] NFS WRITE \\?\C:\Users\Alexandros\pph\pph\vendor\googleads\googleads-php-lib\5726d4a373bc0e764e7ee122ce7fc6fd  OK
[9:51:38] NFS WRITE \\?\C:\Users\Alexandros\pph\pph\vendor\googleads\googleads-php-lib\5726d4a373bc0e764e7ee122ce7fc6fd  OK
[9:51:38] NFS WRITE \\?\C:\Users\Alexandros\pph\pph\vendor\googleads\googleads-php-lib\5726d4a373bc0e764e7ee122ce7fc6fd  OK
[9:51:38] NFS WRITE \\?\C:\Users\Alexandros\pph\pph\vendor\googleads\googleads-php-lib\5726d4a373bc0e764e7ee122ce7fc6fd  OK
[9:51:38] NFS WRITE \\?\C:\Users\Alexandros\pph\pph\vendor\googleads\googleads-php-lib\5726d4a373bc0e764e7ee122ce7fc6fd  OK
[9:51:38] NFS WRITE \\?\C:\Users\Alexandros\pph\pph\vendor\googleads\googleads-php-lib\5726d4a373bc0e764e7ee122ce7fc6fd  OK
[9:51:38] NFS WRITE \\?\C:\Users\Alexandros\pph\pph\vendor\googleads\googleads-php-lib\5726d4a373bc0e764e7ee122ce7fc6fd  OK
[9:51:38] NFS WRITE \\?\C:\Users\Alexandros\pph\pph\vendor\googleads\googleads-php-lib\5726d4a373bc0e764e7ee122ce7fc6fd  OK
[9:51:38] NFS WRITE \\?\C:\Users\Alexandros\pph\pph\vendor\googleads\googleads-php-lib\5726d4a373bc0e764e7ee122ce7fc6fd  OK
[9:51:38] NFS WRITE \\?\C:\Users\Alexandros\pph\pph\vendor\googleads\googleads-php-lib\5726d4a373bc0e764e7ee122ce7fc6fd  OK
[9:51:38] NFS WRITE \\?\C:\Users\Alexandros\pph\pph\vendor\googleads\googleads-php-lib\5726d4a373bc0e764e7ee122ce7fc6fd  OK
[9:51:38] NFS WRITE \\?\C:\Users\Alexandros\pph\pph\vendor\googleads\googleads-php-lib\5726d4a373bc0e764e7ee122ce7fc6fd  OK
[9:51:38] NFS WRITE \\?\C:\Users\Alexandros\pph\pph\vendor\googleads\googleads-php-lib\5726d4a373bc0e764e7ee122ce7fc6fd  OK
[9:51:38] NFS WRITE \\?\C:\Users\Alexandros\pph\pph\vendor\googleads\googleads-php-lib\5726d4a373bc0e764e7ee122ce7fc6fd  OK
[9:51:38] NFS WRITE \\?\C:\Users\Alexandros\pph\pph\vendor\googleads\googleads-php-lib\5726d4a373bc0e764e7ee122ce7fc6fd  OK
[9:51:38] NFS WRITE \\?\C:\Users\Alexandros\pph\pph\vendor\googleads\googleads-php-lib\5726d4a373bc0e764e7ee122ce7fc6fd  OK
[9:51:38] NFS WRITE \\?\C:\Users\Alexandros\pph\pph\vendor\googleads\googleads-php-lib\5726d4a373bc0e764e7ee122ce7fc6fd  OK
[9:51:38] NFS WRITE \\?\C:\Users\Alexandros\pph\pph\vendor\googleads\googleads-php-lib\5726d4a373bc0e764e7ee122ce7fc6fd  OK
[9:51:38] NFS WRITE \\?\C:\Users\Alexandros\pph\pph\vendor\googleads\googleads-php-lib\5726d4a373bc0e764e7ee122ce7fc6fd  OK
[9:51:38] NFS WRITE \\?\C:\Users\Alexandros\pph\pph\vendor\googleads\googleads-php-lib\5726d4a373bc0e764e7ee122ce7fc6fd  OK
[9:51:38] NFS WRITE \\?\C:\Users\Alexandros\pph\pph\vendor\googleads\googleads-php-lib\5726d4a373bc0e764e7ee122ce7fc6fd  OK
[9:51:38] NFS WRITE \\?\C:\Users\Alexandros\pph\pph\vendor\googleads\googleads-php-lib\5726d4a373bc0e764e7ee122ce7fc6fd  OK
[9:51:38] NFS WRITE \\?\C:\Users\Alexandros\pph\pph\vendor\googleads\googleads-php-lib\5726d4a373bc0e764e7ee122ce7fc6fd  OK
[9:51:38] NFS WRITE \\?\C:\Users\Alexandros\pph\pph\vendor\googleads\googleads-php-lib\5726d4a373bc0e764e7ee122ce7fc6fd  OK
[9:51:38] NFS WRITE \\?\C:\Users\Alexandros\pph\pph\vendor\googleads\googleads-php-lib\5726d4a373bc0e764e7ee122ce7fc6fd  OK
[9:51:38] NFS WRITE \\?\C:\Users\Alexandros\pph\pph\vendor\googleads\googleads-php-lib\5726d4a373bc0e764e7ee122ce7fc6fd  OK
[9:51:38] NFS WRITE \\?\C:\Users\Alexandros\pph\pph\vendor\googleads\googleads-php-lib\5726d4a373bc0e764e7ee122ce7fc6fd  OK
[9:51:38] NFS WRITE \\?\C:\Users\Alexandros\pph\pph\vendor\googleads\googleads-php-lib\5726d4a373bc0e764e7ee122ce7fc6fd  fail
[9:51:38] NFS WRITE \\?\C:\Users\Alexandros\pph\pph\vendor\googleads\googleads-php-lib\5726d4a373bc0e764e7ee122ce7fc6fd  OK
[9:51:38] NFS WRITE \\?\C:\Users\Alexandros\pph\pph\vendor\googleads\googleads-php-lib\5726d4a373bc0e764e7ee122ce7fc6fd  OK
[9:51:38] NFS WRITE \\?\C:\Users\Alexandros\pph\pph\vendor\googleads\googleads-php-lib\5726d4a373bc0e764e7ee122ce7fc6fd  OK
[9:51:38] NFS WRITE \\?\C:\Users\Alexandros\pph\pph\vendor\googleads\googleads-php-lib\5726d4a373bc0e764e7ee122ce7fc6fd  OK
[9:51:38] NFS WRITE \\?\C:\Users\Alexandros\pph\pph\vendor\googleads\googleads-php-lib\5726d4a373bc0e764e7ee122ce7fc6fd  OK
[9:51:38] NFS WRITE \\?\C:\Users\Alexandros\pph\pph\vendor\googleads\googleads-php-lib\5726d4a373bc0e764e7ee122ce7fc6fd  OK
[9:51:38] NFS WRITE \\?\C:\Users\Alexandros\pph\pph\vendor\googleads\googleads-php-lib\5726d4a373bc0e764e7ee122ce7fc6fd  fail

After that point it freezes on fail and after a while it redoes the same output while the command is freezed on the 100%.

If there is anything else that i can do to provide further details please let me know.

Regards Alex.

alexsapran commented 8 years ago

Also i think that this might be related with https://github.com/winnfsd/winnfsd/issues/24 just putting here for feature ref.

marcharding commented 8 years ago

composer require googleads/googleads-php-lib 5.2.3 works for me.

Can you give me some more details?

Could you try the exact same thing with an ubuntu guest? Are you running Vagrant and winnfsd as Administrator?

alexsapran commented 8 years ago

Hi again, Thanks for the quick response, i did manage to make it work when starting vagrant from windows CMD instead of cygwin (always with admin rights)
But after some time using the box, its just randomly freezed, i did the composer install, then npm install, bower install --allow-root, grunt default (here it freezes)

I will try to collect more information, until then is there any special information that you want?

alexsapran commented 8 years ago

update: It seems that when creating large files (the grunt command for before generated a file larger than 1M) NFS throws fail to write and seems to retry again after a while. For my case after waiting for some minutes it actually generates the files and works. For now it seems starting the VM from the windows command line instead of cygwin (always as admin) solves the issue, i will try it a day and close the issue if i have no other related issue.

marcharding commented 8 years ago

Hm that's really strange, i'm also using cygwin.

I'm having difficulties in figuring out whats wrong here. If possible share the package.json etc..

Another thing you could try is to fire up wireshark and look for udp retransmissions when the freeze appears. If that's the case i suggest you take https://github.com/winnfsd/winnfsd/issues/22 for a spin (alpha01 and then alpha02, just replace the winnfsd.exe in the vagrant gem folder...)

alexsapran commented 8 years ago

Hi again,

I tried the alpha01 and alpha02 and worked fine, also as said in the comments i noticed an increase in speed. But the problem is that after a while when i stopped using the vm then it freezed. I will try wireshark during the weekend if i manage to use wireshark at all, and try to collect more information.

marcharding commented 8 years ago

I can now reproduce the hanging behavior with git clone https://github.com/silexphp/Silex.git

I always hangs at the exact same File

Silex/tests/Silex/Tests/Application/UrlGeneratorTraitTest.php

Though i could not figure out why yet.

alexsapran commented 8 years ago

Hope you can find it!,

Here is the wireshark info, i hope it's what you needed and include any helpfull information. I booted the vm started everything made one request to the webserver left it for some minutes idle and the i couldn't even ls the directory Wireshark logs: wireshark.zip

Let me know if there is anything i can do to help

marcharding commented 8 years ago

There are no NFS calls in the pcap, i think you configured wireshark to listen on the wrong interface.

This whole issue is really strange, i let winnfsd run for days and just put my laptop in standby without any problem.

The only problem i can reproduce every time is the freeze when cloning Silex. I will concentrate on this, maybe that fixes the problems i can't reproduce.

marcharding commented 8 years ago

Just a quick question: are you using winnfsd via tcp or udp? (if you're not sure, check with mount -v)

alexsapran commented 8 years ago

sorry for delay @marcharding I am using TCP, should i try with UDP?

alexsapran commented 8 years ago

we enforce when mounting with NFS the TCP, from our git log i see it has something to do with retry lost packages.

marcharding commented 8 years ago

The WinNFSd TCP implementation is broken, because it does not take into account that TCP is a stream oriented protocol (maybe this is wrong, i'm not sure yet). I'm not sure i can easily fix this.

With UDP most of your problems should be solved (try with the latest winnfsd.exe from https://github.com/winnfsd/winnfsd/issues/22#issuecomment-230125433 is you have problem with the one included in 1.2.0)

alexsapran commented 8 years ago

Hi switched to UDP, now after doing composer install it starts and then after a while the winnfsd process is terminated with message winnfsd.exe has stopped working. I am using the alpha 02 as you mentioned above. Its the same behavior as before when it were causing the vm to freeze but now it terminate the winnfs instead (in the same point in the composer install cmd)

alexsapran commented 8 years ago

with the stable version of winnfsd (the default one that vagrant install with the plugin) and UDP seems to work without the crashing of winnfsd, the only issue i think its the speed that is been slower. I will try to test further (with also alpha01) and get back with any issue i will face.

marcharding commented 8 years ago

Would you mind testing this https://github.com/winnfsd/winnfsd/issues/22#issuecomment-232504404?

marcharding commented 7 years ago

Should be fixed since winnfsd 2.2.0, if not please reopen.

patricknelson commented 7 years ago

I am still having this issue and I'm using the latest version of WinNFSd :disappointed: I was wondering if I was the only one. The composer use case is exactly the same issue that happens for me, but it also happens at other times as well. Particularly when I'm doing anything that seems to be handling a large number of files or possible read/writes in a short period of time. I'd imagine invocations of grunt would work similarly (due to running in node and thus loading the many tens of thousands of files, sometimes, in node_modules).

Could this be some sort of race condition causing the process to stall and ultimately freeze up indefinitely?

p.s. additional details:

marcharding commented 7 years ago

@patricknelson did you mount with udp or nfs?

config.vm.synced_folder ".", "/vagrant", type: "nfs", mount_options: ['rw', 'vers=3', 'tcp', 'nolock']

i experience these problems on some machines with udp while other systems run fine with upd. i can't figure out why.

with tcp it always works, albeit its a bit slower.

patricknelson commented 7 years ago

Ok cool thanks. I've always only ever mounted with the default options. I'm new to ruby but it looks like this defaults mount_opts to udp correct? I'll try that out now as well and see how that works.

https://github.com/winnfsd/vagrant-winnfsd/blob/master/lib/vagrant-winnfsd/synced_folder.rb#L62

Also if so, why not make tcp the default and mention that udp is faster, but more error prone? That way you would have still OK speed but less errors/issues and people would more easily be able to isolate their problems (since they would have been making the udp switch themselves).

What do you think?

EDIT: Got that backwards :joy:

marcharding commented 7 years ago

You mean it defaults to udp 😉. I though about making tcp the default, but thought that i may solve the udp problems (probably not). I may do this for the next major release.

Did you already try it with tcp?

patricknelson commented 7 years ago

Yeah, I got that backwards; edited my comment.

Still fails for me. I tried it again with VirtualBox's native share method (vboxsf) and it ran very quickly without stalling like it does when using WinNFSd regardless of the protocol (udp vs tcp). The command I was running was simply composer dump-autoload which in my case only changes one file. I've got only 22 folders in my vendor/ directory (I can't reveal too much beyond that, sorry).

Anyway, the only resolution to this for me is I have to force a shutdown as the system will no longer gracefully shut down :cry: Even if I try to CD into a shared folder, it freezes up as it then attempts to read contents and etc. Seems to be a total crash. I'll enable logging to see what else I can figure out (don't have much time unfortunately).

screenshot

Sat like this for several minutes before I bounced the VM.

marcharding commented 7 years ago

Do you have access to another system?

I've medium sized symphony project with quite a lot dependencies running without problems on a few different machines.

Can you share the mount -v output? I think that maybe the centos nfs causes these issues (i'm on ubuntu or debian and did not check centos). I'll take a look sometime next week.

patricknelson commented 7 years ago

I'm not sure how to access output from mount -v but I did enable logging in Vagrantfile via config.winnfsd.logging and got lots of output here. Is that what you mean? Or do I need to reload the machine with verbose output from vagrant up to see that?

I'll send a message offline with full log output if I can manage to find a way to log it since when it opens a new window, the scroll back is so massive that I cannot copy. Not sure how to redirect output once vagrant process launches the winnfsd.exe window. Tips?

marcharding commented 7 years ago

I do not need the output from config.winnfsd.logging, its mostly useless 😉.

mount -v inside the vagrant machine should show the real mount options, which may differ between different os.

Anyways, i'll try it with cent os next week, maybe its a small fix (if i have the same problems).

patricknelson commented 7 years ago

Is it possible that some magic limit (e.g. 256) of concurrent reads/writes was reached and this causes it to halt somehow? I counted number of entries per second in the winnfsd.exe log output and ended up with:

      2 [14:56:22]
    190 [14:56:26]
    364 [14:56:27]
    428 [14:56:28]
    285 [14:56:29]
    346 [14:56:30]
    345 [14:56:31]
    327 [14:56:32]
    247 [14:56:33]

2,352 accesses (reads/writes I suppose). My mount command was:

mount -o vers=3,udp,rw,vers=3,tcp,nolock 10.0.2.2:/C/Users/USERNAME/Documents/Development\ Server/websites /websites
patricknelson commented 7 years ago

If it helps, I've reverted to older versions and tried the same thing. Here are my results:

Interestingly, I have a custom configuration (from a PR that I submitted: https://github.com/winnfsd/vagrant-winnfsd/pull/62) so I reverted back to v1.3.1 and disabled my custom host override (where I was manually forcing it to 10.0.2.2) and ... it still didn't work! So I don't think that was the issue.

Edit 1: Also note, during this time, I maintained this configuration option for all versions above: mount_options: ['rw', 'vers=3', 'tcp', 'nolock'] Edit 2: Clarifying bullets above.

patricknelson commented 7 years ago

ALSO: Since I've tested so many variations, I figured it would be useful to share here as well (subjective).

I noticed no major performance difference. I have a page load that takes a very long time to generate. Here are the differences in speed:

So I notice a 100ms improvement. Not worth it to me if tcp is indeed much more reliable.

marcharding commented 7 years ago

Thanks for the update 👍 , i'll investigate further. Most other users reported the exact opposite behavior (less problems with newer versions).

I'll hack up a version without the changes that i think cause the errors, but all other changes intact next week. Maybe you can give it a try then.

marcharding commented 7 years ago

Hey, i just got around testing this. Sadly i'm not able to reproduce your issue, it works with any errors.

I tried it with composer require guzzlehttp/guzzle on cent os 7, latest winnfsd version, default mount options. Is there any chance you can provide a complete testcase (with the composer.json or Package.json that fails)?

polantis commented 7 years ago

Hello,

I am getting this issue on centos 7. I cannot write anything on the nfs shared folder without freezing the VM (run composer install, uploading, running phpunit tests..)

Which vagrant and virtualbox version should i use? It seems the same for most of them... I am on vagrant 1.8.4 and Virtualbox 5.0.30

Thanks

patricknelson commented 7 years ago

Currently I'm not having any issues (crossed fingers). @polantis I'm on CentOS 7.2.1511 with Vagrant 1.9.1 and VirtualBox 5.1.8. Also I'm on vagrant-winnfsd version ~2.2.5~ 1.3.1. Try upgrading Vagrant and ensuring this plugin is also up to date:

$ vagrant plugin install vagrant-winnfsd

Does that help?

EDIT: I are dunce.

polantis commented 7 years ago

Hello,

How did you manage to install vagrant-winnfsd version 2.2.5? The last one seems v1.3.1. With last versions of vagrant (>1.8.6), i have network issues as i need a private network ip for NFS.

(I am on windows 7)

Thanks

patricknelson commented 7 years ago

Oops, you're right -- that was the ruby version, I was looking at the path in a hurry and didn't pull the right version number 😂

patricknelson commented 7 years ago

Well, not sure if this will help, but since you mention needing a private network IP: One thing that I contributed to help fix another issue of mine in #62 was basically the ability to manually specify the IP address to request NFS to connect back to (for the Win 7 host machine):

config.winnfsd.host_ip = "10.0.2.2"

In my case, the host machine was always at 10.0.2.2 but YMMV.

polantis commented 7 years ago

Well, i still have the same issue. This is my configuration:

config.vm.network "private_network", ip: "192.168.2.100" config.winnfsd.host_ip = "192.168.2.1"

It freezes each time i try to write in the shared folder. After that, I can access to the VM (in ssh) but not anymore to the shared folder.

Thanks

patricknelson commented 7 years ago

So, writing doesn't work. Can you read from the folder (e.g. just cd into it and perform ls)?

Beyond that above ☝️, I can't help. This is more @marcharding's domain now.

polantis commented 7 years ago

Yes i can read. My application is working properly except for upload and writing new files. I can modify files from windows and it is working on the VM.

By the way, my VM is sometimes freezeing after switching git branch

patricknelson commented 7 years ago

Can you write small changes (e.g. touch test-file.txt which should just create a new file of the given name) or does that even cause it to lock up? For me I had a similar issue in the past (not now) but only when attempting to modify many files at once, like what would happen if you were to switch branches in git from the VM itself or when running composer install.

polantis commented 7 years ago

No I cannot write anything from linux; even a touch test-file.txt locks my VM.

marcharding commented 7 years ago

@polantis can you give me details about the guest image? is it just a plain centos? which box do you use? https://atlas.hashicorp.com/bento/boxes/centos-7.2? can you give me the complete mount options?

if i can reproduce a failing touch command i can probably fix this in the next few days.

polantis commented 7 years ago

Yes i am using "bento/centos-7.1" (3.10.0-514.2.2.el7.x86_64 CentOS Linux release 7.3.1611 (Core))

mount options: config.vm.synced_folder ".", "/vagrant", type:"nfs" (I have also tried with mount_options: ['rw', 'vers=3', 'udp', 'nolock'] but does not seem to change anything)

Thanks

EDIT: full version

patricknelson commented 7 years ago

It may also be worthwhile to share as much as you can of your Vagrantfile in case there are other influencing factors we are unaware of that could be useful. That along with the output from vagrant plugin list (we already know your host OS). Hopefully that would be enough to ensure we're taking everything into account.

Gamesh commented 7 years ago

@polantis you should login into your vm and post the output of mount because sometimes vagrant appends some parameters to mount options, and sometime it just overrides everything with what you have in your mount_options, depending on vagrant version.

polantis commented 7 years ago

ok full mount options: sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime,seclabel) proc on /proc type proc (rw,nosuid,nodev,noexec,relatime) devtmpfs on /dev type devtmpfs (rw,nosuid,seclabel,size=1928504k,nr_inodes=48212 6,mode=755) securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relat ime) tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev,seclabel) devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,seclabel,gid=5,mode=62 0,ptmxmode=000) tmpfs on /run type tmpfs (rw,nosuid,nodev,seclabel,mode=755) tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,seclabel,mode=755) cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xa ttr,release_agent=/usr/lib/systemd/systemd-cgroups-agent,name=systemd) pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime) cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,de vices) cgroup on /sys/fs/cgroup/net_cls,net_prio type cgroup (rw,nosuid,nodev,noexec,re latime,net_prio,net_cls) cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,mem ory) cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,fr eezer) cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime ,perf_event) cgroup on /sys/fs/cgroup/hugetlb type cgroup (rw,nosuid,nodev,noexec,relatime,hu getlb) cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpu set) cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatim e,cpuacct,cpu) cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blki o) cgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relatime,pids) configfs on /sys/kernel/config type configfs (rw,relatime) /dev/mapper/centos-root on / type xfs (rw,relatime,seclabel,attr2,inode64,noquot a) selinuxfs on /sys/fs/selinux type selinuxfs (rw,relatime) systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=32,pgrp=1,time out=300,minproto=5,maxproto=5,direct) mqueue on /dev/mqueue type mqueue (rw,relatime,seclabel) debugfs on /sys/kernel/debug type debugfs (rw,relatime) hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,seclabel) sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw,relatime) nfsd on /proc/fs/nfsd type nfsd (rw,relatime) /dev/sda1 on /boot type xfs (rw,relatime,seclabel,attr2,inode64,noquota) 192.168.2.1:/_MYAPPPATH_ on /vagrant ty pe nfs (rw,relatime,vers=3,rsize=32768,wsize=32768,namlen=255,hard,nolock,proto= udp,timeo=11,retrans=3,sec=sys,mountaddr=192.168.2.1,mountvers=3,mountport=1058, mountproto=udp,local_lock=all,addr=192.168.2.1) tmpfs on /run/user/0 type tmpfs (rw,nosuid,nodev,relatime,seclabel,size=387792k, mode=700)

vagrant plugin list vagrant-share <1.1.6> vagrant-vbguest <0.13.0> vagrant-winnfsd <1.3.1>

Thanks

polantis commented 7 years ago

Everything is working again after a windows update!

patricknelson commented 7 years ago

Interesting @polantis. Prior to the Windows update, did you restart your computer while still experiencing the same issues before/after the restart? I wonder what updates were applied that affected this :thinking:

polantis commented 7 years ago

Yes before windows update, i have restarted many times my computer and have done several tests. I think it was a "write permission" issue from vagrant/virtualbox to windows. After having updating windows, i had to give again the rights to vagrant and virtualbox for the windows firewall..