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

bump google.golang.org/grpc v1.20.1 #936

Merged
merged 2 commits into from
May 13, 2019
Merged

Conversation

AkihiroSuda
Copy link
Member

Signed-off-by: Akihiro Suda [email protected]

@AkihiroSuda
Copy link
Member Author

=== RUN   TestSimpleMarshal
--- PASS: TestSimpleMarshal (0.00s)
PASS
ok  	github.com/moby/buildkit/cache/remotecache/v1	0.009s
?   	github.com/moby/buildkit/cache/util	[no test files]
No output has been received in the last 10m0s, this potentially indicates a stalled build or something wrong with the build itself.
Check the details on how to adjust your build configuration on: https://docs.travis-ci.com/user/common-build-problems/#Build-times-out-because-no-output-was-received
The build has been terminated

@AkihiroSuda
Copy link
Member Author

AkihiroSuda commented Apr 13, 2019

for f in oci oci-rootless containerd containerd-1.0; do TESTFLAGS="--run //worker=$f\$ -v" ./hack/test integration; done succeeds but ./hack/test integration hangs.

Seems something is not working when multiple workers are simultaneously being tested.

@AkihiroSuda
Copy link
Member Author

Even with multiple workers, the test suite passes after commenting out some testcases in client_test.go.

I assume we are hitting some quota (FD?) when we have lots of testcases/workers running.

@AkihiroSuda
Copy link
Member Author

0cc96a1 once succeeded but failed after restarting CI. Locally always fails.

@thaJeztah
Copy link
Member

@tonistiigi ptal

@AkihiroSuda
Copy link
Member Author

TESTPKGS="./client" TESTFLAGS="-race -v" ./hack/test integration reported some races

==================
WARNING: DATA RACE
Write at 0x00c0000d5a50 by goroutine 6:
  google.golang.org/grpc.(*clientStream).CloseSend()
      /src/vendor/google.golang.org/grpc/stream.go:757 +0x64
  github.com/moby/buildkit/api/services/control.(*controlSessionClient).CloseSend()
      <autogenerated>:1 +0x62
  github.com/moby/buildkit/session/grpchijack.(*conn).Close.func1()
      /src/session/grpchijack/dial.go:96 +0x5df
  sync.(*Once).Do()
      /usr/local/go/src/sync/once.go:44 +0xde
  github.com/moby/buildkit/session/grpchijack.(*conn).Close()
      /src/session/grpchijack/dial.go:90 +0x7d
  github.com/moby/buildkit/session.(*Session).Close()
      /src/session/session.go:111 +0x103
  github.com/moby/buildkit/client.(*Client).solve.func2.1()
      /src/client/solve.go:171 +0xae
  github.com/moby/buildkit/client.(*Client).solve.func2()
      /src/client/solve.go:189 +0x769
  golang.org/x/sync/errgroup.(*Group).Go.func1()
      /src/vendor/golang.org/x/sync/errgroup/errgroup.go:58 +0x64

Previous read at 0x00c0000d5a50 by goroutine 131:
  google.golang.org/grpc.(*clientStream).SendMsg()
      /src/vendor/google.golang.org/grpc/stream.go:674 +0xf8
  github.com/moby/buildkit/api/services/control.(*controlSessionClient).SendMsg()
      <autogenerated>:1 +0x7a
  github.com/moby/buildkit/session/grpchijack.(*conn).Write()
      /src/session/grpchijack/dial.go:83 +0xf3
  bufio.(*Writer).Flush()
      /usr/local/go/src/bufio/bufio.go:590 +0x13f
  golang.org/x/net/http2.(*bufferedWriter).Flush()
      /src/vendor/golang.org/x/net/http2/http2.go:293 +0x67
  golang.org/x/net/http2.(*serverConn).Flush()
      /src/vendor/golang.org/x/net/http2/server.go:568 +0x50
  golang.org/x/net/http2.(*flushFrameWriter).writeFrame()
      /src/vendor/golang.org/x/net/http2/write.go:68 +0x54
  golang.org/x/net/http2.(*serverConn).writeFrameAsync()
      /src/vendor/golang.org/x/net/http2/server.go:741 +0x58

Goroutine 6 (running) created at:
  golang.org/x/sync/errgroup.(*Group).Go()
      /src/vendor/golang.org/x/sync/errgroup/errgroup.go:55 +0x73
  github.com/moby/buildkit/client.(*Client).solve()
      /src/client/solve.go:161 +0xe1f
  github.com/moby/buildkit/client.(*Client).Build()
      /src/client/build.go:59 +0x5fb
  github.com/moby/buildkit/client.testClientGatewayFailedSolve()
      /src/client/build_test.go:125 +0x1e9
  github.com/moby/buildkit/util/testutil/integration.Run.func2.1()
      /src/util/testutil/integration/run.go:172 +0x2c2
  testing.tRunner()
      /usr/local/go/src/testing/testing.go:865 +0x163

