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

Vagrant up crashes #11492

Closed
karimsalehh opened this issue Apr 4, 2020 · 19 comments
Closed

Vagrant up crashes #11492

karimsalehh opened this issue Apr 4, 2020 · 19 comments

Comments

@karimsalehh
Copy link

karimsalehh commented Apr 4, 2020

Vagrant version

Installed Version: 2.2.7

Host operating system

MacOS version: 10.12.6

Guest operating system

VirtualBOX 6.1

Vagrantfile

# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure("2") do |config|
  config.vm.box = "ubuntu/trusty64"
  config.vm.synced_folder ".", "/vagrant"
  config.vm.network "forwarded_port", guest: 8000, host: 8000, host_ip: "127.0.0.1"
  config.vm.network "forwarded_port", guest: 8080, host: 8080, host_ip: "127.0.0.1"
  config.vm.network "forwarded_port", guest: 5000, host: 5000, host_ip: "127.0.0.1"

  # Work around disconnected virtual network cable.
  config.vm.provider "virtualbox" do |vb|
    vb.customize ["modifyvm", :id, "--cableconnected1", "on"]
  end

  config.vm.provision "shell", inline: <<-SHELL
    apt-get -qqy update

    # Work around https://github.com/chef/bento/issues/661
    # apt-get -qqy upgrade
    DEBIAN_FRONTEND=noninteractive apt-get -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" upgrade

    apt-get -qqy install make zip unzip postgresql

    apt-get -qqy install python3 python3-pip
    pip3 install --upgrade pip
    pip3 install flask packaging oauth2client redis passlib flask-httpauth
    pip3 install sqlalchemy flask-sqlalchemy psycopg2-binary bleach requests

    apt-get -qqy install python python-pip
    pip2 install --upgrade pip
    pip2 install flask packaging oauth2client redis passlib flask-httpauth
    pip2 install sqlalchemy flask-sqlalchemy psycopg2-binary bleach requests

    su postgres -c 'createuser -dRS vagrant'
    su vagrant -c 'createdb'
    su vagrant -c 'createdb news'
    su vagrant -c 'createdb forum'
    su vagrant -c 'psql forum -f /vagrant/forum/forum.sql'

    vagrantTip="�[35m�[1mThe shared directory is located at /vagrant\\nTo access your shared files: cd /vagrant�[m"
    echo -e $vagrantTip > /etc/motd

    wget http://download.redis.io/redis-stable.tar.gz
    tar xvzf redis-stable.tar.gz
    cd redis-stable
    make
    make install

    echo "Done installing your virtual machine!"
  SHELL
end

Debug output

https://gist.github.com/karimsalehh/db08ef21be1c02cad0cf5251f1c70949

Expected behavior

When I run vagrant up, I should be able to run ssh into the machine

Actual behavior

vagrant up failes to execute every single time, I tried uninstalling and reinstalling both vagrant and virtualbox and tried different versions.
But nothing seems to work

Steps to reproduce

1.vagrant init (I also tried different boxes)
2.vagrant up

@briancain
Copy link
Member

@karimsalehh Hey there! Do you think you could give us the full log in a gist of running vagrant up --debug, thanks!

@karimsalehh
Copy link
Author

@briancain
Copy link
Member

@karimsalehh Are you using a different from standard filesystem for macOS? Or perhaps a cloud sync service within your homedir or the local path for where you're running vagrant?

@karimsalehh
Copy link
Author

No I never installed a non standard filesystem, and there is no cloud sync within my homer or the local path for where vagrant is running.

@chrisroberts
Copy link
Member

@karimsalehh Have any system updates been applied recently? Was Vagrant working properly previously and this error just began to occur? I believe I still have a Sierra image around that I'm going to restore and see if I can reproduce. It is EOL at this point, but it shouldn't be suddenly producing this error.

@karimsalehh
Copy link
Author

