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: building Go on windows/arm64 hits inconsistent test failures #44820

Closed
robkelly opened this issue Mar 5, 2021 · 5 comments
Closed
Labels
arch-arm64 FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. OS-Windows
Milestone

Comments

@robkelly
Copy link

robkelly commented Mar 5, 2021

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

$ go version
go version devel +280c735b07 Fri Mar 5 16:02:44 2021 +0000 windows/arm64

Does this issue reproduce with the latest release?

N/A, cloned from master (280c735)

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

go env Output
$ go env

C:\Users\u\code\go\src>..\bin\go env
set GO111MODULE=
set GOARCH=arm64
set GOBIN=
set GOCACHE=C:\Users\u\AppData\Local\go-build
set GOENV=C:\Users\u\AppData\Roaming\go\env
set GOEXE=.exe
set GOFLAGS=
set GOHOSTARCH=arm64
set GOHOSTOS=windows
set GOINSECURE=
set GOMODCACHE=C:\Users\u\go\pkg\mod
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=C:\Users\u\go
set GOPRIVATE=
set GOPROXY=https://proxy.golang.org,direct
set GOROOT=C:\Users\u\code\go
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLDIR=C:\Users\u\code\go\pkg\tool\windows_arm64
set GOVCS=
set GOVERSION=devel +280c735b07 Fri Mar 5 16:02:44 2021 +0000
set GCCGO=gccgo
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=0
set GOMOD=C:\Users\u\code\go\src\go.mod
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=C:\Users\u\AppData\Local\Temp\go-build4225962944=/tmp/go-build -gno-record-gcc-switches

What did you do?

Trying to build Windows arm64 go on a Surface Pro X.
Cloned latest go source, ran src\all.bat with a bootstrapped version of go cross compiled from my macbook and copied over. First run I hit a test failure of:

##### GOMAXPROCS=2 runtime -cpu=1,2,4 -quick
--- FAIL: TestGcLastTime (0.00s)
    gc_test.go:126: bad last GC time: got 1614963630000702600, want [1614963630099702800, 1614963630000702600]
FAIL
FAIL    runtime 21.884s
FAIL
2021/03/05 09:00:48 Failed: exit status 1


Running again I hit a different test failure:

--- FAIL: TestClientCallsCloseOnlyOnce (21.49s)
    client_test.go:2048: dial tcp 127.0.0.1:57933: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
FAIL
FAIL    net/http        22.909s

On the third run everything passed successfully, and I appear to have a working go build.

@robkelly
Copy link
Author

robkelly commented Mar 5, 2021

@rsc this is probably of interest to you.

@dmitshur dmitshur changed the title Building go on arm64 windows hits inconsistent test failures runtime: building Go on windows/arm64 hits inconsistent test failures Mar 5, 2021
@dmitshur dmitshur added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. arch-arm64 OS-Windows labels Mar 5, 2021
@dmitshur dmitshur added this to the Backlog milestone Mar 5, 2021
@tdakkota
Copy link

tdakkota commented Jul 6, 2021

First fail seems related to low time resolution on Windows.

go/src/runtime/gc_test.go

Lines 120 to 127 in 280c735

t0 := time.Now().UnixNano()
runtime.GC()
t1 := time.Now().UnixNano()
runtime.ReadMemStats(ms)
last := int64(ms.LastGC)
if t0 > last || last > t1 {
t.Fatalf("bad last GC time: got %v, want [%v, %v]", last, t0, t1)
}

@tdakkota
Copy link

tdakkota commented Jul 6, 2021

Similiar failure
https://build.golang.org/log/b9491de2f3352bc70be88748959c5e1a06f5e35f

According to log, t0 = 1625021139098274000 and t1 = 1625021139000178200, t0 > t1, it looks like clock is not monotonic

@bcmills
Copy link
Contributor

bcmills commented Aug 30, 2021

Different tests often fail due to different underlying causes; please file separate issues for test failures that are not obviously correlated.

I've filed the TestGcLastTime issue as #48072.

@bcmills
Copy link
Contributor

bcmills commented Nov 8, 2021

The TestClientCallsCloseOnlyOnce failure reproduced on the Go builder; filed as #49454.

(Closing this issue as redundant with the two specific ones.)

@bcmills bcmills closed this as completed Nov 8, 2021
@golang golang locked and limited conversation to collaborators Nov 8, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-arm64 FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. OS-Windows
Projects
None yet
Development

No branches or pull requests

5 participants