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

runtime: TestFreeBSDNumCPU fails #25924

Closed
devnexen opened this issue Jun 16, 2018 · 10 comments

Comments

Projects
None yet
5 participants
@devnexen
Copy link
Contributor

commented Jun 16, 2018

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

go devel

Does this issue reproduce with the latest release?

yes

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

FreeBSD 11

What did you do?

unit tests

What did you expect to see?

num cpu test fails due to causer output

@martisch

This comment has been minimized.

Copy link
Member

commented Jun 16, 2018

Please provide more information:

  • what is the error reported and which command was run that did lead to the error
  • what is the output of "go env"
  • what is the full output of "go version"
  • if it is a git checkout what is the output of "git rev-parse HEAD"
  • which test is the num cpu test referring to? ( I cant find a num cpu test in internal/cpu)
@devnexen

This comment has been minimized.

Copy link
Contributor Author

commented Jun 16, 2018

an error output as
FAIL: TestFreeBSDNumCPU (0.02s) numcpu_freebsd_test.go:13: expected "OK\n", but got: fail to launch child 'cpuset -l 0,1 pid 77295 domain policy: first-touch mask: 0 /tmp/go-build095241536/testprog.exe FreeBSDNumCPUHelper', error: exit status 1, output: cpuset: Malformed list 0,1 pid 77295 domain policy: first-touch mask: 0

@devnexen

This comment has been minimized.

Copy link
Contributor Author

commented Jun 16, 2018

proposed PR #25920

@martisch martisch changed the title internal/cpu: freebsd num cpu runtime: TestFreeBSDNumCPU fails Jun 16, 2018

@martisch martisch added the NeedsFix label Jun 16, 2018

@martisch martisch added this to the Go1.11 milestone Jun 16, 2018

@martisch martisch added the OS-FreeBSD label Jun 16, 2018

@martisch

This comment has been minimized.

Copy link
Member

commented Jun 16, 2018

Thanks. Changed the title as that test does not seem to be using or is part of internal/cpu but is in the runtime package.

@martisch

This comment has been minimized.

Copy link
Member

commented Jun 16, 2018

On FreeBSD 11.1-RELEASE-p10 with go version devel +b459e00454 Sat Jun 16 13:35:45 2018 +0000 freebsd/amd64 ./all.bash and go test -run=TestFreeBSDNumCPU runs fine on my test machine.

Is there any special setup needed to reproduce the error?

$ go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/martisch/.cache/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="freebsd"
GOOS="freebsd"
GOPATH="/home/martisch/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/home/martisch/go"
GOTMPDIR=""
GOTOOLDIR="/usr/home/martisch/go/pkg/tool/freebsd_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build265726306=/tmp/go-build -gno-record-gcc-switches"
VGOMODROOT=""
@devnexen

This comment has been minimized.

Copy link
Contributor Author

commented Jun 16, 2018

I run snapshot, witness, develop symbols and everything maybe that s why.

@gopherbot

This comment has been minimized.

Copy link

commented Jun 17, 2018

Change https://golang.org/cl/119355 mentions this issue: runtime: fix #25924 freebsd num cpu unit test

devnexen added a commit to devnexen/go that referenced this issue Jun 17, 2018

runtime: fix FreeBSDNumCPU test
catches the subset of cpuset -g output
fixes golang#25924

devnexen added a commit to devnexen/go that referenced this issue Jun 17, 2018

runtime: fix FreeBSDNumCPU test
num cpu unit test fixes for FreeBSD.
cpuset -g can possibly output more
data than expected.

Fixes golang#25924
@gopherbot

This comment has been minimized.

Copy link

commented Jun 17, 2018

Change https://golang.org/cl/119376 mentions this issue: runtime: fix FreeBSDNumCPU test

@gopherbot gopherbot closed this in 65d55a1 Jun 19, 2018

@uvelichitel

This comment has been minimized.

Copy link

commented Jan 12, 2019

$ ./all.bash
...
ok regexp/syntax 0.658s
--- FAIL: TestFreeBSDNumCPU (0.01s)
numcpu_freebsd_test.go:13: expected "OK\n", but got:
runtime.NumCPU() expected to 41, got 40 when run with CPU list 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39
FAIL
FAIL runtime 13.645s
ok runtime/debug 0.090s
...
$ go version
go version devel +bfaf11c158 Wed Dec 26 05:21:41 2018 +0000 freebsd/amd64
$ go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/uvelichitel/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="freebsd"
GOOS="freebsd"
GOPATH="/home/uvelichitel/gospace"
GOPROXY=""
GORACE=""
GOROOT="/home/uvelichitel/go"
GOTMPDIR=""
GOTOOLDIR="/home/uvelichitel/go/pkg/tool/freebsd_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build760623772=/tmp/go-build -gno-record-gcc-switches"
$ uname -a
FreeBSD yept.ru 12.0-RELEASE-p2 FreeBSD 12.0-RELEASE-p2 GENERIC amd64
$ dmesg | grep CPU
CPU: Intel(R) Xeon(R) CPU E5-2680 v2 @ 2.80GHz (2793.33-MHz K8-class CPU)
FreeBSD/SMP: Multiprocessor System Detected: 40 CPUs
cpu0: numa-domain 0 on acpi0
coretemp0: numa-domain 0 on cpu0

@ianlancetaylor

This comment has been minimized.

Copy link
Contributor

commented Jan 12, 2019

@uvelichitel This issue is closed and we think it's been fixed. Please open a new issue with the problem that you are seeing. Thanks.

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