WSL: Urbit fails to boot

  • A brief description

Urbit 0.4.3, “a secure peer-to-peer network of personal servers, built on a clean-slate system software stack”, fails to boot on WSL. It boots correctly on Ubuntu 14.04.

  • Expected results

Urbit creating a new “comet” (identity), connecting to the network, downloading data and showing the command prompt.

  • Actual results (with terminal output if applicable)

Urbit hangs at the point you see in the log below.

$ urbit -c temp_comet
[...]
/~rep/home/~2017.1.13..02.56.39..7e35/arvo/ames:<[1.221 17].[1.227 34]>
/~rep/home/~2017.1.13..02.56.39..7e35/arvo/ames:<[1.222 17].[1.227 34]>
/~rep/home/~2017.1.13..02.56.39..7e35/arvo/ames:<[1.223 17].[1.227 34]>
/~rep/home/~2017.1.13..02.56.39..7e35/arvo/ames:<[1.224 17].[1.227 34]>
/~rep/home/~2017.1.13..02.56.39..7e35/arvo/ames:<[1.224 21].[1.224 66]>
/~rep/home/~2017.1.13..02.56.39..7e35/arvo/ames:<[1.224 25].[1.224 66]>
/~rep/home/~2017.1.13..02.56.39..7e35/arvo/ames:<[1.224 31].[1.224 65]>
/~rep/home/~2017.1.13..02.56.39..7e35/arvo/zuse:<[946 7].[956 50]>
/~rep/home/~2017.1.13..02.56.39..7e35/arvo/zuse:<[947 7].[956 50]>
/~rep/home/~2017.1.13..02.56.39..7e35/arvo/zuse:<[948 7].[956 50]>
/~rep/home/~2017.1.13..02.56.39..7e35/arvo/zuse:<[949 7].[956 50]>
/~rep/home/~2017.1.13..02.56.39..7e35/arvo/zuse:<[950 7].[956 50]>
/~rep/home/~2017.1.13..02.56.39..7e35/arvo/zuse:<[951 7].[956 50]>
/~rep/home/~2017.1.13..02.56.39..7e35/arvo/zuse:<[952 7].[956 50]>
/~rep/home/~2017.1.13..02.56.39..7e35/arvo/zuse:<[952 11].[952 49]>
/~rep/home/~2017.1.13..02.56.39..7e35/arvo/zuse:<[952 15].[952 49]>
<awaiting hood, this may take a few minutes>
  • Your Windows build number

Microsoft Windows [Version 10.0.14393]

  • Steps / All commands required to reproduce the error from a brand new installation
wget https://media.urbit.org/dist/debian/urbit_0.4.3-1_amd64.deb
sudo dpkg -i urbit_0.4.3-1_amd64.deb
sudo apt-get update
sudo apt-get install -f -y
urbit -c ~/mycomet

The following Vagrantfile sets up an Ubuntu 14.04 VM in VirtualBox where the command urbit -c ~/mycomet works as expected.

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

# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
  config.vm.box = "ubuntu/trusty64"

  config.vm.provider "virtualbox" do |vb|
    vb.memory = 512 + 2048
    vb.cpus = 1
  end

  config.vm.provision "shell", inline: <<-SHELL
    wget https://media.urbit.org/dist/debian/urbit_0.4.3-1_amd64.deb
    sudo dpkg -i urbit_0.4.3-1_amd64.deb
    sudo apt-get update
    sudo apt-get install -f -y
  SHELL
end
  • Strace of the failing command

Too large to paste or attach on GitHub. You can download it from https://ipfs.io/ipfs/QmbjRAMgLm9xXW539AfHfXMwXV6o6b9GCsLkTjeyJB3PE1.

In case it may be helpful, here is an strace of Urbit operating correctly on Ubuntu 14.04: https://ipfs.io/ipfs/QmWgdzvTz2uB54eBdBwHF7nWReQGWemnnfdzWCuhcCHkCR.

  • Required packages and commands to install

See the steps to reproduce above.

About this issue

  • Original URL
  • State: closed
  • Created 10 years ago
  • Comments: 24 (2 by maintainers)

Most upvoted comments

