#!watchflakes
default <- pkg == "golang.org/x/tools/gopls/internal/test/marker" && test == "Test/callhierarchy/callhierarchy.txt"

Issue created automatically to collect these failures.

Example (log):

=== RUN   Test/callhierarchy/callhierarchy.txt
=== PAUSE Test/callhierarchy/callhierarchy.txt

watchflakes

Comment From: gopherbot

Found new dashboard test flakes for:

#!watchflakes
default <- pkg == "golang.org/x/tools/gopls/internal/test/marker" && test == "Test/callhierarchy/callhierarchy.txt"
2025-06-02 21:22 x_tools-gotip-freebsd-amd64 tools@58e5e623 go@3bd0eab9 x/tools/gopls/internal/test/marker.Test/callhierarchy/callhierarchy.txt [ABORT] (log) === RUN Test/callhierarchy/callhierarchy.txt === PAUSE Test/callhierarchy/callhierarchy.txt

watchflakes

Comment From: adonovan

Test timeout after 10m, vast number of goroutines (>1000), many in lsprpc.ServeStream (why so many?), lots of still tests running. A call to ResolveCodeAction is blocked on the client. Not sure what is going on here. Just an overloaded system?

Comment From: adonovan

It appears that around 577 conn.run calls are active at once, plus (only?!) 287 streamServer.ServeStream calls. Each one of them looks to be doing something reasonable but none is making progress. Is it just an unfortunate timing issue has caused a cascade? Perhaps we should practice some kind of admission control and fail (or hold back) incoming RPCs if there are too many in flight.

@h9jiang @findleyr Is there any possibility that recent MCP changes have introduced a regression into the LSP connection handling? I don't see any obvious problems.

Comment From: findleyr

I think this may be a real bug in the test framework. Milestoning for v0.20.0.

Comment From: gopherbot

Change https://go.dev/cl/686075 mentions this issue: gopls/internal/test/marker: close the JSON-RPC connection when tests exit

Comment From: gopherbot

Found new dashboard test flakes for:

#!watchflakes
default <- pkg == "golang.org/x/tools/gopls/internal/test/marker" && test == "Test/callhierarchy/callhierarchy.txt"
2025-07-08 13:34 x_tools-go1.23-darwin-arm64-race tools@02a89fc3 release-branch.go1.23@e919b332 x/tools/gopls/internal/test/marker.Test/callhierarchy/callhierarchy.txt [SKIP] (log) === RUN Test/callhierarchy/callhierarchy.txt === PAUSE Test/callhierarchy/callhierarchy.txt
2025-07-08 13:34 x_tools-go1.23-linux-arm64-race tools@02a89fc3 release-branch.go1.23@e919b332 x/tools/gopls/internal/test/marker.Test/callhierarchy/callhierarchy.txt [SKIP] (log) === RUN Test/callhierarchy/callhierarchy.txt === PAUSE Test/callhierarchy/callhierarchy.txt

watchflakes

Comment From: gopherbot

Found new dashboard test flakes for:

#!watchflakes
default <- pkg == "golang.org/x/tools/gopls/internal/test/marker" && test == "Test/callhierarchy/callhierarchy.txt"
2025-07-08 15:17 x_tools-gotip-darwin-arm64-race tools@1a9eb83e go@fca43a84 x/tools/gopls/internal/test/marker.Test/callhierarchy/callhierarchy.txt [SKIP] (log) === RUN Test/callhierarchy/callhierarchy.txt === PAUSE Test/callhierarchy/callhierarchy.txt

watchflakes

Comment From: gopherbot

Found new dashboard test flakes for:

#!watchflakes
default <- pkg == "golang.org/x/tools/gopls/internal/test/marker" && test == "Test/callhierarchy/callhierarchy.txt"
2025-07-08 16:51 x_tools-go1.23-linux-arm64-race tools@1a2d84c1 release-branch.go1.23@0a75dd7c x/tools/gopls/internal/test/marker.Test/callhierarchy/callhierarchy.txt [SKIP] (log) === RUN Test/callhierarchy/callhierarchy.txt === PAUSE Test/callhierarchy/callhierarchy.txt

watchflakes

Comment From: adonovan

