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

cmd/go: all.bash tests fail on master (ab9d31da9e) in TestIsTerminal #52461

Closed
ainar-g opened this issue Apr 21, 2022 · 9 comments
Closed

cmd/go: all.bash tests fail on master (ab9d31da9e) in TestIsTerminal #52461

ainar-g opened this issue Apr 21, 2022 · 9 comments
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. release-blocker Soon This needs to be done soon. (regressions, serious bugs, outages)
Milestone

Comments

@ainar-g
Copy link
Contributor

ainar-g commented Apr 21, 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 on ab9d31d, no on ebe1435.

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

go env Output
$ go env
GO111MODULE="on"
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/ainar/.cache/go-build"
GOENV="/home/ainar/.config/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/ainar/go/pkg/mod"
GONOPROXY="REMOVED"
GONOSUMDB="REMOVED"
GOOS="linux"
GOPATH="/home/ainar/go"
GOPRIVATE="REMOVED"
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/home/ainar/go/go1.18"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/home/ainar/go/go1.18/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="go1.18.1"
GCCGO="gccgo"
GOAMD64="v1"
AR="ar"
CC="clang"
CXX="clang++"
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 -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build3035289250=/tmp/go-build -gno-record-gcc-switches"

What did you do?

time ./all.bash

What did you expect to see?

A clean build.

What did you see instead?

[normal all.bash output up to this point]

##### cmd/go terminal test
--- FAIL: TestIsTerminal (0.00s)
    terminal_test.go:35: stdout is not a terminal
    terminal_test.go:38: stderr is not a terminal
FAIL
exit status 1
FAIL    cmd/go/testdata/testterminal18153       0.003s
go tool dist: Failed: exit status 1
Command exited with non-zero status 1
1774.90user 274.45system 3:39.00elapsed 935%CPU (0avgtext+0avgdata 3163960maxresident)k
788360inputs+10075200outputs (3551080major+47148408minor)pagefaults 0swaps

EDIT: After some experimentation, whether or not the time utility is used doesn't seem to matter, and neither does whether or not all.bash is called from a tmux terminal or a simple GNOME terminal.

@abner-chenc
Copy link
Contributor

abner-chenc commented Apr 21, 2022

I also encountered the same problem, but I tried git revet CL https://go-review.googlesource.com/c/go/+/400877, the result is OK

@seankhliao seankhliao added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Apr 21, 2022
@seankhliao
Copy link
Member

cc @adg @bcmills
Note previous issues #18153 #34877

@archana-ravindar
Copy link

archana-ravindar commented Apr 21, 2022

we are seeing that ./all.bash fails with the same error on master for linux/ppc64le/ppc64 as well with the same reproducibility conditions as mentioned above

@bcmills bcmills added this to the Go1.19 milestone Apr 21, 2022
@bcmills bcmills added release-blocker Soon This needs to be done soon. (regressions, serious bugs, outages) labels Apr 21, 2022
@bcmills bcmills self-assigned this Apr 21, 2022
@gopherbot
Copy link

Change https://go.dev/cl/401494 mentions this issue: Revert "cmd/go/internal/test: wrap os.Stdout always"

@bcmills
Copy link
Contributor

bcmills commented Apr 21, 2022

This wasn't caught on the builders because (understandably) none of the builders run with stdout as an actual terminal.

(https://cs.opensource.google/go/go/+/master:src/cmd/go/testdata/testterminal18153/terminal_test.go;l=8-12;drc=2580d0e08d5e9f979b943758d3c49877fb2324cb)

@prattmic
Copy link
Member

Note that this also caused failures on TestScript/test_output_wait.

@bcmills
Copy link
Contributor

bcmills commented Apr 21, 2022

Indeed. Unfortunately the failure rate for test_output_wait wasn't quite high enough to show up in the initial TryBot run. 😞

@adg
Copy link
Contributor

adg commented Apr 21, 2022

Damn, sorry for the noise.
I wonder if the change should still be applied even without the test?
It seems hard to test reliably.

@ianlancetaylor
Copy link
Contributor

I'm not 100% sure, but it sounds like #18153 is calling for the opposite of what your change does. So maybe we need to decide whether we made a mistake in handling #18153.

@rsc rsc unassigned bcmills Jun 22, 2022
@golang golang locked and limited conversation to collaborators Jun 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. release-blocker Soon This needs to be done soon. (regressions, serious bugs, outages)
Projects
None yet
Development

No branches or pull requests

9 participants