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

net: go1.8 beta test failures on solaris with non-global zones #18362

Closed
ptribble opened this issue Dec 17, 2016 · 6 comments

Comments

Projects
None yet
4 participants
@ptribble
Copy link

commented Dec 17, 2016

Please answer these questions before submitting your issue. Thanks!

What version of Go are you using (go version)?

go version go1.8beta2 solaris/amd64

(also present in 1.8beta1)

What operating system and processor architecture are you using (go env)?

GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="solaris"
GOOS="solaris"
GOPATH="/export/home/ptribble/go"
GORACE=""
GOROOT="/export/home/ptribble/ud/go"
GOTOOLDIR="/export/home/ptribble/ud/go/pkg/tool/solaris_amd64"
GCCGO="gccgo"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build842624664=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"
PKG_CONFIG="pkg-config"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"

What did you do?

Attempt to build go1.8beta2 using all.bash

What did you expect to see?

Successful build

What did you see instead?

Build fails due to a test failure:

--- FAIL: TestResolveIPAddr (0.00s)
iprawsock_test.go:62: #18: got &net.IPAddr{IP:net.IP{0xfe, 0x80, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1}, Zone:"lo0"}; want &net.IPAddr{IP:net.IP{0xfe, 0x80, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1}, Zone:"lo0:1"}
--- FAIL: TestResolveTCPAddr (0.00s)
tcpsock_test.go:334: ResolveTCPAddr("tcp6", "[fe80::1%lo0]:1") = [fe80::1%lo0]:1, , want [fe80::1%lo0:1]:1,
--- FAIL: TestResolveUDPAddr (0.00s)
udpsock_test.go:87: #13: got &net.UDPAddr{IP:net.IP{0xfe, 0x80, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1}, Port:1, Zone:"lo0"}; want &net.UDPAddr{IP:net.IP{0xfe, 0x80, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1}, Port:1, Zone:"lo0:1"}
FAIL
FAIL net 2.195s

This appears to be a new test failure in 1.8, the same host system built earlier versions successfully.

The problem appears to be down to a confusion caused by solaris zones, which lead to multiple virtual interfaces. In this case, ifconfig in the global zone reports 2 instances of the loopback interface, lo0 and lo0:1

lo0: flags=2002000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv6,VIRTUAL> mtu 8252 index 1
inet6 ::1/128
lo0:1: flags=2002000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv6,VIRTUAL> mtu 8252 index 1
zone illumos-build
inet6 ::1/128

If I remove the non-global zone, then the build and tests complete without error, but it may not be possible for all users to do so.

The build and tests succeed in a non-global zone, which only sees its own single instance of the lo interface.

@bradfitz bradfitz changed the title go1.8 beta fails to build clean on solaris systems with non-global zones net: go1.8 beta test failures on solaris with non-global zones Dec 17, 2016

@bradfitz bradfitz added the Testing label Dec 17, 2016

@bradfitz bradfitz modified the milestones: Gccgo, Go1.8 Dec 17, 2016

@bradfitz

This comment has been minimized.

Copy link
Member

commented Dec 17, 2016

/cc @mikioh

@mikioh

This comment has been minimized.

Copy link
Contributor

commented Dec 17, 2016

@ptribble,

Thanks for the report. I'm not sure what's the visibility on isolated routing instances under Solaris container (or zone) framework. Can you show us the output of go test -v -run=Interfaces$ net on some zone that has external network inks? It would be helpful if the zone has both shared- and non-shared (I mean, exclusive) IP network adjacencies. Thanks.

@mikioh mikioh added the OS-Solaris label Dec 17, 2016

@mikioh

This comment has been minimized.

Copy link
Contributor

commented Dec 17, 2016

The real problem would be which is the better to fill up the Zone field of {IP,UDP}Addr on Solaris; a name (opaque string) or index (integer literal)?

@mikioh mikioh removed the Testing label Dec 17, 2016

@ptribble

This comment has been minimized.

Copy link
Author

commented Dec 18, 2016

OK, here you go.

First, here is the global zone with one shared-ip zone:

=== RUN TestInterfaces
--- PASS: TestInterfaces (0.00s)
interface_test.go:78: lo0: flags=up|loopback|multicast index=1 mtu=8232 hwaddr=
interface_test.go:78: lo0:1: flags=up|loopback|multicast index=1 mtu=8232 hwaddr=
interface_test.go:78: e1000g0: flags=up|broadcast|multicast index=2 mtu=1500 hwaddr=b8:ca:3a:b5:7d:f0
interface_test.go:78: e1000g0:1: flags=up|broadcast|multicast index=2 mtu=1500 hwaddr=b8:ca:3a:b5:7d:f0
interface_test.go:78: vboxnet0: flags=up|broadcast|multicast index=3 mtu=1500 hwaddr=08:00:27:53:12:a4
PASS
ok net 0.015s

Then inside the shared-ip zone:

=== RUN TestInterfaces
--- PASS: TestInterfaces (0.00s)
interface_test.go:78: lo0:1: flags=up|loopback|multicast index=1 mtu=8232 hwaddr=
interface_test.go:78: e1000g0:1: flags=up|broadcast|multicast index=2 mtu=1500 hwaddr=b8:ca:3a:b5:7d:f0
PASS
ok net 0.014s

And then inside an exclusive-ip zone:

=== RUN TestInterfaces
--- PASS: TestInterfaces (0.00s)
interface_test.go:78: lo0: flags=up|loopback|multicast index=1 mtu=8232 hwaddr=
interface_test.go:78: znic0: flags=up|broadcast|multicast index=2 mtu=1500 hwaddr=02:08:20:19:fb:a6
PASS
ok net 0.014s

(A zone is either shared-ip or exclusive-ip, you can't mix types.)

@mikioh

This comment has been minimized.

Copy link
Contributor

commented Dec 20, 2016

Thanks for the information.

(A zone is either shared-ip or exclusive-ip, you can't mix types.)

Sounds nice, we can still use interface names for specifying IPv6 zone under Solaris container/zone.

@gopherbot

This comment has been minimized.

Copy link

commented Dec 20, 2016

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

@mikioh mikioh removed their assignment Dec 20, 2016

@gopherbot gopherbot closed this in 86f2c5f Dec 21, 2016

@golang golang locked and limited conversation to collaborators Dec 21, 2017

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.