Buried in the JSON log and almost impossible to find is this, implicating TestMCPCommandHTTP:


{"Time":"2025-07-08T17:16:36.987572277Z","Action":"output","Package":"golang.org/x/tools/gopls/internal/cmd","Test":"TestMCPCommandStdio","Output":"=== RUN   TestMCPCommandStdio\n"}
{"Time":"2025-07-08T17:16:37.059941617Z","Action":"output","Package":"golang.org/x/tools/gopls/internal/filecache","Output":"ok  \tgolang.org/x/tools/gopls/internal/filecache\t2.371s\n"}
{"Time":"2025-07-08T17:16:37.138010956Z","Action":"pass","Package":"golang.org/x/tools/gopls/internal/filecache","Elapsed":2.449}
{"Time":"2025-07-08T17:16:39.744908694Z","Action":"output","Package":"golang.org/x/tools/gopls/internal/cmd","Test":"TestMCPCommandStdio","Output":"--- PASS: TestMCPCommandStdio (2.76s)\n"}
{"Time":"2025-07-08T17:16:39.744946054Z","Action":"pass","Package":"golang.org/x/tools/gopls/internal/cmd","Test":"TestMCPCommandStdio","Elapsed":2.76}
{"Time":"2025-07-08T17:16:39.744958454Z","Action":"run","Package":"golang.org/x/tools/gopls/internal/cmd","Test":"TestMCPCommandHTTP"}
{"Time":"2025-07-08T17:16:39.744961614Z","Action":"output","Package":"golang.org/x/tools/gopls/internal/cmd","Test":"TestMCPCommandHTTP","Output":"=== RUN   TestMCPCommandHTTP\n"}
{"Time":"2025-07-08T17:16:39.771548727Z","Action":"output","Package":"golang.org/x/tools/gopls/internal/cmd","Test":"TestMCPCommandHTTP","Output":"    mcp_test.go:138: dialing..\n"}
{"Time":"2025-07-08T17:16:39.772029127Z","Action":"output","Package":"golang.org/x/tools/gopls/internal/cmd","Test":"TestMCPCommandHTTP","Output":"    mcp_test.go:144: failed 0, trying again\n"}
{"Time":"2025-07-08T17:16:39.826900552Z","Action":"output","Package":"golang.org/x/tools/gopls/internal/cmd","Test":"TestMCPCommandHTTP","Output":"    mcp_test.go:138: dialing..\n"}
{"Time":"2025-07-08T17:16:39.826925792Z","Action":"output","Package":"golang.org/x/tools/gopls/internal/cmd","Test":"TestMCPCommandHTTP","Output":"    mcp_test.go:144: failed 1, trying again\n"}
{"Time":"2025-07-08T17:16:39.927066205Z","Action":"output","Package":"golang.org/x/tools/gopls/internal/cmd","Test":"TestMCPCommandHTTP","Output":"    mcp_test.go:138: dialing..\n"}
{"Time":"2025-07-08T17:16:39.927094485Z","Action":"output","Package":"golang.org/x/tools/gopls/internal/cmd","Test":"TestMCPCommandHTTP","Output":"    mcp_test.go:144: failed 2, trying again\n"}
{"Time":"2025-07-08T17:16:40.13321431Z","Action":"output","Package":"golang.org/x/tools/gopls/internal/cmd","Test":"TestMCPCommandHTTP","Output":"    mcp_test.go:138: dialing..\n"}
{"Time":"2025-07-08T17:16:40.13324151Z","Action":"output","Package":"golang.org/x/tools/gopls/internal/cmd","Test":"TestMCPCommandHTTP","Output":"    mcp_test.go:144: failed 3, trying again\n"}
{"Time":"2025-07-08T17:16:40.159769543Z","Action":"output","Package":"golang.org/x/tools/gopls/internal/cmd","Test":"TestMCPCommandHTTP","Output":"2025/07/08 17:16:40 Info:2025/07/08 17:16:40 Created View (#1)\n"}
{"Time":"2025-07-08T17:16:40.159804183Z","Action":"output","Package":"golang.org/x/tools/gopls/internal/cmd","Test":"TestMCPCommandHTTP","Output":"\tdirectory=/home/swarming/.swarming/w/ir/x/t/TestMCPCommandHTTP1253418487/001\n"}
{"Time":"2025-07-08T17:16:40.159808863Z","Action":"output","Package":"golang.org/x/tools/gopls/internal/cmd","Test":"TestMCPCommandHTTP","Output":"\tview_type=\"GoMod\"\n"}
{"Time":"2025-07-08T17:16:40.159812703Z","Action":"output","Package":"golang.org/x/tools/gopls/internal/cmd","Test":"TestMCPCommandHTTP","Output":"\troot_dir=\"file:///home/swarming/.swarming/w/ir/x/t/TestMCPCommandHTTP1253418487/001\"\n"}
{"Time":"2025-07-08T17:16:40.159815583Z","Action":"output","Package":"golang.org/x/tools/gopls/internal/cmd","Test":"TestMCPCommandHTTP","Output":"\tgo_version=\"go version go1.24.2 linux/arm64\"\n"}
{"Time":"2025-07-08T17:16:40.159818583Z","Action":"output","Package":"golang.org/x/tools/gopls/internal/cmd","Test":"TestMCPCommandHTTP","Output":"\tbuild_flags=[]\n"}
{"Time":"2025-07-08T17:16:40.159821863Z","Action":"output","Package":"golang.org/x/tools/gopls/internal/cmd","Test":"TestMCPCommandHTTP","Output":"\tenv={GOOS:linux GOARCH:arm64 GOCACHE:/home/swarming/.swarming/w/ir/x/w/gocache GOMODCACHE:/home/swarming/.swarming/w/ir/x/w/gopath/pkg/mod GOPATH:/home/swarming/.swarming/w/ir/x/w/gopath GOPRIVATE: GOFLAGS: GO111MODULE: GOTOOLCHAIN:auto GOROOT:/home/swarming/.swarming/w/ir/x/w/gopath/pkg/mod/golang.org/toolchain@v0.0.1-go1.24.2.linux-arm64 GoVersion:24 GoVersionOutput:go version go1.24.2 linux/arm64\n"}
{"Time":"2025-07-08T17:16:40.159827463Z","Action":"output","Package":"golang.org/x/tools/gopls/internal/cmd","Test":"TestMCPCommandHTTP","Output":" ExplicitGOWORK: EffectiveGOPACKAGESDRIVER:}\n"}
{"Time":"2025-07-08T17:16:40.159830063Z","Action":"output","Package":"golang.org/x/tools/gopls/internal/cmd","Test":"TestMCPCommandHTTP","Output":"\tenv_overlay=[]\n"}
{"Time":"2025-07-08T17:16:40.248935559Z","Action":"output","Package":"golang.org/x/tools/gopls/internal/cmd","Test":"TestMCPCommandHTTP","Output":"2025/07/08 17:16:40 Info:2025/07/08 17:16:40 go/packages.Load #1\n"}
{"Time":"2025-07-08T17:16:40.248964159Z","Action":"output","Package":"golang.org/x/tools/gopls/internal/cmd","Test":"TestMCPCommandHTTP","Output":"\tview_id=\"1\"\n"}
{"Time":"2025-07-08T17:16:40.248967919Z","Action":"output","Package":"golang.org/x/tools/gopls/internal/cmd","Test":"TestMCPCommandHTTP","Output":"\tsnapshot=0\n"}
{"Time":"2025-07-08T17:16:40.248970599Z","Action":"output","Package":"golang.org/x/tools/gopls/internal/cmd","Test":"TestMCPCommandHTTP","Output":"\tdirectory=/home/swarming/.swarming/w/ir/x/t/TestMCPCommandHTTP1253418487/001\n"}
{"Time":"2025-07-08T17:16:40.248973959Z","Action":"output","Package":"golang.org/x/tools/gopls/internal/cmd","Test":"TestMCPCommandHTTP","Output":"\tquery=[/home/swarming/.swarming/w/ir/x/t/TestMCPCommandHTTP1253418487/001/... builtin]\n"}
{"Time":"2025-07-08T17:16:40.248976399Z","Action":"output","Package":"golang.org/x/tools/gopls/internal/cmd","Test":"TestMCPCommandHTTP","Output":"\tpackages=3\n"}
{"Time":"2025-07-08T17:16:40.248978719Z","Action":"output","Package":"golang.org/x/tools/gopls/internal/cmd","Test":"TestMCPCommandHTTP","Output":"\tduration=78.225139ms\n"}
{"Time":"2025-07-08T17:16:40.248981319Z","Action":"output","Package":"golang.org/x/tools/gopls/internal/cmd","Test":"TestMCPCommandHTTP","Output":"2025/07/08 17:16:40 Gopls MCP server: starting up on http\n"}
{"Time":"2025-07-08T17:16:40.532023402Z","Action":"output","Package":"golang.org/x/tools/gopls/internal/cmd","Test":"TestMCPCommandHTTP","Output":"    mcp_test.go:138: dialing..\n"}
{"Time":"2025-07-08T17:16:40.532640962Z","Action":"output","Package":"golang.org/x/tools/gopls/internal/cmd","Test":"TestMCPCommandHTTP","Output":"    mcp_test.go:141: succeeded\n"}
{"Time":"2025-07-08T17:16:40.620688378Z","Action":"output","Package":"golang.org/x/tools/gopls/internal/cmd","Test":"TestMCPCommandHTTP","Output":"--- PASS: TestMCPCommandHTTP (0.88s)\n"}
{"Time":"2025-07-08T17:16:40.620789698Z","Action":"pass","Package":"golang.org/x/tools/gopls/internal/cmd","Test":"TestMCPCommandHTTP","Elapsed":0.88}
{"Time":"2025-07-08T17:16:40.620805538Z","Action":"cont","Package":"golang.org/x/tools/gopls/internal/cmd","Test":"TestVersion"}

