php - NFS hang from Vagrant guest to OSX -


i have vagrant guest i'm using run symfony 2 application locally development. in general working fine, however, regularly finding processes lock in 'd+' state (waiting i/o).

eg. try run unit tests:

./bin/phpunit -c app

the task launches, never exits. in process list see:

vagrant 3279 0.5 4.9 378440 101132 pts/0 d+ 02:43 0:03 php ./bin/phpunit -c app

the task unkillable. need power cycle vagrant guest again. seems happen php command line apps (but it's main command line tasks do, might not relevant).

the syslog reports hung task:

aug 20 03:04:40 precise64 kernel: [ 6240.210396] info: task php:3279 blocked more 120 seconds. aug 20 03:04:40 precise64 kernel: [ 6240.211920] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables message. aug 20 03:04:40 precise64 kernel: [ 6240.212843] php             d 0000000000000000     0  3279   3091 0x00000004 aug 20 03:04:40 precise64 kernel: [ 6240.212846]  ffff88007aa13c98 0000000000000082 ffff88007aa13c38 ffffffff810830df aug 20 03:04:40 precise64 kernel: [ 6240.212849]  ffff88007aa13fd8 ffff88007aa13fd8 ffff88007aa13fd8 0000000000013780 aug 20 03:04:40 precise64 kernel: [ 6240.212851]  ffff88007aa9c4d0 ffff880079e596f0 ffff88007aa13c78 ffff88007fc14040 aug 20 03:04:40 precise64 kernel: [ 6240.212853] call trace: aug 20 03:04:40 precise64 kernel: [ 6240.212859]  [<ffffffff810830df>] ? queue_work+0x1f/0x30 aug 20 03:04:40 precise64 kernel: [ 6240.212863]  [<ffffffff811170e0>] ? __lock_page+0x70/0x70 aug 20 03:04:40 precise64 kernel: [ 6240.212866]  [<ffffffff8165a55f>] schedule+0x3f/0x60 aug 20 03:04:40 precise64 kernel: [ 6240.212867]  [<ffffffff8165a60f>] io_schedule+0x8f/0xd0 aug 20 03:04:40 precise64 kernel: [ 6240.212869]  [<ffffffff811170ee>] sleep_on_page+0xe/0x20 aug 20 03:04:40 precise64 kernel: [ 6240.212871]  [<ffffffff8165ae2f>] __wait_on_bit+0x5f/0x90 aug 20 03:04:40 precise64 kernel: [ 6240.212873]  [<ffffffff81117258>] wait_on_page_bit+0x78/0x80 aug 20 03:04:40 precise64 kernel: [ 6240.212875]  [<ffffffff8108af00>] ? autoremove_wake_function+0x40/0x40 aug 20 03:04:40 precise64 kernel: [ 6240.212877]  [<ffffffff8111736c>] filemap_fdatawait_range+0x10c/0x1a0 aug 20 03:04:40 precise64 kernel: [ 6240.212882]  [<ffffffff81122a01>] ? do_writepages+0x21/0x40 aug 20 03:04:40 precise64 kernel: [ 6240.212884]  [<ffffffff81118da8>] filemap_write_and_wait_range+0x68/0x80 aug 20 03:04:40 precise64 kernel: [ 6240.212892]  [<ffffffffa01269fe>] nfs_file_fsync+0x5e/0x130 [nfs] aug 20 03:04:40 precise64 kernel: [ 6240.212896]  [<ffffffff811a632b>] vfs_fsync+0x2b/0x40 aug 20 03:04:40 precise64 kernel: [ 6240.212900]  [<ffffffffa01272c3>] nfs_file_flush+0x53/0x80 [nfs] aug 20 03:04:40 precise64 kernel: [ 6240.212903]  [<ffffffff81175d6f>] filp_close+0x3f/0x90 aug 20 03:04:40 precise64 kernel: [ 6240.212905]  [<ffffffff81175e72>] sys_close+0xb2/0x120 aug 20 03:04:40 precise64 kernel: [ 6240.212907]  [<ffffffff81664a82>] system_call_fastpath+0x16/0x1b` 

to provision box, i'm sharing local folder using:

config.vm.synced_folder "/my/local/path.dev", "/var/www", :nfs => true

vagrant creates following /etc/exports file on osx host:

# vagrant-begin: c7d0c56a-a126-46f5-a293-605bf554bc9a "/users/djdrey-local/sites/oddswop.dev" 192.168.33.101 -mapall=501:20 # vagrant-end: c7d0c56a-a126-46f5-a293-605bf554bc9a 

output of nfsstat on vagrant guest

server rpc stats: calls      badcalls   badclnt    badauth    xdrcall 0          0          0          0          0  client rpc stats: calls      retrans    authrefrsh 87751      0          87751  client nfs v3: null         getattr      setattr      lookup       access       readlink 0         0% 35018    39% 1110      1% 8756      9% 19086    21% 0         0% read         write        create       mkdir        symlink      mknod 5100      5% 7059      8% 4603      5% 192       0% 0         0% 0         0% remove       rmdir        rename       link         readdir      readdirplus 4962      5% 262       0% 313       0% 0         0% 0         0% 1056      1% fsstat       fsinfo       pathconf     commit 1         0% 2         0% 1         0% 229       0% 

i've ensured guest additions date on guest using plugin: vagrant-vbguest

i'm not sure how go debugging this. it's pretty clear me nfs issue between guest , mac osx host. if try , debug logging nfs on osx using nfs manager, kernel panic in osx.

has else had similar issue? suggestions on way forward appreciated - power cycling guest several times per day unworkable.

environment

  • osx 10.8.4
  • vagrant 1.2.7
  • virtualbox 4.2.16
  • vagrant guest o/s: ubuntu 12.04.2 lts (gnu/linux 3.2.0-23-generic x86_64) [precise64.box]

i had similar problem when running npm install within shared nfs folder , subsequently found disabling nfs_udp fixed hanging issues :

 config.vm.synced_folder ".", "/vagrant", type: "nfs", nfs_udp: false 

Comments

Popular posts from this blog

java - JavaFX 2 slider labelFormatter not being used -

Detect support for Shoutcast ICY MP3 without navigator.userAgent in Firefox? -

web - SVG not rendering properly in Firefox -