So I never used Vagrant before, thats the first time I installed it.
Vagrant up never successfully executed and I tried uninstalling it and installing different versions the same with Virtualbox and it kept producing the same errors.
Any ideas if I should install specific versions or anything extra to make it work?
But its actually very weird behavior I never encountered it with any software package before.

@snimavat
Copy link

snimavat commented Apr 6, 2020

Same issue here, freshly installed vagrant with homebrew debug output here #11497

@karimsalehh
Copy link
Author

And I installed Vagrant from the website and tried using homebrew, both didn't work.
I think the current version was installed using homebrew.

@chrisroberts
Copy link
Member

The homebrew installation should be equivalent as it uses the official installer under the hood. We have seen errors like the one generated in the past when people are using some kind of virtual file system and all expected APIs are either not implemented, or are inconsistent. It's unusual that this error has suddenly appeared, but I'll hopefully be able to get more information once I can reproduce it locally.

@snimavat
Copy link

snimavat commented Apr 7, 2020

Definitely i dont use any virtual file system, project is on main harddrive, i have no VFS at all on my mac

@snimavat
Copy link

snimavat commented Apr 8, 2020

Any workaround ? this is a blocker

@NocturnScholar
Copy link

I've also experienced this issue on Sierra using latest vagrant & virtualbox.
Sierra already have ruby ver. 2.3 while vagrant embedded ruby is ver. 2.4, i wonder if it is related?
I've tried installing latest ruby using rvm, but the error still persist.

@snimavat
Copy link

@NocturnScholar vagrant uses built in ruby, doesnt use installed i think

@delysh
Copy link

delysh commented Apr 17, 2020

Hi.
After updating to Vagrant v2.2.7 previously working box crushed on 'vagrant up' (with exactly the same crush log).
Tried with VirtualBox v6.0.20 and v6.1.6 - no luck.
Downloaded and installed Vagrant v2.2.6 and VirtualBox v6.0.20 (Vagrant v2.2.6 doesn't work with VB v6.1).
Everything works again!
Hope it helps.

@jakecobb
Copy link

Same problem on MacOS Sierra 10.12.6 (16G2136), started after upgrading to 2.2.7 from 2.2.4. Downgraded to 2.2.6 as @delysh noted and it also works for me. VirtualBox version is 6.0.6 and I did not change it.

@marc-guenther
Copy link

I have exactly the same problem. Vagrant 2.2.7 / macOS 10.12.6 (16G2136). The Crash report looks exactly identical to the one posted above.

This happens with new boxes, and some existing ones. But I also have a box which works just fine!
This is the output of vagrant up on a new box:

And the crash report:

I did not have this problem with Vagrant 2.2.6.

My system info:

% uname -a
Darwin marcs-macbook-touch.local 16.7.0 Darwin Kernel Version 16.7.0: Sun Jun  2 20:26:31 PDT 2019; root:xnu-3789.73.50~1/RELEASE_X86_64 x86_64
% vagrant --version
Vagrant 2.2.7
% VBoxManage --version
6.1.4r136177

@chrisroberts
Copy link
Member

Hi everyone,

I was able to restore an old Sierra image and the behavior was easily reproducible. The segfault was originating from a file system operation via FileUtils in the Ruby standard library. Our next release includes an update to Ruby 2.6 and I figured there was a good chance it would be resolved with the next release. However, upon attempting to install the nightly build, I was greeted with an error about my current macOS version not being supported (as the builds were updated to target non-EOL versions of macOS).

The package builds have been updated, and support for EOL versions of macOS has been reinstated (though not future guaranteed 🙂). The latest nightly builds include these updates, and if you would like to try them out before the official release you can find them here:

https://github.com/hashicorp/vagrant-installers/releases/tag/v2.2.8.dev%2Bmaster

Cheers!

@chrisroberts
Copy link
Member

This fix is included in the now released 2.2.8 version.

Cheers!

@ghost
Copy link

ghost commented Jun 4, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@hashicorp hashicorp locked and limited conversation to collaborators Jun 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

8 participants