Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
net: test fails on misconfigured kernels #6843
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.
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.