golang / go

The Go programming language
https://go.dev
BSD 3-Clause "New" or "Revised" License
124.38k stars 17.71k forks source link

x/benchmarks/sweet/cmd/sweet: TestSweetEndToEnd failing with gvisor build errors since CL 386698 #51445

Open bcmills opened 2 years ago

bcmills commented 2 years ago

TestSweetEndToEnd is persistently failing on the linux-amd64-longtest and linux-amd64-perf builders since CL 386698 (attn @dr2chase, @prattmic, @aclements).

--- FAIL: TestSweetEndToEnd (181.32s)
    integration_test.go:128: no results produced.
    integration_test.go:150: command output:
        [sweet] Work directory: /workdir/gopath/src/golang.org/x/benchmarks/sweet/tmp/tmp-5
        [sweet] Benchmarks: gvisor
        [sweet] Setting up benchmark: gvisor
        [shell] git clone -b go https://github.com/google/gvisor /workdir/gopath/src/golang.org/x/benchmarks/sweet/tmp/tmp-5/gvisor/src
        [shell] git -C /workdir/gopath/src/golang.org/x/benchmarks/sweet/tmp/tmp-5/gvisor/src checkout 6392b0f3bea052af0de9d95677233dd9e442dbd5
        [shell] mkdir -p /workdir/gopath/src/golang.org/x/benchmarks/sweet/tmp/results-5/gvisor
        [shell] mkdir -p /workdir/gopath/src/golang.org/x/benchmarks/sweet/tmp/tmp-5/gvisor/go/bin
        [shell] mkdir -p /workdir/gopath/src/golang.org/x/benchmarks/sweet/tmp/tmp-5/gvisor/src
        [shell] mkdir -p /workdir/gopath/src/golang.org/x/benchmarks/sweet/tmp/tmp-5/gvisor/go/tmp
        [shell] mkdir -p /workdir/gopath/src/golang.org/x/benchmarks/sweet/tmp/tmp-5/gvisor/go/assets
        [shell] cd /workdir/gopath/src/golang.org/x/benchmarks/sweet/benchmarks/gvisor
        [shell] /workdir/go/bin/go build -o /workdir/gopath/src/golang.org/x/benchmarks/sweet/tmp/tmp-5/gvisor/go/bin/gvisor-bench
        [shell] cd /workdir/gopath/src/golang.org/x/benchmarks/sweet/cmd/sweet
        [shell] cd /workdir/gopath/src/golang.org/x/benchmarks/sweet/tmp/tmp-5/gvisor/src/runsc
        [shell] CGO_ENABLED=0 /workdir/go/bin/go build -o /workdir/gopath/src/golang.org/x/benchmarks/sweet/tmp/tmp-5/gvisor/go/bin/runsc
        [shell] cd /workdir/gopath/src/golang.org/x/benchmarks/sweet/cmd/sweet
        [sweet] error: build gvisor for go: exit status 1
        [sweet] error: failed to execute benchmarks, see log for details
    integration_test.go:151: exit status 1
FAIL
FAIL    golang.org/x/benchmarks/sweet/cmd/sweet 181.334s

greplogs --dashboard -md -l -e 'error: build gvisor for .*: exit status 1'

