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: TestPingPongHog fails randomly #52421

Closed
zhangyunhao116 opened this issue Apr 19, 2022 · 2 comments
Closed

runtime: TestPingPongHog fails randomly #52421

zhangyunhao116 opened this issue Apr 19, 2022 · 2 comments
Labels
NeedsInvestigation

Comments

@zhangyunhao116
Copy link
Contributor

@zhangyunhao116 zhangyunhao116 commented Apr 19, 2022

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

$ go version
go version go1.18.1 linux/amd64

Does this issue reproduce with the latest release?

Yes. Also in the latest master.

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

go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/zyh/.cache/go-build"
GOENV="/home/zyh/.config/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/zyh/go/pkg/mod"
GOOS="linux"
GOPATH="/home/zyh/go"
GOPROXY="https://goproxy.cn,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.google.cn"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="go1.18.1"
GCCGO="gccgo"
GOAMD64="v1"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/dev/null"
GOWORK=""
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 -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build3288130196=/tmp/go-build -gno-record-gcc-switches"

What did you do?

$ go test -run=PingPongHog runtime -count=10

What did you expect to see?

Test succeed.

What did you see instead?

Test fails randomly.

--- FAIL: TestPingPongHog (0.10s)
proc_test.go:486: want hogCount/lightCount in [0.2, 5]; got 108000000/7825000 = 13.801916932907348

@thanm thanm added the NeedsInvestigation label Apr 19, 2022
@thanm
Copy link
Contributor

@thanm thanm commented Apr 19, 2022

I am not able to reproduce this on my laptop or my workstation:

workstation:

sh /tmp/x.sh
iter 1
go test -run=PingPongHog runtime -count=10
ok  	runtime	1.105s
iter 2
go test -run=PingPongHog runtime -count=10
ok  	runtime	1.105s
iter 3
go test -run=PingPongHog runtime -count=10
ok  	runtime	1.098s
iter 4
go test -run=PingPongHog runtime -count=10
ok  	runtime	1.120s
iter 5
go test -run=PingPongHog runtime -count=10
ok  	runtime	1.097s
iter 6
go test -run=PingPongHog runtime -count=10
ok  	runtime	1.099s
iter 7
go test -run=PingPongHog runtime -count=10
ok  	runtime	1.110s
iter 8
go test -run=PingPongHog runtime -count=10
ok  	runtime	1.110s
iter 9
go test -run=PingPongHog runtime -count=10
ok  	runtime	1.110s
iter 10
go test -run=PingPongHog runtime -count=10
ok  	runtime	1.113s

laptop:

sh /tmp/x.sh
iter 1
go test -run=PingPongHog runtime -count=10
ok  	runtime	1.040s
iter 2
go test -run=PingPongHog runtime -count=10
ok  	runtime	1.043s
iter 3
go test -run=PingPongHog runtime -count=10
ok  	runtime	1.042s
iter 4
go test -run=PingPongHog runtime -count=10
ok  	runtime	1.047s
iter 5
go test -run=PingPongHog runtime -count=10
ok  	runtime	1.040s
iter 6
go test -run=PingPongHog runtime -count=10
ok  	runtime	1.044s
iter 7
go test -run=PingPongHog runtime -count=10
ok  	runtime	1.046s
iter 8
go test -run=PingPongHog runtime -count=10
ok  	runtime	1.041s
iter 9
go test -run=PingPongHog runtime -count=10
ok  	runtime	1.042s
iter 10
go test -run=PingPongHog runtime -count=10
ok  	runtime	1.041s

Both machines are linux/amd64.

Wondering if there may be some other environmental issue (OS release or kernel version, or ???).

@zhangyunhao116
Copy link
Contributor Author

@zhangyunhao116 zhangyunhao116 commented Apr 19, 2022

@thanm Thanks! I am also not able to reproduce this on my another linux/amd64 PC, it maybe other reasons. Closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsInvestigation
Projects
None yet
Development

No branches or pull requests

2 participants