Bug 222728

Summary: segfault during vagrant provision
Product: Base System Reporter: Andrew Pennebaker <andrew.pennebaker>
Component: binAssignee: Mateusz Piotrowski <0mp>
Status: Closed Overcome By Events    
Severity: Affects Only Me CC: 0mp
Priority: ---    
Version: 10.3-STABLE   
Hardware: Any   
OS: Any   

Description Andrew Pennebaker 2017-10-01 20:59:45 UTC
I'm trying to run a shell script to install docker in FreeBSD on Vagrant, but when I instruct Vagrant to run the script, it reports an ssh command failure. With debugging enabled, Vagrant shows this strange segfault near a chmod section.

Trace:

$ VAGRANT_LOG=debug vagrant provision
...
DEBUG ssh: == Net-SSH connection debug-level log END ==
 INFO ssh: Execute: chown -R vagrant /tmp/vagrant-shell (sudo=true)
DEBUG ssh: stderr: Segmentation fault

DEBUG ssh: Exit status: 139
DEBUG ssh: Uploading: /var/folders/53/300vy1ys7tv8h8fr_z3tm8gr0000gn/T/vagrant-shell20171001-3401-19khci5.sh to /tmp/vagrant-shell
DEBUG ssh: Re-using SSH connection.
 INFO interface: detail: Running: /var/folders/53/300vy1ys7tv8h8fr_z3tm8gr0000gn/T/vagrant-shell20171001-3401-19khci5.sh
 INFO interface: detail:     default: Running: /var/folders/53/300vy1ys7tv8h8fr_z3tm8gr0000gn/T/vagrant-shell20171001-3401-19khci5.sh
    default: Running: /var/folders/53/300vy1ys7tv8h8fr_z3tm8gr0000gn/T/vagrant-shell20171001-3401-19khci5.sh
DEBUG ssh: Re-using SSH connection.
 INFO ssh: Execute: chmod +x '/tmp/vagrant-shell' && /tmp/vagrant-shell (sudo=true)
DEBUG ssh: stderr: Segmentation fault

DEBUG ssh: Exit status: 139
ERROR warden: Error occurred: The SSH command responded with a non-zero exit status. Vagrant
assumes that this means the command failed. The output for this command
should be in the log above. Please read the output to determine what
went wrong.

Vagrantfile:

Vagrant.configure("2") do |config|
  config.vm.box = "freebsd/FreeBSD-10.3-STABLE"

  config.vm.guest = :freebsd
  config.vm.synced_folder ".", "/vagrant", id: "vagrant-root", disabled: true
  config.ssh.shell = "sh"
  config.vm.base_mac = "080027D14C66"

  config.vm.provider :virtualbox do |vb|
    vb.customize ["modifyvm", :id, "--memory", "1024"]
    vb.customize ["modifyvm", :id, "--cpus", "1"]
    vb.customize ["modifyvm", :id, "--hwvirtex", "on"]
    vb.customize ["modifyvm", :id, "--audio", "none"]
    vb.customize ["modifyvm", :id, "--nictype1", "virtio"]
    vb.customize ["modifyvm", :id, "--nictype2", "virtio"]
  end

  config.vm.provision "shell", path: "bootstrap.sh"
end

bootstrap.sh:

#!/bin/sh

echo "Bootstrapping..."

# sudo kldload /boot/kernel/zfs.ko

# sudo pkg install -y docker-freebsd ca_root_nss
Comment 1 Mateusz Piotrowski freebsd_committer freebsd_triage 2021-02-02 15:46:52 UTC
docker-freebsd is no longer present in the ports tree. Let's close this issue for now.