[2022-03-02T20:53:54-55644cf-bcb89fc/linux-amd64-longtest](https://build.golang.org/log/4d45d28a423ae65b68b10292ba34c416dbc0842a) [2022-03-02T20:14:06-55644cf-2cb9e11/linux-amd64-longtest](https://build.golang.org/log/6682b8a4b15b6beb307cfd4b2c132faf81576ce1) [2022-03-02T20:02:12-55644cf-fc5b64e/linux-amd64-longtest](https://build.golang.org/log/53318502d5ebc448dbefe2f9326d79f860c17a62) [2022-03-02T18:21:38-55644cf-986b04c/linux-amd64-longtest](https://build.golang.org/log/5ffe7b8615629c7be7f471537740be9c67d0e768) [2022-03-02T18:06:42-55644cf-a5b8b56/linux-amd64-longtest](https://build.golang.org/log/edc3df86a43865fd1a2960212e678b467741c2f4) [2022-03-02T17:47:07-55644cf-6c6a8fb/linux-amd64-longtest](https://build.golang.org/log/9db7b6b9d1dae986e4a4f4167b7f5b652d7113ba) [2022-03-02T17:42:53-55644cf-5a03cbd/linux-amd64-longtest](https://build.golang.org/log/b96c37e80cfa1a0d5e4cf10ca6578460fd165b10) [2022-03-02T17:03:04-55644cf-4a13f6f/linux-amd64-longtest](https://build.golang.org/log/f958ab69d0e75045a2c3b08aab0c8cead13aff58) [2022-03-02T16:54:21-55644cf-f79a983/linux-amd64-longtest](https://build.golang.org/log/3b8f093867f47b6797948c94e3a764d765829663) [2022-03-02T11:49:04-55644cf-40e24a9/linux-amd64-longtest](https://build.golang.org/log/c84525aef00c640bc25e91a6495bf679a1c5364b) [2022-03-02T11:49:04-55644cf-40e24a9/linux-amd64-perf](https://build.golang.org/log/edd2bee57324981b3a96da4b7bf26a886d43ad2c) [2022-03-02T11:33:18-55644cf-fd2e1e7/linux-amd64-longtest](https://build.golang.org/log/90a54158c37dddc453018c769fc09f63148012c7) [2022-03-02T11:33:18-55644cf-fd2e1e7/linux-amd64-perf](https://build.golang.org/log/04233a2117ee867462c51926308e7b24f8678628) [2022-03-02T11:28:40-55644cf-bebe9aa/linux-amd64-longtest](https://build.golang.org/log/8a49a2bc8e63bedc7c61376d74e0a6773c7c47e8) [2022-03-02T11:28:40-55644cf-bebe9aa/linux-amd64-perf](https://build.golang.org/log/95a1fbdc03f25db6df41930018275c189cb9adc6) [2022-03-02T11:27:34-55644cf-9f1239b/linux-amd64-perf](https://build.golang.org/log/23daaad3d2b1e1f7f61c22ed5a7c61c6ad6a04a7) [2022-03-01T23:49:01-55644cf-6da16b6/linux-amd64-longtest](https://build.golang.org/log/92fd17aa94c86bff2a7c420f5179c6ddb4ca408e) [2022-03-01T23:49:01-55644cf-6da16b6/linux-amd64-perf](https://build.golang.org/log/ef16fa68d3f6673da2372be48081f7701fe5a23c) [2022-03-01T23:20:30-55644cf-aaa3d39/linux-amd64-longtest](https://build.golang.org/log/34b3c46f2651bdcba056e68adad42c6983b9cf03) [2022-03-01T23:20:30-55644cf-aaa3d39/linux-amd64-perf](https://build.golang.org/log/d8f09930f94dbb4a903d4df0b1bf4ab33d3df643) [2022-03-01T22:02:33-55644cf-d40e7bb/linux-amd64-longtest](https://build.golang.org/log/8542925f9cdc176b3ee233fe931ca111de683984) [2022-03-01T22:02:33-55644cf-d40e7bb/linux-amd64-perf](https://build.golang.org/log/5171fd2a0e789f2d791876d61119396dc609ffff) [2022-03-01T21:27:42-55644cf-b0db2f0/linux-amd64-longtest](https://build.golang.org/log/c5af72fa32654aec2028c4502def9afe49e31acf) [2022-03-01T21:27:42-55644cf-b0db2f0/linux-amd64-perf](https://build.golang.org/log/064f7bdee7795023f7f4d989cc2a0a39841bc9a1) [2022-03-01T20:52:30-55644cf-f4722d8/linux-amd64-longtest](https://build.golang.org/log/c84f176b3816efa1b49da779dc0a895d6d2844e6) [2022-03-01T20:52:30-55644cf-f4722d8/linux-amd64-perf](https://build.golang.org/log/eea41e97f53a6aca5aaeb685e6aacb13d0d846e9) [2022-03-01T19:46:09-55644cf-d6d2ebb/linux-amd64-longtest](https://build.golang.org/log/96df4dc9f300c66b21cd7c0c6321f935888624c7) [2022-03-01T19:46:09-55644cf-d6d2ebb/linux-amd64-perf](https://build.golang.org/log/1c58ea19399a312bf38a0cd23673a5024eee0a13) [2022-03-01T19:45:51-55644cf-ad52356/linux-amd64-perf](https://build.golang.org/log/3c9622322ca9a28dad493f86807dcdda3b659098) [2022-03-01T19:33:00-55644cf-258fc75/linux-amd64-longtest](https://build.golang.org/log/cab602d7813fd0a1e88fdd4fc24f55796b6e1f00) [2022-03-01T19:33:00-55644cf-258fc75/linux-amd64-perf](https://build.golang.org/log/2e8b94d424a9fe238ea26d55115f76745b1d15ef) [2022-03-01T18:48:36-55644cf-620a3c0/linux-amd64-longtest](https://build.golang.org/log/13370b4d26272b164bc9b10a07ff31047095604f) [2022-03-01T18:48:36-55644cf-620a3c0/linux-amd64-perf](https://build.golang.org/log/981b21bc7185b16d02cf2f57add5493bb1d761b2) [2022-03-01T18:43:08-55644cf-510ad45/linux-amd64-longtest](https://build.golang.org/log/8f28fb17dfecf87413c8922076c04670e8f18ed8) [2022-03-01T18:43:08-55644cf-510ad45/linux-amd64-perf](https://build.golang.org/log/90dbbdfba72686416d84dacda6ef97a9e82a6ac7) [2022-03-01T18:13:15-55644cf-d9fd920/linux-amd64-longtest](https://build.golang.org/log/e44cf4482b189a347b898d5697a3bc65415aee8f) [2022-03-01T18:13:15-55644cf-d9fd920/linux-amd64-perf](https://build.golang.org/log/f8c19ed8e75bfe6856fe83923dda7ba212f8c150) [2022-03-01T18:12:19-55644cf-d81464e/linux-amd64-perf](https://build.golang.org/log/00bec35bc54e0b4a7e677a49a50412fcd2f609b0) [2022-03-01T07:36:46-55644cf-2199841/linux-amd64-longtest](https://build.golang.org/log/092e8b7f9a588eac96c047f8036cd2022719d0c1) [2022-03-01T07:36:46-55644cf-2199841/linux-amd64-perf](https://build.golang.org/log/0fa0a8d3cd539a162428b0f676565e78c3f1324d) [2022-03-01T07:36:05-55644cf-7c151f3/linux-amd64-perf](https://build.golang.org/log/c1a629b31b984130d355fbf09b1edcf02592b1bb) [2022-03-01T07:35:26-55644cf-6d881da/linux-amd64-perf](https://build.golang.org/log/40e43fea1918834e83fac1ca36f7d4fa65cddb99) [2022-03-01T06:01:28-55644cf-4f04e1d/linux-amd64-longtest](https://build.golang.org/log/42ccefa46baf7684bb2df2be06a6f97235bdd00e) [2022-03-01T06:01:28-55644cf-4f04e1d/linux-amd64-perf](https://build.golang.org/log/c069ec30bf48b4c7f6b8d40c746f6e655f58c5fd) [2022-02-28T22:24:58-55644cf-936c7fb/linux-amd64-perf](https://build.golang.org/log/7c7ee75a51e9d33265dcdab7b898cb88a2f5fe62)
prattmic commented 2 years ago

cc @mknyszek

prattmic commented 2 years ago

The secondary issue here is that we are apparently not logging the stderr output from the go command, so the actual error is missing.

prattmic commented 2 years ago
[sweet] Work directory: /tmp/gosweet2197573647
[sweet] Benchmarks: gvisor
[sweet] Setting up benchmark: gvisor
[shell] git clone -b go https://github.com/google/gvisor /tmp/gosweet2197573647/gvisor/src
[shell] git -C /tmp/gosweet2197573647/gvisor/src checkout 6392b0f3bea052af0de9d95677233dd9e442dbd5
[shell] mkdir -p /usr/local/google/home/mpratt/src/benchmarks/sweet/results/gvisor
[shell] mkdir -p /tmp/gosweet2197573647/gvisor/goroot/bin
[shell] mkdir -p /tmp/gosweet2197573647/gvisor/src
[shell] mkdir -p /tmp/gosweet2197573647/gvisor/goroot/tmp
[shell] mkdir -p /tmp/gosweet2197573647/gvisor/goroot/assets
[shell] cd /usr/local/google/home/mpratt/src/benchmarks/sweet/benchmarks/gvisor
[shell] GOROOT=/usr/local/google/home/mpratt/src/go/ /usr/local/google/home/mpratt/src/go/bin/go build -o /tmp/gosweet2197573647/gvisor/goroot/bin/gvisor-bench
[shell] cd /usr/local/google/home/mpratt/src/benchmarks/sweet
[shell] cd /tmp/gosweet2197573647/gvisor/src/runsc
[shell] CGO_ENABLED=0 GOROOT=/usr/local/google/home/mpratt/src/go/ /usr/local/google/home/mpratt/src/go/bin/go build -o /tmp/gosweet2197573647/gvisor/goroot/bin/runsc
package gvisor.dev/gvisor/runsc
        imports gvisor.dev/gvisor/runsc/cli
        imports gvisor.dev/gvisor/pkg/coverage
        imports gvisor.dev/gvisor/pkg/hostarch
        imports gvisor.dev/gvisor/pkg/gohacks: build constraints exclude all Go files in /tmp/gosweet2197573647/gvisor/src/pkg/gohacks
package gvisor.dev/gvisor/runsc
        imports gvisor.dev/gvisor/runsc/cli
        imports gvisor.dev/gvisor/runsc/cmd
        imports gvisor.dev/gvisor/pkg/sentry/control
        imports gvisor.dev/gvisor/pkg/sentry/fdimport
        imports gvisor.dev/gvisor/pkg/sentry/fs/host
        imports gvisor.dev/gvisor/pkg/sentry/kernel
        imports gvisor.dev/gvisor/pkg/goid: build constraints exclude all Go files in /tmp/gosweet2197573647/gvisor/src/pkg/goid
[shell] cd /usr/local/google/home/mpratt/src/benchmarks/sweet
[sweet] error: build gvisor for goroot: exit status 1
[sweet] error: failed to execute benchmarks, see log for details

This is failing due to https://go.dev/cl/388376 [1]. gVisor has negative go1.19 build tags due to a limitation in their static analysis tool. We'll need to disable this benchmark until gVisor is updated.

[1] I don't understand why this CL wasn't specifically tested on https://build.golang.org/?repo=golang.org%2fx%2fbenchmarks.

gopherbot commented 2 years ago

Change https://go.dev/cl/389754 mentions this issue: sweet: disable gvisor benchmark

gopherbot commented 2 years ago

Change https://go.dev/cl/389774 mentions this issue: sweet/common: include stderr in error string

prattmic commented 2 years ago

https://go.dev/cl/389754 fixes the builders by disabling the gvisor benchmark. Keeping this open to track reenabling the benchmarks once google/gvisor#7252 goes in.

gopherbot commented 2 years ago

Change https://go.dev/cl/390954 mentions this issue: sweet/harnesses: update gVisor for 1.19 compatibility

gopherbot commented 2 years ago

Change https://go.dev/cl/390955 mentions this issue: Revert "sweet: disable gvisor benchmark"

gopherbot commented 2 years ago

Change https://go.dev/cl/391194 mentions this issue: sweet: disable gvisor benchmark

bcmills commented 2 years ago

Unfortunately still failing at head (https://build.golang.org/log/65cac28815309e7fe290362018f8929ca2204c58):

--- FAIL: TestSweetEndToEnd (222.47s)
    integration_test.go:136: output for gvisor:
    integration_test.go:144: === Benchmark stdout+stderr ===

        Hello from Docker!
        This message shows that your installation appears to be working correctly.

        To generate this message, Docker took the following steps:
         1. The Docker client contacted the Docker daemon.
         2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
            (amd64)
         3. The Docker daemon created a new container from that image which runs the
            executable that produces the output you are currently reading.
         4. The Docker daemon streamed that output to the Docker client, which sent it
            to your terminal.

        To try something more ambitious, you can run an Ubuntu container with:
         $ docker run -it ubuntu bash

        Share images, automate workflows, and more with a free Docker ID:
         https://hub.docker.com/

        For more examples and ideas, visit:
         https://docs.docker.com/get-started/

        error: exit status 137

    integration_test.go:150: command output:
        [sweet] Work directory: /workdir/gopath/src/golang.org/x/benchmarks/sweet/tmp/tmp-5
        [sweet] Benchmarks: gvisor
        [sweet] Setting up benchmark: gvisor
        [shell] git clone -b go https://github.com/google/gvisor /workdir/gopath/src/golang.org/x/benchmarks/sweet/tmp/tmp-5/gvisor/src
        [shell] git -C /workdir/gopath/src/golang.org/x/benchmarks/sweet/tmp/tmp-5/gvisor/src checkout adc7bb5e1baf4a7489e428e1fad756e5e2aa3410
        [shell] mkdir -p /workdir/gopath/src/golang.org/x/benchmarks/sweet/tmp/results-5/gvisor
        [shell] mkdir -p /workdir/gopath/src/golang.org/x/benchmarks/sweet/tmp/tmp-5/gvisor/go/bin
        [shell] mkdir -p /workdir/gopath/src/golang.org/x/benchmarks/sweet/tmp/tmp-5/gvisor/src
        [shell] mkdir -p /workdir/gopath/src/golang.org/x/benchmarks/sweet/tmp/tmp-5/gvisor/go/tmp
        [shell] mkdir -p /workdir/gopath/src/golang.org/x/benchmarks/sweet/tmp/tmp-5/gvisor/go/assets
        [shell] cd /workdir/gopath/src/golang.org/x/benchmarks/sweet/benchmarks/gvisor
        [shell] /workdir/go/bin/go build -o /workdir/gopath/src/golang.org/x/benchmarks/sweet/tmp/tmp-5/gvisor/go/bin/gvisor-bench
        [shell] cd /workdir/gopath/src/golang.org/x/benchmarks/sweet/cmd/sweet
        [shell] cd /workdir/gopath/src/golang.org/x/benchmarks/sweet/tmp/tmp-5/gvisor/src/runsc
        [shell] CGO_ENABLED=0 /workdir/go/bin/go build -o /workdir/gopath/src/golang.org/x/benchmarks/sweet/tmp/tmp-5/gvisor/go/bin/runsc
        [shell] cd /workdir/gopath/src/golang.org/x/benchmarks/sweet/cmd/sweet
        [shell] chmod 755 /workdir/gopath/src/golang.org/x/benchmarks/sweet/tmp/tmp-5/gvisor/go/bin/runsc
        [shell] unzip /tmp/go-sweet-assets/assets-v0.3.0.zip 'gvisor/*' -d /workdir/gopath/src/golang.org/x/benchmarks/sweet/tmp/tmp-5/gvisor/go/assets
        [sweet] Running benchmark gvisor for go: run 1
        [shell] /workdir/gopath/src/golang.org/x/benchmarks/sweet/tmp/tmp-5/gvisor/go/bin/gvisor-bench -runsc /workdir/gopath/src/golang.org/x/benchmarks/sweet/tmp/tmp-5/gvisor/go/bin/runsc -assets-dir /workdir/gopath/src/golang.org/x/benchmarks/sweet/tmp/tmp-5/gvisor/go/assets -tmp /workdir/gopath/src/golang.org/x/benchmarks/sweet/tmp/tmp-5/gvisor/go/tmp -short
        [sweet] error: run benchmark gvisor for config go: exit status 1
        [sweet] error: failed to execute benchmarks, see log for details
    integration_test.go:151: exit status 1
FAIL
FAIL    golang.org/x/benchmarks/sweet/cmd/sweet 222.488s
mknyszek commented 2 years ago

This test only runs on the longtest builders, so generally modifications to Sweet should check longtest as a slowbot.

I have been considering making the test run on the usual trybots.

mknyszek commented 2 years ago

To be clear, I don't think anyone did anything wrong here (except maybe me, for marking this test as "long" đŸ˜… ). I do think this is pretty good evidence to suggest this test should probably just run on the regular trybots. We have plenty of timeout headroom, though it will add a few minutes of latency to the trybots.

bcmills commented 2 years ago

This test only runs on the longtest builders, so generally modifications to Sweet should check longtest as a slowbot.

It may be possible to modify x/build/cmd/coordinator to do that; compare #42661, #43719.

aclements commented 2 years ago

What's the status on this? The x/benchmarks repo isn't failing at this point. Is the gvisor benchmark still disabled? If so, we should retitle this to make it about re-enabling this benchmark.

mknyszek commented 2 years ago

The current status is that after the previous fix (https://go.dev/cl/390954) there were still failures, so the benchmark was disabled again. This needs to be investigated again, I believe.

bcmills commented 2 years ago

I had labeled this as a release-blocker because the builders were failing, but now the benchmark is disabled and the builder is passing, so it won't mask any other regressions and from my perspective isn't as urgent.

Is it important to re-enable this benchmark for the Go 1.19 release, or should we remove the release-blocker label?

mknyszek commented 2 years ago

I don't think there's any particular reason fixing this should be tied to the release cycle. I think putting it in Unreleased makes sense.

prattmic commented 2 years ago

I've tested the latest gVisor. It is currently blocked on https://github.com/google/gvisor/issues/7930, which causes us to see spurious SIGKILL exit status.

gopherbot commented 2 years ago

Change https://go.dev/cl/444758 mentions this issue: sweet: update and re-enable gvisor benchmark

prattmic commented 2 years ago

Now we are blocked on https://github.com/google/gvisor/issues/8111. :(