Skip to content
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

Never finds my vagrant boxes #28

Closed
ssnyder opened this issue May 27, 2016 · 10 comments
Closed

Never finds my vagrant boxes #28

ssnyder opened this issue May 27, 2016 · 10 comments

Comments

@ssnyder
Copy link

ssnyder commented May 27, 2016

I have installed 1.0.5, and when it starts, it starts to look for the boxes I have installed, and never finishes that task, so my list of boxes never shows up. On and this is on Windows 7.

@syntacticvexation
Copy link

+1. I see a "Refreshing" label that doesn't change on Windows 10.

@noahziheng
Copy link

Same problem.Windows 10 Pro.

@amitailanciano
Copy link
Member

What version of Vagrant are you using?

@noahziheng
Copy link

@amitailanciano Vagrant 1.8.5

@syntacticvexation
Copy link

Same - Vagrant 1.8.5. Is there a particular folder structure it is expecting?

@MarkSummers
Copy link
Contributor

We're seeing this issue too.

I tried to debug VagrantManager in Visual Studio 2015 and it seems that Process.WaitForExit() is blocking on this command:

VBoxManage showvminfo {uuid} --machinereadable

I captured the exact command string and ran it in cmd.exe and it returned as expected.

@MarkSummers
Copy link
Contributor

MarkSummers commented Sep 20, 2016

I think I found the cause of the issue: The contents of the process standard out needs to be read before WaitForExit() to prevent a deadlock.

https://msdn.microsoft.com/en-us/library/system.diagnostics.process.standardoutput(v=vs.110).aspx

// To avoid deadlocks, always read the output stream first and then wait.
string output = p.StandardOutput.ReadToEnd();
p.WaitForExit();

Reordering the read and wait operations as indicated above appears to have resolved the issue.

As mentioned in the MSDN article, the problem is aggravated by the volume of data returned by the process. showvminfo returns a relatively large amount of data and it seems that this is enough to fill up the output stream buffer.

@narration-sd
Copy link

Mark, I complimented you on the original thread, and suggested a pull request.

Seeing that both it and this bug thread are closed, not sure if @amitailanciano will be seeing your work notified, so tha pull request maybe even more worthwhile, esp. since this change is so small if likely potent.

Kind regards,
Clive

@narration-sd
Copy link

Good man ;)

On Sep 20, 2016 09:10, "MarkSummers" notifications@github.com wrote:

PR created:

https://github.com/lanayotech/vagrant-manager-windows/pull/34/files


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#28 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAPIiXb8jGOzRKNDdNEDv2Wel2TDiDTIks5qsAVngaJpZM4IoGGZ
.

@amitailanciano
Copy link
Member

Release 1.0.0.6 should resolve this issue, thanks again for your contribution @MarkSummers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants