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/tools/go/internal/gcimporter: TestBExportData_stdlib uses a lot of RAM #33959

Closed
mwhudson opened this issue Aug 29, 2019 · 2 comments
Closed
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. Testing An issue that has been verified to require only test changes, not just a test failure. Tools This label describes issues relating to any tools in the x/tools repository. Unfortunate
Milestone

Comments

@mwhudson
Copy link
Contributor

mwhudson commented Aug 29, 2019

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

(master)mwhudson@ringil:/opt/opensource/gopath/src/golang.org/x/tools$ /snap/bin/go version
go version go1.12.9 linux/amd64

but it's similar with 1.11, 1.10 at least.

Does this issue reproduce with the latest release?

yes.

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

go env Output
(master)mwhudson@ringil:/opt/opensource/gopath/src/golang.org/x/tools$ /snap/bin/go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/mwhudson/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/opt/opensource/gopath"
GOPROXY=""
GORACE=""
GOROOT="/snap/go/4301"
GOTMPDIR=""
GOTOOLDIR="/snap/go/4301/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
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 -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build976150766=/tmp/go-build -gno-record-gcc-switches"

What did you do?

(master)mwhudson@ringil:/opt/opensource/gopath/src/golang.org/x/tools$ /snap/bin/go test -c ./go/internal/gcimporter/
(master)mwhudson@ringil:/opt/opensource/gopath/src/golang.org/x/tools$ /usr/bin/time ./gcimporter.test -test.v -test.run=TestBExportData_stdlib

What did you expect to see?

The test using a reasonable amount of memory.

What did you see instead?

=== RUN   TestBExportData_stdlib
haserrors/haserrors.go:2:22: cannot convert "" (untyped string constant) to untyped int
haserrors/haserrors.go:3:18: undeclared name: undefined
--- PASS: TestBExportData_stdlib (23.56s)
PASS
21.93user 17.20system 0:23.67elapsed 165%CPU (0avgtext+0avgdata 1263756maxresident)k
30276inputs+1880outputs (109major+593642minor)pagefaults 0swaps

That's a single testcase using about 1.2 GiB of RAM. This causes problems for Ubuntu because we run tests of all packages in VMs which by default have 1GiB of RAM. If the test cannot easily be reduced in footprint, maybe it should be skipped in -short mode?

@gopherbot gopherbot added this to the Unreleased milestone Aug 29, 2019
@katiehockman katiehockman added Testing An issue that has been verified to require only test changes, not just a test failure. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. labels Sep 3, 2019
@katiehockman
Copy link
Contributor

/cc @ianthehat

@gopherbot
Copy link

Change https://golang.org/cl/193181 mentions this issue: go/internal/gcimporter: skip Test{I,B}ExportData_stdlib in -short mode

@stamblerre stamblerre added the Tools This label describes issues relating to any tools in the x/tools repository. label Sep 9, 2019
@golang golang locked and limited conversation to collaborators Nov 2, 2022
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. Testing An issue that has been verified to require only test changes, not just a test failure. Tools This label describes issues relating to any tools in the x/tools repository. Unfortunate
Projects
None yet
Development

No branches or pull requests

5 participants