Below is the tail end of the linked ubuntu-correct.strace (those turn out to be zip files for anyone playing along). The code loops pathologically on /proc/self/maps, segfaulting (it appears by design) on every turn. 2.8 million syscalls on native, with half a million of those being to mprotect() alone. 29,000 segfaults.

Anyway, I am guessing but have not confirmed this is #708 (I haven’t installed it). You can confirm by running "strace -tt -ff -o urbit.strace urbit -c ~/mycomet" and pasting the first few lines of one of the read /proc/self/maps turns. I could be wrong.

There doesn’t seem to be anything resembling a command prompt in the native strace linked; it ends midway through a turn. I could have missed it in the noise though. The WSL strace looks the same, but ends with a mercy SIGKILL, presumptively because #708 will cause this to take forever.

Since we’re here, I’d like to renew my humble request to stub a 'p' in the protection bits. With all the fixes recently, that is one of the few remaining identified problems (contrast ‘only’ problems) with electron.

Native:

[...at this point we're near the end of a /proc/self/maps pass]
read(19, "08:01 5284                      "..., 1024) = 1024
read(19, "f000 r-xp 00000000 08:01 2112   "..., 1024) = 1024
read(19, "1720de6000 ---p 001b3000 08:01 2"..., 1024) = 1024
read(19, "7f1721291000-7f1721292000 r--p 0"..., 1024) = 474
close(19)                               = 0
mprotect(0x38a18000, 16384, PROT_READ|PROT_WRITE) = 0
rt_sigreturn()                          = 3231041697
--- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_ACCERR, si_addr=0x37e0e120} ---
[...and now starting another pass]
open("/proc/self/maps", O_RDONLY)       = 19
read(19, "00400000-004f2000 r-xp 00000000 "..., 1024) = 1024
read(19, "00000 00:00 0 \n363a4000-363a8000"..., 1024) = 1024
read(19, "000000 00:00 0 \n36464000-3646800"..., 1024) = 1024
[...snip]
read(19, " \nb1300000-b1308000 r--p 0000000"..., 1024) = 1024
read(19, "0 \nb2a50000-b2cb8000 r--p 000000"..., 1024) = 1024
read(19, "           /lib/x86_64-linux-gnu"..., 1024) = 1024
read(19, ":01 2261                       /"..., 1024) = 1024
[...snip]
read(19, "/x86_64-linux-gnu/libcurl-gnutls"..., 1024) = 1024
read(19, "                       /lib/x86_"..., 1024) = 1024
read(19, "265                       /lib/x"..., 1024) = 1024
read(19, "721286000 rw-p 00000000 00:00 0 "..., 1024) = 556
close(19)                               = 0
mprotect(0x37e0c000, 16384, PROT_READ|PROT_WRITE) = 0
rt_sigreturn()                          = 3232263176
--- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_ACCERR, si_addr=0x3991bbc8} ---
[...and again]
open("/proc/self/maps", O_RDONLY)       = 19
read(19, "00400000-004f2000 r-xp 00000000 "..., 1024) = 1024
read(19, "00000 00:00 0 \n363a4000-363a8000"..., 1024) = 1024
read(19, 
[the linked native strace ends here]

Tail end of strace on WSL:

read(19, "-7f89bead4000 rw-- 00003000 00:0"..., 1024) = 1024
read(19, ".9\n7f89bef40000-7f89befac000 r-x"..., 1024) = 1024
read(19, "5000 r-x- 00000000 00:00 222518 "..., 1024) = 1024
read(19, "f0000-7f89bf9f1000 rw-- 00000000"..., 1024) = 1006
close(19)                               = 0
mprotect(0xb5b94000, 16384, PROT_READ|PROT_WRITE) = 0
rt_sigreturn()                          = 3048290428
--- SIGSEGV {si_signo=SIGSEGV, si_code=SI_KERNEL, si_addr=0xb5b98000} ---
open("/proc/self/maps", O_RDONLY)       = 19
read(19,  <unfinished ...>
+++ killed by SIGKILL +++

A comet does talk to the network pretty early. If you want an independent startup, the process is a little more involved, but basically: have the maint-20160818 branch of https://github.com/urbit/arvo checked out somewhere, get https://bootstrap.urbit.org/latest.pill, and start up with urbit -c -F -I zod -A arvo/ -B latest.pill zod - more detailed info at http://urbit.org/fora/posts/~2017.1.5..21.31.04..20f3~/.