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

x/net/icmp: TestNonPrivilegedPing test failure on Ubuntu 15.10 (ppc64le) while building go supplementary network library #15233

Closed
MaheshWaidande opened this issue Apr 11, 2016 · 4 comments

Comments

@MaheshWaidande
Copy link

Hi All,

I am working porting go supplementary network libraries https://godoc.org/golang.org/x/net on ppc64le architecture. I am using Ubuntu 15.10 on top of ppc64le hardware. I have successfully built go supplementary network repository on ppc64le but while running automated test cases I observe that ‘TestNonPrivilegedPing’ test case fail with ‘you may need to adjust the net.ipv4.ping_group_range kernel state / permission denied ‘messages. I am compiling and testing go networking repository as a root user so I don’t know why I am getting ‘permission denied’ message.

Below is the description of test case failure on Ubuntu 15.10,

--- FAIL: TestNonPrivilegedPing (0.00s)
ping_test.go:73: you may need to adjust the net.ipv4.ping_group_range kernel state
ping_test.go:80: socket: permission denied
ping_test.go:80: socket: permission denied
=== RUN TestPrivilegedPing
--- FAIL: TestPrivilegedPing (0.40s)
ping_test.go:101: write ip6 ::->2404:6800:4009:807::2004: sendto: network is unreachable
FAIL
FAIL golang.org/x/net/icmp 0.409s
=== RUN TestIDNA

I performed below steps for compiling / building go supplementary network library on Ubuntu 15.10 (ppc64le)

Step 1: Update repositories and install required packages to build go repository
$ apt-get update && apt-get install -y git golang-go

Step 2: Create workspace to build go network repository
$ mkdir workspace
$ cd workspace/
$ mkdir bin src pkg
$ cd src/
$ mkdir -p golang.org/x
$ cd golang.org/x

Step 3: Clone go networking repository and other source for required building go network repository
$ git clone https://github.com/golang/text.git
$ git clone https://github.com/golang/crypto.git
$ git clone https://github.com/golang/net.git
$ cd /workspace/src

Step 4: Set environment variables required compile repository
$ export GOPATH=/workspace
$ export PATH=$PATH:$GOPATH/bin

Step 5: build and test go networking repository
$ go test -v ./...

I followed same steps on Ubuntu 15.10 + amd64 combination and got exactly same result. ‘TestPrivilegedPing’ test case fails with same messages which I have seen on Ubuntu 15.10 + ppc64le combination

Any pointers/suggestions on failed test case will be great help.

Below is additional information required for debug / resolve /reproduce test case failure,

  1. What version of Go are you using (go version)?
    $ go version
    go version go1.4.2 gccgo (Ubuntu 5.2.1-22ubuntu2) 5.2.1 20151010 linux/ppc64le
  2. What operating system and processor architecture are you using (go env)?

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 15.10
Release: 15.10
Codename: wily

$ go env
GOARCH="ppc64le"
GOBIN=""
GOCHAR="9"
GOEXE=""
GOHOSTARCH="ppc64le"
GOHOSTOS="linux"
GOOS="linux"
GOPATH=""
GORACE=""
GOROOT="/usr"
GOTOOLDIR="/usr/lib/gcc/powerpc64le-linux-gnu/5"
CC="/usr/bin/gcc-5"
GOGCCFLAGS="-fPIC -pthread -fmessage-length=0"
CXX="/usr/bin/g++-5"
CGO_ENABLED="1"

$ uname -a
Linux 9de5feaaf936 3.16.0-30-generic #40-Ubuntu SMP Mon Jan 12 22:07:11 UTC 2015 ppc64le ppc64le ppc64le GNU/Linux

  1. What did you do?
    I am working porting go supplementary networking libraries https://godoc.org/golang.org/x/net on ppc64le architecture. Already provided steps to reproduce test case failure
  2. What did you expect to see?
    No test case failure on Ubuntu 15.10 + ppc64le combination
  3. What did you see instead?
    Automated test case execution failed due to failure of ‘TestPrivilegedPing’ test case
@bradfitz
Copy link
Contributor

Are you actually root with all capabilities, or are you user "root" in some restricted container?

@bradfitz bradfitz changed the title ‘TestNonPrivilegedPing’ test failure on Ubuntu 15.10 (ppc64le) while building go supplementary network library net: TestNonPrivilegedPing test failure on Ubuntu 15.10 (ppc64le) while building go supplementary network library Apr 11, 2016
@bradfitz bradfitz changed the title net: TestNonPrivilegedPing test failure on Ubuntu 15.10 (ppc64le) while building go supplementary network library x/net: TestNonPrivilegedPing test failure on Ubuntu 15.10 (ppc64le) while building go supplementary network library Apr 11, 2016
@bradfitz bradfitz added this to the Unreleased milestone Apr 11, 2016
@bradfitz
Copy link
Contributor

/cc @mikioh

@mikioh mikioh changed the title x/net: TestNonPrivilegedPing test failure on Ubuntu 15.10 (ppc64le) while building go supplementary network library x/net/icmp: TestNonPrivilegedPing test failure on Ubuntu 15.10 (ppc64le) while building go supplementary network library Apr 11, 2016
@mikioh
Copy link
Contributor

mikioh commented Apr 11, 2016

I am compiling and testing go networking repository as a root user so I don’t know why I am getting ‘permission denied’ message.

I'd recommend having a look at the on-line manual.

ICMP(7)                   Linux Programmer's Manual                  ICMP(7)

ping_group_range (two integers; default: see below; since Linux 2.6.39)
              Range of the group IDs (minimum and maximum group IDs,
              inclusive) that are allowed to create ICMP Echo sockets.  The
              default is "1 0", which means no group is allowed to create
              ICMP Echo sockets.

@mikioh
Copy link
Contributor

mikioh commented Apr 11, 2016

Closing. If you have any questions, please follow: https://github.com/golang/go/wiki/Questions.

@mikioh mikioh closed this as completed Apr 11, 2016
@golang golang locked and limited conversation to collaborators Apr 12, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants