Skip to content

builders: upgrade OpenBSD builders to 6.0 #16951

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

Closed
4a6f656c opened this issue Sep 1, 2016 · 32 comments
Closed

builders: upgrade OpenBSD builders to 6.0 #16951

4a6f656c opened this issue Sep 1, 2016 · 32 comments
Labels
Builders x/build issues (builders, bots, dashboards) FrozenDueToAge OS-OpenBSD
Milestone

Comments

@4a6f656c
Copy link
Contributor

4a6f656c commented Sep 1, 2016

OpenBSD 6.0 has been released - the Go OpenBSD 386 and amd64 builders should be upgraded, since 5.8 is now unsupported.

@bradfitz bradfitz added the Builders x/build issues (builders, bots, dashboards) label Sep 1, 2016
@bradfitz bradfitz added this to the Unreleased milestone Sep 1, 2016
@bradfitz
Copy link
Contributor

bradfitz commented Sep 1, 2016

Joel, are you volunteering? You touched it last. :)

Otherwise, @mdempsky?

@4a6f656c
Copy link
Contributor Author

4a6f656c commented Sep 2, 2016

Yup, I'm happy to update the scripts.

@gopherbot
Copy link
Contributor

CL https://golang.org/cl/28791 mentions this issue.

gopherbot pushed a commit to golang/build that referenced this issue Sep 9, 2016
Also ensure that expect exits non-zero on timeout.

Updates issue golang/go#16951

Change-Id: I7d182e4b9226b23a2c319f6fc2f849d34ec0b271
Reviewed-on: https://go-review.googlesource.com/28791
Reviewed-by: Brad Fitzpatrick <[email protected]>
@4a6f656c
Copy link
Contributor Author

The env scripts have been updated for 6.0.

@bradfitz over to you!

@zx2c4
Copy link
Contributor

zx2c4 commented Oct 15, 2016

@4a6f656c @bradfitz Have you actually tested that this works?

In particular, is the network configuration under GCE valid? Are you sure dhclient is doing the right thing? I'm having issues.

@mdempsky
Copy link
Contributor

@zx2c4 Sorry, I don't follow your questions. What issues are you having? Are they relevant to the topic at hand of upgrading Go's existing and working GCE-based OpenBSD builders from OpenBSD 5.8 to OpenBSD 6.0?

@andrewchambers
Copy link

andrewchambers commented Nov 20, 2016

I've tried to run the openbsd 6.0 version of this script on a private gce instance and neither inbound or outbound internet traffic work. I'm not quite sure if the builders will work unless the go team has a special configuration done internally.

@bradfitz bradfitz self-assigned this Nov 22, 2016
@bradfitz
Copy link
Contributor

bradfitz commented Dec 8, 2016

Uh, I went to run make.bash and came back to:

...
curl: (6) Couldn't resolve host '0'  
curl: (3) [globbing] unmatched close brace/bracket in column 21  
curl: (6) Couldn't resolve host 'media'  
curl: (6) Couldn't resolve host 'screen'  
curl: (6) Couldn't resolve host 'and'  
curl: (3) [globbing] nested brace in column 23  
curl: (3) [globbing] unmatched close brace/bracket in column 27  
curl: (6) Couldn't resolve host 'only'  
curl: (6) Couldn't resolve host 'screen'  
curl: (6) Couldn't resolve host 'and'  
curl: (3) [globbing] nested brace in column 30  
curl: (6) Couldn't resolve host 'no-repeat'  
curl: (6) Couldn't resolve host '0%'  
curl: (6) Couldn't resolve host '0%'  
curl: (6) Couldn't resolve host '100%;-moz-border-image'  
curl: (3) [globbing] unmatched close brace/bracket in column 2  
curl: (6) Couldn't resolve host 'only'  
curl: (6) Couldn't resolve host 'screen'  
curl: (6) Couldn't resolve host 'and'  
curl: (3) [globbing] nested brace in column 41  
curl: (6) Couldn't resolve host 'no-repeat;-webkit-background-size'  
curl: (3) [globbing] unmatched close brace/bracket in column 5  
curl: (6) Couldn't resolve host '<'  
curl: (6) Couldn't resolve host '<a'  
curl: (6) Couldn't resolve host 'href='  
curl: (6) Couldn't resolve host 'id=logo'  
curl: (6) Couldn't resolve host 'aria-label=Google><'  
curl: (6) Couldn't resolve host '<p><b>404.<'  
curl: (6) Couldn't resolve host '<ins>ThatArchiving disk.raw... (this may take a while)  
Done. GCE image is openbsd-amd64-gce.tar.gz.  

