I'm running VirtualBox 5.0.14 & vagrant 1.8.1 on Windows 7. Whenever I try to run 'vagrant up <name>' , it eventually fails with this message:
==> services: Waiting for machine to boot. This may take a few minutes...
Vagrant can't use the requested machine because it is locked! This
means that another Vagrant process is currently reading or modifying
the machine. Please wait for that Vagrant process to end and try
again. Details about the machine are shown below:
Name: services
Provider: virtualbox
I have confirmed that the ruby process does in fact attempt to lock a file twice, from different threads. This is the file:
~\.vagrant.d\data\machine-index\18119faf88ec4cb388fd953ee9b298d9.lock
A first thread successfully locks the file & a second thread fails to lock the file. ruby terminates about 2.5 seconds after the lock failure.
This file is never kept open for very long, so this may be a race condition. Unfortunately, the error occurs every time, so I am unable to use vagrant.
FWIW, the lock file is usually accessed from a specific thread (A), which I assume is the main thread. A couple of times, the lock file is accessed from another thread(B). The lock failure occurs while thread B has the file locked, and a third thread (C) tries to lock the file. Tee failed attempt is the only time thread C tries to access the lock file.
Anyone have any suggestions? Thanks