Goroutine 131 (running) created at:
  golang.org/x/net/http2.(*serverConn).startFrameWrite()
      /src/vendor/golang.org/x/net/http2/server.go:1119 +0x367
  golang.org/x/net/http2.(*serverConn).scheduleFrameWrite()
      /src/vendor/golang.org/x/net/http2/server.go:1225 +0x2de
  golang.org/x/net/http2.(*serverConn).wroteFrame()
      /src/vendor/golang.org/x/net/http2/server.go:1181 +0x1de
  golang.org/x/net/http2.(*serverConn).serve()
      /src/vendor/golang.org/x/net/http2/server.go:834 +0x134d
  golang.org/x/net/http2.(*Server).ServeConn()
      /src/vendor/golang.org/x/net/http2/server.go:438 +0xd7b
  github.com/moby/buildkit/session.serve()
      /src/session/grpc.go:24 +0x17b
  github.com/moby/buildkit/session.(*Session).Run()
      /src/session/session.go:103 +0xa10
  github.com/moby/buildkit/client.(*Client).solve.func1()
      /src/client/solve.go:156 +0xf4
  golang.org/x/sync/errgroup.(*Group).Go.func1()
      /src/vendor/golang.org/x/sync/errgroup/errgroup.go:58 +0x64
==================
==================
WARNING: DATA RACE
Write at 0x00c0005138e0 by goroutine 95:
  bytes.(*Buffer).Read()
      /usr/local/go/src/bytes/buffer.go:300 +0x4a
  bufio.(*Scanner).Scan()
      /usr/local/go/src/bufio/scan.go:213 +0x19a
  github.com/moby/buildkit/util/testutil/integration.(*sandbox).PrintLogs()
      /src/util/testutil/integration/oci.go:125 +0x162
  github.com/moby/buildkit/util/testutil/integration.Run.func2.1.1()
      /src/util/testutil/integration/run.go:169 +0xba
  github.com/moby/buildkit/util/testutil/integration.Run.func2.1()
      /src/util/testutil/integration/run.go:173 +0x2c3
  testing.tRunner()
      /usr/local/go/src/testing/testing.go:865 +0x163

Previous write at 0x00c0005138e0 by goroutine 120:
  bytes.(*Buffer).ReadFrom()
      /usr/local/go/src/bytes/buffer.go:203 +0x4b
  io.copyBuffer()
      /usr/local/go/src/io/io.go:388 +0x3fa
  os/exec.(*Cmd).writerDescriptor.func1()
      /usr/local/go/src/io/io.go:364 +0x7a
  os/exec.(*Cmd).Start.func1()
      /usr/local/go/src/os/exec/exec.go:409 +0x34

Goroutine 95 (running) created at:
  testing.(*T).Run()
      /usr/local/go/src/testing/testing.go:916 +0x65a
  github.com/moby/buildkit/util/testutil/integration.Run.func2()
      /src/util/testutil/integration/run.go:154 +0x1eb
  github.com/moby/buildkit/util/testutil/integration.Run()
      /src/util/testutil/integration/run.go:175 +0x6b7
  github.com/moby/buildkit/client.TestClientGatewayIntegration()
      /src/client/build_test.go:25 +0x128
  testing.tRunner()
      /usr/local/go/src/testing/testing.go:865 +0x163

Goroutine 120 (running) created at:
  os/exec.(*Cmd).Start()
      /usr/local/go/src/os/exec/exec.go:408 +0x9c2
  github.com/moby/buildkit/util/testutil/integration.startCmd()
      /src/util/testutil/integration/util.go:28 +0x61
  github.com/moby/buildkit/util/testutil/integration.runBuildkitd()
      /src/util/testutil/integration/oci.go:192 +0x7c4
  github.com/moby/buildkit/util/testutil/integration.(*oci).New()
      /src/util/testutil/integration/oci.go:98 +0x563
  github.com/moby/buildkit/util/testutil/integration.Run.func2.1()
      /src/util/testutil/integration/run.go:159 +0x22e
  testing.tRunner()
      /usr/local/go/src/testing/testing.go:865 +0x163
==================

@AkihiroSuda AkihiroSuda force-pushed the grpc-1-20 branch 3 times, most recently from bf7f63d to 0d4d708 Compare April 14, 2019 12:09
@AkihiroSuda AkihiroSuda changed the title bump google.golang.org/grpc v1.20.0 bump google.golang.org/grpc v1.20.1 May 5, 2019
AkihiroSuda added a commit to AkihiroSuda/buildkit_poc that referenced this pull request May 7, 2019
Bisecting CI failure moby#936 in bumping up grpc 1.12 to 1.20

Signed-off-by: Akihiro Suda <[email protected]>
@AkihiroSuda
Copy link
Member Author

failure seems caused in grpc/grpc-go@40cd6b1

#981

@@ -111,6 +111,7 @@ func (c *conn) Close() (err error) {
err = c.stream.RecvMsg(m)
if err != nil {
if err != io.EOF {
c.readMu.Unlock()
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was the cause of the failure.

CI now passing 🎉

@tonistiigi @thaJeztah PTAL

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you could equivalently have moved the existing Unlock() to a defer next to the Lock()?

Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

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

Successfully merging this pull request may close these issues.

4 participants