Um.

@bradfitz
Copy link
Contributor

bradfitz commented Dec 8, 2016

Scrolling up,

...
+ cat /etc/resolv.conf
# Generated by vio0 dhclient
nameserver 10.0.2.3
lookup file bind
+ dig metadata.google.internal

; <<>> DiG 9.4.2-P2 <<>> metadata.google.internal
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 62725
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;metadata.google.internal.      IN      A

;; ANSWER SECTION:
metadata.google.internal. 3600  IN      A       169.254.169.254

;; Query time: 58 msec
;; SERVER: 10.0.2.3#53(10.0.2.3)
;; WHEN: Wed Dec  7 18:24:13 2016
;; MSG SIZE  rcvd: 58

+ set -e
+ export PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin
+ /usr/local/bin/curl -H Metadata-Flavor: Google http://metadata.google.internal/computeMetadata/v1/instance/attributes/buildlet-binary-url
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1619  100  1619    0     0  16965      0 --:--:-- --:--:-- --:--:-- 44972  
+ /usr/local/bin/curl -o /buildlet <!DOCTYPE html> <html lang=en> <meta charset=utf-8> <meta name=viewport content="initial-scale=1, minimum-scale=1, width=device-width"> <title>Error 404 (Not Found)!!1</title> <style> *{margin:0;padding:0}html,code{font:15px/22px arial,sans-serif}html{background:#fff;color:#222;padding:15px}body{margin:7% auto 0;max-width:390px;min-height:180px;padding:30px 0 15px}* > body{background:url(//www.google.com/images/errors/robot.png) 100% 5px no-repeat;padding-right:205px}p{margin:11px 0 22px;overflow:hidden}ins{color:#777;text-decoration:none}a img{border:0}@media screen and (max-width:772px){body{background:none;margin-top:0;max-width:none;padding-right:0}}#logo{background:url(//www.google.com/images/branding/googlelogo/1x/googlelogo_color_150x54dp.png) no-repeat;margin-left:-5px}@media only screen and (min-resolution:192dpi){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat 0% 0%/100% 100%;-moz-border-image:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) 0}}@media only screen and (-webkit-min-device-pixel-ratio:2){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat;-webkit-background-size:100% 100%}}#logo{display:inline-block;height:54px;width:150px} </style> <a href=//www.google.com/><span id=logo aria-label=Google></span></a> <p><b>404.</b> <ins>That’s an error.</ins> <p>The requested URL <code>/computeMetadata/v1/instance/attributes/buildlet-binary-url</code> was not found on this server. <ins>That’s all we know.</ins>    
curl: (6) Couldn't resolve host '<!DOCTYPE'
curl: (6) Couldn't resolve host 'html>'                           
curl: (6) Couldn't resolve host '<html'
curl: (6) Couldn't resolve host 'lang=en>'
curl: (6) Couldn't resolve host '<meta'
curl: (6) Couldn't resolve host 'charset=utf-8>'
curl: (6) Couldn't resolve host '<meta'
...

@gopherbot
Copy link
Contributor

CL https://golang.org/cl/34138 mentions this issue.

@andrewchambers
Copy link

@bradfitz A stab in the dark, but for me the MTU on freebsd had to be explicitly set to 1460 or else it failed in strange ways. I didn't get around to trying openbsd again.

@bradfitz
Copy link
Contributor

bradfitz commented Dec 8, 2016

@andrewchambers, yeah, plan9 also had an MTU issue like that, since GCE has a weird MTU.

@bradfitz
Copy link
Contributor

bradfitz commented Dec 8, 2016

Here's the current OpenBSD boot log on GCE:

SeaBIOS (version 1.8.2-20160912_142702-google)
Total RAM Size = 0x00000000e6600000 = 3686 MiB
CPUs found: 4     Max CPUs supported: 4
found virtio-scsi at 0:3
virtio-scsi vendor='Google' product='PersistentDisk' rev='1' type=0 removable=0
virtio-scsi blksize=512 sectors=20971520 = 10240 MiB
drive 0x000f46d0: PCHS=0/0/0 translation=lba LCHS=1024/255/63 s=20971520
Booting from Hard Disk 0...
>> OpenBSD/amd64 BOOT 3.31

boot> 

\�|�/�-�\�|�/�booting hd0a:/bsd: ....

entry point at 0x1001000 [7205c766, 34000004, 24448b12, 3be0a304]

[ using 1210472 bytes of bsd ELF symbol table ]

Copyright (c) 1982, 1986, 1989, 1991, 1993

	The Regents of the University of California.  All rights reserved.

Copyright (c) 1995-2016 OpenBSD. All rights reserved.  http://www.OpenBSD.org


OpenBSD 6.0 (GENERIC.MP) #2319: Tue Jul 26 13:00:43 MDT 2016

    [email protected]:/usr/src/sys/arch/amd64/compile/GENERIC.MP

real mem = 3848261632 (3669MB)

avail mem = 3727159296 (3554MB)

mpath0 at root

scsibus0 at mpath0: 256 targets

mainbus0 at root

bios0 at mainbus0: SMBIOS rev. 2.4 @ 0xf4750 (16 entries)

bios0: vendor Google version "Google" date 01/01/2011

bios0: Google Google Compute Engine

acpi0 at bios0: rev 0

acpi0: sleep states S3 S4 S5

acpi0: tables DSDT FACP SSDT APIC WAET

acpi0: wakeup devices

acpitimer0 at acpi0: 3579545 Hz, 24 bits

acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat

cpu0 at mainbus0: apid 0 (boot processor)

cpu0: Intel(R) Xeon(R) CPU @ 2.50GHz, 2500.36 MHz

cpu0: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,SS,HTT,SSE3,PCLMUL,SSSE3,CX16,SSE4.1,SSE4.2,x2APIC,POPCNT,AES,XSAVE,AVX,F16C,RDRAND,HV,NXE,PAGE1GB,LONG,LAHF,ITSC,FSGSBASE,SMEP,ERMS

cpu0: 256KB 64b/line 8-way L2 cache

cpu0: smt 0, core 0, package 0

mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges

cpu0: apic clock running at 989MHz

cpu1 at mainbus0: apid 1 (application processor)

cpu1: Intel(R) Xeon(R) CPU @ 2.50GHz, 2475.04 MHz

cpu1: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,SS,HTT,SSE3,PCLMUL,SSSE3,CX16,SSE4.1,SSE4.2,x2APIC,POPCNT,AES,XSAVE,AVX,F16C,RDRAND,HV,NXE,PAGE1GB,LONG,LAHF,ITSC,FSGSBASE,SMEP,ERMS

cpu1: 256KB 64b/line 8-way L2 cache

cpu1: smt 1, core 0, package 0

cpu2 at mainbus0: apid 2 (application processor)

cpu2: Intel(R) Xeon(R) CPU @ 2.50GHz, 2475.04 MHz

cpu2: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,SS,HTT,SSE3,PCLMUL,SSSE3,CX16,SSE4.1,SSE4.2,x2APIC,POPCNT,AES,XSAVE,AVX,F16C,RDRAND,HV,NXE,PAGE1GB,LONG,LAHF,ITSC,FSGSBASE,SMEP,ERMS

cpu2: 256KB 64b/line 8-way L2 cache

cpu2: smt 0, core 1, package 0

cpu3 at mainbus0: apid 3 (application processor)

cpu3: Intel(R) Xeon(R) CPU @ 2.50GHz, 2475.03 MHz

cpu3: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,SS,HTT,SSE3,PCLMUL,SSSE3,CX16,SSE4.1,SSE4.2,x2APIC,POPCNT,AES,XSAVE,AVX,F16C,RDRAND,HV,NXE,PAGE1GB,LONG,LAHF,ITSC,FSGSBASE,SMEP,ERMS

cpu3: 256KB 64b/line 8-way L2 cache

cpu3: smt 1, core 1, package 0

ioapic0 at mainbus0: apid 0 pa 0xfec00000, version 11, 24 pins

acpiprt0 at acpi0: bus 0 (PCI0)

acpicpu0 at acpi0: C1(@1 halt!)

acpicpu1 at acpi0: C1(@1 halt!)

acpicpu2 at acpi0: C1(@1 halt!)

acpicpu3 at acpi0: C1(@1 halt!)

"ACPI0006" at acpi0 not configured

"PNP0303" at acpi0 not configured

"PNP0F13" at acpi0 not configured

"PNP0501" at acpi0 not configured

"PNP0501" at acpi0 not configured

"PNP0501" at acpi0 not configured

"PNP0501" at acpi0 not configured

"QEMU0001" at acpi0 not configured

"ACPI0007" at acpi0 not configured

"ACPI0007" at acpi0 not configured

"ACPI0007" at acpi0 not configured

"ACPI0007" at acpi0 not configured

pvbus0 at mainbus0: KVM

pci0 at mainbus0 bus 0

pchb0 at pci0 dev 0 function 0 "Intel 82441FX" rev 0x02

pcib0 at pci0 dev 1 function 0 "Intel 82371AB PIIX4 ISA" rev 0x03

piixpm0 at pci0 dev 1 function 3 "Intel 82371AB Power" rev 0x03: SMBus disabled

virtio0 at pci0 dev 3 function 0 "Qumranet Virtio SCSI" rev 0x00

vioscsi0 at virtio0: qsize 8192

scsibus1 at vioscsi0: 253 targets

sd0 at scsibus1 targ 1 lun 0: <Google, PersistentDisk, 1> SCSI4 0/direct fixed serial.Google_PersistentDisk_

sd0: 10240MB, 512 bytes/sector, 20971520 sectors, thin

virtio0: msix shared

virtio1 at pci0 dev 4 function 0 "Qumranet Virtio Network" rev 0x00

vio0 at virtio1: address 42:01:0a:f0:00:0a

virtio1: msix per-VQ

isa0 at pcib0

isadma0 at isa0

com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo

com0: console

com1 at isa0 port 0x2f8/8 irq 3: ns16550a, 16 byte fifo

com2 at isa0 port 0x3e8/8 irq 5: ns16550a, 16 byte fifo

pckbc0 at isa0 port 0x60/5 irq 1 irq 12

pckbd0 at pckbc0 (kbd slot)

wskbd0 at pckbd0 mux 1

pms0 at pckbc0 (aux slot)

wsmouse0 at pms0 mux 0

pcppi0 at isa0 port 0x61

spkr0 at pcppi0

nvram: invalid checksum

vscsi0 at root

scsibus2 at vscsi0: 256 targets

softraid0 at root

scsibus3 at softraid0: 256 targets

root on sd0a (2132435f8ddf596a.a) swap on sd0b dump on sd0b

clock: unknown CMOS layout

Automatic boot in progress: starting file system checks.
/dev/sd0a (2132435f8ddf596a.a): file system is clean; not checking
setting tty flags
pf enabled
starting network
DHCPREQUEST on vio0 to 255.255.255.255
DHCPNACK from 169.254.169.254 (42:01:0a:f0:00:01)
DHCPDISCOVER on vio0 - interval 3
DHCPOFFER from 169.254.169.254 (42:01:0a:f0:00:01)
DHCPREQUEST on vio0 to 255.255.255.255
DHCPACK from 169.254.169.254 (42:01:0a:f0:00:01)
bound to 10.240.0.10 -- renewal in 43200 seconds.
reordering libraries: done.
starting early daemons: syslogd pflogd ntpd.
starting RPC daemons:.
savecore: no core dump
checking quotas: done.
clearing /tmp
kern.securelevel: 0 -> 1
creating runtime link editor directory cache.
preserving editor files.
starting network daemons: sshd smtpd sndiod.
+ echo starting buildlet script
starting buildlet script
+ netstat -rn
Routing tables

Internet:
Destination        Gateway            Flags   Refs      Use   Mtu  Prio Iface
default            10.240.0.1         UGS        0       99     -     8 vio0 
224/4              127.0.0.1          URS        0        0 32768     8 lo0  
10.240.0.1/32      10.240.0.10        UCS        0      200     -     8 vio0 
10.240.0.10        42:01:0a:f0:00:0a  UHLl       0        3     -     1 vio0 
10.240.0.10/32     10.240.0.10        UC         0        0     -     4 vio0 
127/8              127.0.0.1          UGRS       0        0 32768     8 lo0  
127.0.0.1          127.0.0.1          UHl        1        1 32768     1 lo0  

Internet6:
Destination                        Gateway                        Flags   Refs      Use   Mtu  Prio Iface
::/96                              ::1                            UGRS       0        0 32768     8 lo0  
::/104                             ::1                            UGRS       0        0 32768     8 lo0  
::1                                ::1                            UHl       14       14 32768     1 lo0  
::127.0.0.0/104                    ::1                            UGRS       0        0 32768     8 lo0  
::224.0.0.0/100                    ::1                            UGRS       0        0 32768     8 lo0  
::255.0.0.0/104                    ::1                            UGRS       0        0 32768     8 lo0  
::ffff:0.0.0.0/96                  ::1                            UGRS       0        0 32768     8 lo0  
2002::/24                          ::1                            UGRS       0        0 32768     8 lo0  
2002:7f00::/24                     ::1                            UGRS       0        0 32768     8 lo0  
2002:e000::/20                     ::1                            UGRS       0        0 32768     8 lo0  
2002:ff00::/24                     ::1                            UGRS       0        0 32768     8 lo0  
fe80::/10                          ::1                            UGRS       0        0 32768     8 lo0  
fec0::/10                          ::1                            UGRS       0        0 32768     8 lo0  
fe80::1%lo0                        fe80::1%lo0                    UHl        0        0 32768     1 lo0  
ff01::/16                          ::1                            UGRS       0        0 32768     8 lo0  
ff01::%lo0/32                      ::1                            Um         0        1 32768     4 lo0  
ff02::/16                          ::1                            UGRS       0        0 32768     8 lo0  
ff02::%lo0/32                      ::1                            Um         0        1 32768     4 lo0  
+ cat /etc/resolv.conf
# Generated by vio0 dhclient
search c.symbolic-datum-552.internal. google.internal.
nameserver 169.254.169.254
lookup file bind
+ dig metadata.google.internal

; <<>> DiG 9.4.2-P2 <<>> metadata.google.internal
;; global options:  printcmd
;; connection timed out; no servers could be reached
+ set -e
+ export PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin
+ /usr/local/bin/curl --fail -H Metadata-Flavor: Google http://metadata.google.internal/computeMetadata/v1/instance/attributes/buildlet-binary-url
curl: (6) Couldn't resolve host 'metadata.google.internal'
+ /usr/local/bin/curl -o /buildlet
curl: no URL specified!
curl: try 'curl --help' or 'curl --manual' for more information
+ echo giving up
giving up
+ sleep 10
+ halt -p
init: /bin/sh on /etc/rc terminated abnormally, going to single user mode

init: kernel security level changed from 1 to 0

init: single user shell terminated.

@bradfitz
Copy link
Contributor

bradfitz commented Dec 8, 2016

@4a6f656c, see log above. Why isn't DNS working?

/cc @mdempsky

@andrewchambers
Copy link

I don't know if you have tried, but I had luck using the experimental serial port UI to login after explicitly enabling it. It was better than print debugging.

https://cloud.google.com/compute/docs/instances/interacting-with-serial-console

gopherbot pushed a commit to golang/build that referenced this issue Dec 8, 2016
Updates golang/go#16951

Change-Id: I23fdef7fb99e9c5587c0bc0be5d5ddd2b27a145a
Reviewed-on: https://go-review.googlesource.com/34138
Reviewed-by: Joel Sing <[email protected]>
@bradfitz
Copy link
Contributor

bradfitz commented Dec 8, 2016

I don't know if you have tried, but I had luck using the experimental serial port UI to login after explicitly enabling it. It was better than print debugging.

I don't really know anything about OpenBSD. I just have access to deploy things. I depend on other people to give me working VM images for each environment we run Go tests on.

@bradfitz
Copy link
Contributor

bradfitz commented Dec 8, 2016

@4a6f656c, do you want to force the MTU size to be 1420 (GCE's limit)? I can't imagine our DNS request packets are over that, though.

@quentinmit
Copy link
Contributor

@bradfitz

Why does that log make you think DNS isn't working? It looks to me like it's just a 404 from Google's metadata server.

@bradfitz
Copy link
Contributor

bradfitz commented Dec 8, 2016

@quentinmit, I think you're looking at the wrong long. The first log indeed was a 404, was expected. The problem there was a lack of curl --fail flag. The first log runs under qemu and is where we snapshot the disk image at the end that becomes the GCE disk image.

The last log is actually running on GCE. It contains:

+ dig metadata.google.internal

; <<>> DiG 9.4.2-P2 <<>> metadata.google.internal
;; global options:  printcmd
;; connection timed out; no servers could be reached
+ set -e
+ export PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin
+ /usr/local/bin/curl --fail -H Metadata-Flavor: Google http://metadata.google.internal/computeMetadata/v1/instance/attributes/buildlet-binary-url
curl: (6) Couldn't resolve host 'metadata.google.internal'
+ /usr/local/bin/curl -o /buildlet

That is why I don't think DNS is working. There's no 404 there.

@bradfitz
Copy link
Contributor

bradfitz commented Dec 8, 2016

In any case, @4a6f656c says he's on it.

@gopherbot
Copy link
Contributor

CL https://golang.org/cl/34172 mentions this issue.

gopherbot pushed a commit to golang/build that referenced this issue Dec 9, 2016
The network configuration specified by the GCE DHCP server does not
work correctly on OpenBSD 6.0. Add a hack that reconfigures the
network using a 10.0.0.0/8 network with a high priority route.

Updates golang/go#16951

Change-Id: I8100f34ac48411c885478e72c083754e57c14aa7
Reviewed-on: https://go-review.googlesource.com/34172
Reviewed-by: Matthew Dempsky <[email protected]>
@bradfitz
Copy link
Contributor

bradfitz commented Dec 9, 2016

So, I guess we need a new bootstrap tarball? But even if I build https://storage.googleapis.com/golang/go1.4-bootstrap-20161024.tar.gz (see https://golang.org/doc/install/source#go14) on OpenBSD 6.0 with the system C compiler, will it produces binaries which run on OpenBSD 6.0?

$ gomote create openbsd-amd64-gce60
user-bradfitz-openbsd-amd64-gce60-0

$ gomote push user-bradfitz-openbsd-amd64-gce60-0
2016/12/09 21:02:23 installing go1.4
2016/12/09 21:02:32 Remote doesn't have "src/crypto/rc4/rc4_amd64.s"
2016/12/09 21:02:32 Remote doesn't have "src/encoding/json/decode.go"
2016/12/09 21:02:32 Remote doesn't have "src/internal/syscall/windows/registry/registry_test.go"
2016/12/09 21:02:32 Remote doesn't have "api/go1.7.txt"
2016/12/09 21:02:32 Remote doesn't have "misc/cgo/test/callback.go"
2016/12/09 21:02:32 Remote doesn't have "test/interface/private.dir/prog.go"
2016/12/09 21:02:32 Remote doesn't have "src/cmd/fix/doc.go"
...
2016/12/09 21:02:32 Remote lacks a VERSION file; sending a fake one
2016/12/09 21:02:42 Uploading 6170 new/changed files; 40104505 byte .tar.gz

$ gomote run user-bradfitz-openbsd-amd64-gce60-0 go/src/make.bash
##### Building Go bootstrap tool.
cmd/dist
go: can't load library 'libpthread.so.19.0'
Error running run: exit status 4

Or do we just need libpthread?

@bradfitz
Copy link
Contributor

bradfitz commented Dec 9, 2016

I built a GOROOT_BOOTSTRAP directory from Linux (using bootstrap.bash from master) and it seems to work now.

@bradfitz
Copy link
Contributor

bradfitz commented Dec 9, 2016

But make.bash takes 1m54.420s on OpenBSD, but 0m53.694s on the same VM+SSD storage with Linux.

Can we make the OpenBSD VM's /tmp be a ramdisk or tmpfs or whatever?

The buildlet is already doing:

        out, err := exec.Command("/sbin/mount", "-u", "-o", "async,noatime", "/").CombinedOutput()

At start, before the build starts.

@bradfitz
Copy link
Contributor

bradfitz commented Dec 9, 2016

And I can confirm from the serial console logs that this remount is still succeeding with OpenBSD 6.0:

        // Tested on OpenBSD and FreeBSD:                                                                                                                          
        out, err := exec.Command("/sbin/mount", "-u", "-o", "async,noatime", "/").CombinedOutput()
        if err != nil {
                log.Printf("Warning: failed to remount %s root filesystem with async,noatime: %v, %s", runtime.GOOS, err, out)
                return
        }
        log.Printf("Remounted / with async,noatime.")

I see that final log line in the serial output.

@bradfitz
Copy link
Contributor

Does this OpenBSD 6.0 kernel not have tmpfs support?

$ gomote run -system $MOTE mkdir /tmpfs
mkdir: /tmpfs: File exists
Error running run: exit status 1
$ gomote run -system $MOTE /sbin/mount_tmpfs tmpfs /tmpfs
mount_tmpfs: tmpfs on /tmpfs: Operation not supported
Error running run: exit status 1

http://man.openbsd.org/options suggests we need "option TMPFS"?

@gopherbot
Copy link
Contributor

CL https://golang.org/cl/34276 mentions this issue.

gopherbot pushed a commit to golang/build that referenced this issue Dec 10, 2016
Start of OpenBSD 6.0 builders. Not trybots yet, and don't have 386 yet.

Waiting on tmpfs resolution first, and then I'll delete the 5.8 builders.

Updates golang/go#16951

Change-Id: Ib9c68090d531344125ac5410e732ae0c664a0dc4
Reviewed-on: https://go-review.googlesource.com/34276
Reviewed-by: Brad Fitzpatrick <[email protected]>
@mdempsky
Copy link
Contributor

http://man.openbsd.org/options suggests we need "option TMPFS"?

Looks like it was disabled for 6.0 due to lack of maintenance: http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/sys/conf/GENERIC#rev1.229

@bradfitz
Copy link
Contributor

Hah:

https://www.openbsd.org/60.html :

Assorted improvements

o tmpfs not enabled by default

Cool improvement.

@bradfitz
Copy link
Contributor

I'll proceed now with updating 386 and switching everything to 6.0, including TryBots.

But then we really need to make OpenBSD faster somehow. Throwing lots of machines at it is pretty painful and doesn't help the 2 minute serial make.bash step.

Is http://man.openbsd.org/OpenBSD-current/man8/newfs.8 (make_mfs?) the OpenBSD equivalent we should be usig?

Or we can just recompile the kernel with tmpfs support? Sounds like it's disabled and not deleted for now.

@4a6f656c
Copy link
Contributor Author

Re bootstrapping, we could just install the go package from 6.0 (1.6.3) to avoid a custom bootstrap.

Re tmpfs, I would suggest using mfs instead - it is enabled by default and supported, the main difference being that it allocates memory upfront instead of dynamically acquiring and returning it like tmpfs does. mfs is also solid, while tmpfs still has bugs which is why it was disabled.

Something like the following should work:

$ mount -t mfs -o rw,nodev,nosuid,-s=1G /dev/sd0b /tmp

Or we could add it to /etc/fstab as part of the image build:

8625574a04630691.b /tmp mfs rw,nodev,nosuid,-s=1G 0 0

@gopherbot
Copy link
Contributor

CL https://golang.org/cl/34384 mentions this issue.

gopherbot pushed a commit to golang/build that referenced this issue Dec 14, 2016
Updates golang/go#16951

Change-Id: I7b92363671e0ba4c6ab80cef60e7c8600687f440
Reviewed-on: https://go-review.googlesource.com/34384
Reviewed-by: Matthew Dempsky <[email protected]>
@golang golang locked and limited conversation to collaborators Dec 14, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Builders x/build issues (builders, bots, dashboards) FrozenDueToAge OS-OpenBSD
Projects
None yet
Development

No branches or pull requests

7 participants