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: test fails on misconfigured kernels #6843

Closed
fntintash opened this issue Nov 28, 2013 · 3 comments

Comments

Projects
None yet
4 participants
@fntintash
Copy link

commented Nov 28, 2013

What steps will reproduce the problem?
If possible, include a link to a program on play.golang.org.
1. get tip: hg pull -u
2. cd src
3. ./all.bash

What is the expected output?

Everything compiles and tests okay.

What do you see instead?

A kernel panic.

Which compiler are you using (5g, 6g, 8g, gccgo)?

6g.

Which operating system are you using?

Kernel 2.6.26-2-xen-amd64 on a Debian 5.0 system (yes, I know it's obsolete).

Which version are you using?  (run 'go version')

go version devel +bddf2a72f5e1 Wed Nov 27 19:32:15 2013 +1100 linux/amd64

Please provide any additional information below.

This is a little hard to track down properly, since I'm compiling go on a VPS and cannot
see the console kernel messages.  I have two interfaces -- eth0, and the loopback
interface.  There are a few issues here.

#1: if an IPv6 address is assigned to eth0, TestDialMultiFDLeak in
src/pkg/net/dial_test.go causes the system to panic.

I used "ip -6 addr del ... " to delete the IPv6 addresses on eth0 (global,
link-local).  I got past that test.

#2: if the loopback interface has ::1/128, the system panics at seemingly random places.
 I've seen it crash during these tests: TestUnixListenerSpecificMethods,
TestUnixConnSpecificMethods, TestStreamConnServer, TestUDPListenClose

#3: with ::1/128 removed from loopback, there are no crashes.  However, it fails one
test:

=== RUN TestStreamConnServer
--- FAIL: TestStreamConnServer (0.00 seconds)
        server_test.go:218: Dial("tcp", "[::1]:52386") failed: dial tcp [::1]:52386: network is unreachable

I don't expect to use IPv6, so I don't mind disabling it on this server.  Plus, this is
probably a Linux issue, likely fixed in a newer kernel; it doesn't seem to be a problem
with go (except for #3 -- that test should be fixed).  The same version (commit
bddf2a72f5e1) works fine on a 3.2.0-55-virtual system.
@mikioh

This comment has been minimized.

Copy link
Contributor

commented Nov 29, 2013

Comment 1:

There's nothing we can do for Linux 2.6.26, unfortunately. Only thing we can do might be
making tests more adaptive even on misconfigured, like ipv6-enabled but no valid routes
for IP packet routing, environment.

Labels changed: removed priority-triage, go1.3maybe.

Status changed to LongTerm.

@rsc

This comment has been minimized.

Copy link
Contributor

commented Dec 4, 2013

Comment 2:

Labels changed: added repo-main.

@rsc rsc added this to the Unplanned milestone Apr 10, 2015

@rsc rsc removed the repo-main label Apr 14, 2015

@mikioh mikioh added the Testing label May 2, 2015

@mikioh

This comment has been minimized.

Copy link
Contributor

commented May 12, 2016

I think test cases in go1.6 and above work fine. Closing.

@mikioh mikioh closed this May 12, 2016

@golang golang locked and limited conversation to collaborators May 12, 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.