Comment From: adonovan

I have filed https://github.com/golang/go/issues/74516 for the builder UI regression.

Comment From: h9jiang

Hi Alan, sorry I miss this issue. I think the MCP server's logic is not enabled in most of the marker test except if explicitly enabled under testdata/mcptools/.

And the logs you shared regarding the TestMCPCommandHTTP passed after three retries. Do you think there is a relationship between this test and the callhierarchy marker test?

Comment From: adonovan

Hi Alan, sorry I miss this issue.

No worries, it's very hard to see!

Do you think there is a relationship between this test and the callhierarchy marker test?

No. I have no idea why watchflakes associated the most recent failure with this issue.

Comment From: gopherbot

Found new dashboard test flakes for:

#!watchflakes
default <- pkg == "golang.org/x/tools/gopls/internal/test/marker" && test == "Test/callhierarchy/callhierarchy.txt"
2025-07-08 17:41 x_tools-go1.23-darwin-amd64_12 tools@2d4b6bf0 release-branch.go1.23@0a75dd7c x/tools/gopls/internal/test/marker.Test/callhierarchy/callhierarchy.txt [SKIP] (log) === RUN Test/callhierarchy/callhierarchy.txt === PAUSE Test/callhierarchy/callhierarchy.txt

watchflakes

Comment From: gopherbot

Found new dashboard test flakes for:

#!watchflakes
default <- pkg == "golang.org/x/tools/gopls/internal/test/marker" && test == "Test/callhierarchy/callhierarchy.txt"
2025-07-08 16:51 x_tools-go1.25-darwin-arm64-race tools@e90a9067 release-branch.go1.25@e73dadc7 x/tools/gopls/internal/test/marker.Test/callhierarchy/callhierarchy.txt [SKIP] (log) === RUN Test/callhierarchy/callhierarchy.txt === PAUSE Test/callhierarchy/callhierarchy.txt

watchflakes

Comment From: gopherbot

Found new dashboard test flakes for:

#!watchflakes
default <- pkg == "golang.org/x/tools/gopls/internal/test/marker" && test == "Test/callhierarchy/callhierarchy.txt"
2025-07-08 21:22 x_tools-go1.24-darwin-arm64_15 tools@d1921d10 release-branch.go1.24@9d828e80 x/tools/gopls/internal/test/marker.Test/callhierarchy/callhierarchy.txt [SKIP] (log) === RUN Test/callhierarchy/callhierarchy.txt === PAUSE Test/callhierarchy/callhierarchy.txt

watchflakes