Vagrant: Segmentation fault on latest Windows 10 April Update

Created on 15 Jul 2018  路  7Comments  路  Source: hashicorp/vagrant

When running vagrant up I'm getting a segfault from Ruby, presumably caused by the childprocess gem. Tried Hyper-V and VirtualBox and both yield the same error.

Vagrant version

Tried 2.1.2, 2.1.0 and 1.9.6. All of them seem to be affected.

Host operating system

Windows 10 April Update 1806 (build 17134.165)

Guest operating system

hashicorp/precise64

Vagrantfile

Vagrant.configure("2") do |config|
  config.vm.box = "hashicorp/precise64"
  config.vm.synced_folder "./data", "/mnt/data/"
  config.vm.provider "virtualbox" do |vb|
    vb.memory = "2048"
  end
end

Debug output

https://github.com/hashicorp/vagrant/files/2195027/debug.log

Expected behavior

It should work out of the box?

Actual behavior

Crash and burn

Steps to reproduce

  1. vagrant init hashicorp/precise64
  2. vagrant up
  3. halt and catch fire

References

  • GH-9699
bug hoswindows installer needs-repro

Most helpful comment

@chrisroberts When I previously disabled Exploit Guard (by manually adding an exception to vagrant.exe and ruby.exe and even disabling all mitigations system-wide) it turns out Windows 10 decided to be... Windows 10 and not actually disabling exploit guard.

So far I got vagrant commands working by manually adding a mitigation entry for ruby.exe which disables bottom-up ASLR:

PS> Set-ProcessMitigation -Name "C:\HashiCorp\Vagrant\embedded\mingw64\bin\ruby.exe" -Disa
ble BottomUp

However, I think this is more of a workaround than an actual fix. Is this a Ruby, child-process or Vagrant bug? Windows bug even 馃槤?

All 7 comments

Hi there,

This error is generally caused by antivirus software. Please check that any antivirus software you have running is not flagging files installed by Vagrant or has quarantined any files.

Cheers

@chrisroberts I'm actually using Windows Defender + Exploit Guard on Windows 10. Windows Defender has not flagged/quarantined any file used by Vagrant, but I disabled them both just to make sure and the problem was still there...

@sanlyx Would you please do a full uninstall (via control panel) and then install the 2.1.2 version again with windows defender + exploit guard disabled to verify the same behavior. The same sort of segfault was seen previously, but I have so far been unable to reproduce the state locally. Thanks!

@chrisroberts When I previously disabled Exploit Guard (by manually adding an exception to vagrant.exe and ruby.exe and even disabling all mitigations system-wide) it turns out Windows 10 decided to be... Windows 10 and not actually disabling exploit guard.

So far I got vagrant commands working by manually adding a mitigation entry for ruby.exe which disables bottom-up ASLR:

PS> Set-ProcessMitigation -Name "C:\HashiCorp\Vagrant\embedded\mingw64\bin\ruby.exe" -Disa
ble BottomUp

However, I think this is more of a workaround than an actual fix. Is this a Ruby, child-process or Vagrant bug? Windows bug even 馃槤?

@sanlyx Thanks for adding this information, it's very helpful. The origin of the issue is Windows, but I'm going to see if I can get the same behavior triggered locally, and then determine if there is anything we can do to prevent it from being picked up.

If it's in any way helpful, this is still happening on Windows 1909.

It's odd because I run this version on a couple of different machines, and for some reason, not all of them have ASLR and the related Exploit Protection features enabled by default. This machine is the one on which I installed Windows 10 most recently, and all Exploit Protection features appear to have been enabled, by default, out-of-the-box on a clean installation.

In any case, the same workaround applies, as noted previously in the thread:

PS> Set-ProcessMitigation -Name "C:\HashiCorp\Vagrant\embedded\mingw64\bin\ruby.exe" -Disable BottomUp

The segfault occurs with any vagrant ... command I've tried, excepting vagrant box list, for whatever reason.

The full debug output from my machine is available at https://gist.github.com/cbj4074/8855d7b514e8c05a549954ecc439846f (apologies for the odd formatting; I can't figure out how to fix it in Powershell).

Hi there,

It looks like this has been resolved within a previously shipped version of Vagrant so I am now closing this issue. If the original issue was not fully resolved, please reopen this issue or create a new one.

Cheers!

Was this page helpful?
0 / 5 - 0 ratings