#!watchflakes
default <- pkg == "golang.org/x/tools/gopls/internal/test/marker" && `WARNING: DATA RACE`

Issue created automatically to collect these failures.

Example (log):

=== RUN   Test/foldingrange/a_lineonly.txt
=== PAUSE Test/foldingrange/a_lineonly.txt
=== CONT  Test/foldingrange/a_lineonly.txt
==================
WARNING: DATA RACE
Write at 0x00c01238f5f0 by goroutine 314:
  runtime.recvDirect()
      /Users/swarming/.swarming/w/ir/x/w/goroot/src/runtime/chan.go:405 +0x7c
  golang.org/x/tools/gopls/internal/test/integration.(*Env).Close()
      /Users/swarming/.swarming/w/ir/x/w/targetrepo2258331998/gopls/internal/test/integration/wrappers.go:644 +0x338
...
      /Users/swarming/.swarming/w/ir/x/w/targetrepo2258331998/gopls/internal/test/marker/marker_test.go:1016 +0xc1c
  golang.org/x/tools/gopls/internal/test/marker.Test.func1()
      /Users/swarming/.swarming/w/ir/x/w/targetrepo2258331998/gopls/internal/test/marker/marker_test.go:191 +0xaac
  testing.tRunner()
      /Users/swarming/.swarming/w/ir/x/w/goroot/src/testing/testing.go:1934 +0x164
  testing.(*T).Run.gowrap1()
      /Users/swarming/.swarming/w/ir/x/w/goroot/src/testing/testing.go:1997 +0x3c
==================
    testing.go:1617: race detected during execution of test
--- FAIL: Test/foldingrange/a_lineonly.txt (2.70s)

watchflakes

Comment From: gopherbot

Found new dashboard test flakes for:

#!watchflakes
default <- pkg == "golang.org/x/tools/gopls/internal/test/marker" && test == "Test/foldingrange/a_lineonly.txt"
2025-07-08 20:57 x_tools-go1.25-darwin-arm64-race tools@7b8dc5db release-branch.go1.25@e73dadc7 x/tools/gopls/internal/test/marker.Test/foldingrange/a_lineonly.txt (log) === RUN Test/foldingrange/a_lineonly.txt === PAUSE Test/foldingrange/a_lineonly.txt === CONT Test/foldingrange/a_lineonly.txt ================== WARNING: DATA RACE Write at 0x00c01238f5f0 by goroutine 314: runtime.recvDirect() /Users/swarming/.swarming/w/ir/x/w/goroot/src/runtime/chan.go:405 +0x7c golang.org/x/tools/gopls/internal/test/integration.(*Env).Close() /Users/swarming/.swarming/w/ir/x/w/targetrepo2258331998/gopls/internal/test/integration/wrappers.go:644 +0x338 ... /Users/swarming/.swarming/w/ir/x/w/targetrepo2258331998/gopls/internal/test/marker/marker_test.go:1016 +0xc1c golang.org/x/tools/gopls/internal/test/marker.Test.func1() /Users/swarming/.swarming/w/ir/x/w/targetrepo2258331998/gopls/internal/test/marker/marker_test.go:191 +0xaac testing.tRunner() /Users/swarming/.swarming/w/ir/x/w/goroot/src/testing/testing.go:1934 +0x164 testing.(*T).Run.gowrap1() /Users/swarming/.swarming/w/ir/x/w/goroot/src/testing/testing.go:1997 +0x3c ================== testing.go:1617: race detected during execution of test --- FAIL: Test/foldingrange/a_lineonly.txt (2.70s)

watchflakes

Comment From: gopherbot

Found new dashboard test flakes for:

#!watchflakes
default <- pkg == "golang.org/x/tools/gopls/internal/test/marker" && `WARNING: DATA RACE`
2025-07-08 16:51 x_tools-go1.23-darwin-amd64-race tools@1a2d84c1 release-branch.go1.23@0a75dd7c x/tools/gopls/internal/test/marker.Test/mcptools/file_metadata.txt (log) === RUN Test/mcptools/file_metadata.txt === PAUSE Test/mcptools/file_metadata.txt === CONT Test/mcptools/file_metadata.txt ================== WARNING: DATA RACE Write at 0x00c01849f970 by goroutine 317: runtime.closechan() /Users/swarming/.swarming/w/ir/x/w/gopath/pkg/mod/golang.org/toolchain@v0.0.1-go1.24.2.darwin-amd64/src/runtime/chan.go:414 +0x0 golang.org/x/tools/gopls/internal/test/integration.(*Env).Close() /Users/swarming/.swarming/w/ir/x/w/targetrepo857277307/gopls/internal/test/integration/wrappers.go:644 +0x44e ... /Users/swarming/.swarming/w/ir/x/w/targetrepo857277307/gopls/internal/test/marker/marker_test.go:1016 +0x1084 golang.org/x/tools/gopls/internal/test/marker.Test.func1() /Users/swarming/.swarming/w/ir/x/w/targetrepo857277307/gopls/internal/test/marker/marker_test.go:191 +0xf2f testing.tRunner() /Users/swarming/.swarming/w/ir/x/w/gopath/pkg/mod/golang.org/toolchain@v0.0.1-go1.24.2.darwin-amd64/src/testing/testing.go:1792 +0x225 testing.(*T).Run.gowrap1() /Users/swarming/.swarming/w/ir/x/w/gopath/pkg/mod/golang.org/toolchain@v0.0.1-go1.24.2.darwin-amd64/src/testing/testing.go:1851 +0x44 ================== testing.go:1490: race detected during execution of test --- FAIL: Test/mcptools/file_metadata.txt (5.05s)
2025-07-08 20:57 x_tools-go1.24-darwin-amd64-race tools@7b8dc5db release-branch.go1.24@9d828e80 x/tools/gopls/internal/test/marker.Test/mcptools/symbol_references.txt (log) === RUN Test/mcptools/symbol_references.txt === PAUSE Test/mcptools/symbol_references.txt === CONT Test/mcptools/symbol_references.txt ================== WARNING: DATA RACE Write at 0x00c02871a780 by goroutine 321: runtime.closechan() /Users/swarming/.swarming/w/ir/x/w/goroot/src/runtime/chan.go:414 +0x0 golang.org/x/tools/gopls/internal/test/integration.(*Env).Close() /Users/swarming/.swarming/w/ir/x/w/targetrepo2368000753/gopls/internal/test/integration/wrappers.go:644 +0x44e ... /Users/swarming/.swarming/w/ir/x/w/targetrepo2368000753/gopls/internal/test/marker/marker_test.go:1016 +0x1084 golang.org/x/tools/gopls/internal/test/marker.Test.func1() /Users/swarming/.swarming/w/ir/x/w/targetrepo2368000753/gopls/internal/test/marker/marker_test.go:191 +0xf2f testing.tRunner() /Users/swarming/.swarming/w/ir/x/w/goroot/src/testing/testing.go:1792 +0x225 testing.(*T).Run.gowrap1() /Users/swarming/.swarming/w/ir/x/w/goroot/src/testing/testing.go:1851 +0x44 ================== testing.go:1490: race detected during execution of test --- FAIL: Test/mcptools/symbol_references.txt (2.58s)
2025-07-08 20:57 x_tools-go1.25-darwin-amd64-race tools@7b8dc5db release-branch.go1.25@e73dadc7 x/tools/gopls/internal/test/marker.Test/implementation/generics.txt (log) === RUN Test/implementation/generics.txt === PAUSE Test/implementation/generics.txt === CONT Test/implementation/generics.txt ================== WARNING: DATA RACE Write at 0x00c01af4eb70 by goroutine 320: runtime.closechan() /Users/swarming/.swarming/w/ir/x/w/goroot/src/runtime/chan.go:414 +0x0 golang.org/x/tools/gopls/internal/test/integration.(*Env).Close() /Users/swarming/.swarming/w/ir/x/w/targetrepo4032880464/gopls/internal/test/integration/wrappers.go:644 +0x44e ... /Users/swarming/.swarming/w/ir/x/w/targetrepo4032880464/gopls/internal/test/marker/marker_test.go:1016 +0x108b golang.org/x/tools/gopls/internal/test/marker.Test.func1() /Users/swarming/.swarming/w/ir/x/w/targetrepo4032880464/gopls/internal/test/marker/marker_test.go:191 +0xf2f testing.tRunner() /Users/swarming/.swarming/w/ir/x/w/goroot/src/testing/testing.go:1934 +0x21c testing.(*T).Run.gowrap1() /Users/swarming/.swarming/w/ir/x/w/goroot/src/testing/testing.go:1997 +0x44 ================== testing.go:1617: race detected during execution of test --- FAIL: Test/implementation/generics.txt (3.50s)
2025-07-08 20:57 x_tools-go1.25-linux-amd64-longtest-race tools@7b8dc5db release-branch.go1.25@e73dadc7 x/tools/gopls/internal/test/marker.Test/implementation/issue74305.txt (log) === RUN Test/implementation/issue74305.txt === PAUSE Test/implementation/issue74305.txt === CONT Test/implementation/issue74305.txt ================== WARNING: DATA RACE Write at 0x00c02c674630 by goroutine 332: runtime.closechan() /home/swarming/.swarming/w/ir/x/w/goroot/src/runtime/chan.go:414 +0x0 golang.org/x/tools/gopls/internal/test/integration.(*Env).Close() /home/swarming/.swarming/w/ir/x/w/targetrepo1112881149/gopls/internal/test/integration/wrappers.go:644 +0x44e ... /home/swarming/.swarming/w/ir/x/w/targetrepo1112881149/gopls/internal/test/marker/marker_test.go:1016 +0x108b golang.org/x/tools/gopls/internal/test/marker.Test.func1() /home/swarming/.swarming/w/ir/x/w/targetrepo1112881149/gopls/internal/test/marker/marker_test.go:191 +0xf2f testing.tRunner() /home/swarming/.swarming/w/ir/x/w/goroot/src/testing/testing.go:1934 +0x21c testing.(*T).Run.gowrap1() /home/swarming/.swarming/w/ir/x/w/goroot/src/testing/testing.go:1997 +0x44 ================== testing.go:1617: race detected during execution of test --- FAIL: Test/implementation/issue74305.txt (1.26s)

watchflakes

Comment From: gopherbot

Found new dashboard test flakes for:

#!watchflakes
default <- pkg == "golang.org/x/tools/gopls/internal/test/marker" && `WARNING: DATA RACE`
2025-07-08 16:44 x_tools-go1.25-darwin-amd64-race tools@46b77f46 release-branch.go1.25@e73dadc7 x/tools/gopls/internal/test/marker.Test/rename/doclink.txt (log) === RUN Test/rename/doclink.txt === PAUSE Test/rename/doclink.txt === CONT Test/rename/doclink.txt ================== WARNING: DATA RACE Write at 0x00c01548ed30 by goroutine 314: runtime.closechan() /Users/swarming/.swarming/w/ir/x/w/goroot/src/runtime/chan.go:414 +0x0 golang.org/x/tools/gopls/internal/test/integration.(*Env).Close() /Users/swarming/.swarming/w/ir/x/w/targetrepo2384095295/gopls/internal/test/integration/wrappers.go:644 +0x44e ... /Users/swarming/.swarming/w/ir/x/w/targetrepo2384095295/gopls/internal/test/marker/marker_test.go:1016 +0x108b golang.org/x/tools/gopls/internal/test/marker.Test.func1() /Users/swarming/.swarming/w/ir/x/w/targetrepo2384095295/gopls/internal/test/marker/marker_test.go:191 +0xf2f testing.tRunner() /Users/swarming/.swarming/w/ir/x/w/goroot/src/testing/testing.go:1934 +0x21c testing.(*T).Run.gowrap1() /Users/swarming/.swarming/w/ir/x/w/goroot/src/testing/testing.go:1997 +0x44 ================== testing.go:1617: race detected during execution of test --- FAIL: Test/rename/doclink.txt (2.33s)

watchflakes

Comment From: gopherbot

Change https://go.dev/cl/686835 mentions this issue: gopls/internal/test/marker: temporarily revert marker test shutdown

Comment From: gopherbot

Found new dashboard test flakes for:

#!watchflakes
default <- pkg == "golang.org/x/tools/gopls/internal/test/marker" && `WARNING: DATA RACE`
2025-07-08 21:22 x_tools-go1.23-darwin-amd64-race tools@d1921d10 release-branch.go1.23@e9d2c032 x/tools/gopls/internal/test/marker.Test/codeaction/fill_struct_resolve.txt (log) === RUN Test/codeaction/fill_struct_resolve.txt === PAUSE Test/codeaction/fill_struct_resolve.txt === CONT Test/codeaction/fill_struct_resolve.txt ================== WARNING: DATA RACE Write at 0x00c00e220e10 by goroutine 323: runtime.closechan() /Volumes/Work/s/w/ir/x/w/gopath/pkg/mod/golang.org/toolchain@v0.0.1-go1.24.2.darwin-amd64/src/runtime/chan.go:414 +0x0 golang.org/x/tools/gopls/internal/test/integration.(*Env).Close() /Volumes/Work/s/w/ir/x/w/targetrepo254272718/gopls/internal/test/integration/wrappers.go:644 +0x44e ... /Volumes/Work/s/w/ir/x/w/targetrepo254272718/gopls/internal/test/marker/marker_test.go:1016 +0x1084 golang.org/x/tools/gopls/internal/test/marker.Test.func1() /Volumes/Work/s/w/ir/x/w/targetrepo254272718/gopls/internal/test/marker/marker_test.go:191 +0xf2f testing.tRunner() /Volumes/Work/s/w/ir/x/w/gopath/pkg/mod/golang.org/toolchain@v0.0.1-go1.24.2.darwin-amd64/src/testing/testing.go:1792 +0x225 testing.(*T).Run.gowrap1() /Volumes/Work/s/w/ir/x/w/gopath/pkg/mod/golang.org/toolchain@v0.0.1-go1.24.2.darwin-amd64/src/testing/testing.go:1851 +0x44 ================== testing.go:1490: race detected during execution of test --- FAIL: Test/codeaction/fill_struct_resolve.txt (20.00s)
2025-07-08 21:22 x_tools-go1.23-linux-amd64-race tools@d1921d10 release-branch.go1.23@0a75dd7c x/tools/gopls/internal/test/marker.Test/references/issue59851.txt (log) === RUN Test/references/issue59851.txt === PAUSE Test/references/issue59851.txt === CONT Test/references/issue59851.txt ================== WARNING: DATA RACE Write at 0x00c00ee96940 by goroutine 333: runtime.closechan() /home/swarming/.swarming/w/ir/x/w/gopath/pkg/mod/golang.org/toolchain@v0.0.1-go1.24.2.linux-amd64/src/runtime/chan.go:414 +0x0 golang.org/x/tools/gopls/internal/test/integration.(*Env).Close() /home/swarming/.swarming/w/ir/x/w/targetrepo3421224536/gopls/internal/test/integration/wrappers.go:644 +0x44e ... /home/swarming/.swarming/w/ir/x/w/targetrepo3421224536/gopls/internal/test/marker/marker_test.go:1016 +0x1084 golang.org/x/tools/gopls/internal/test/marker.Test.func1() /home/swarming/.swarming/w/ir/x/w/targetrepo3421224536/gopls/internal/test/marker/marker_test.go:191 +0xf2f testing.tRunner() /home/swarming/.swarming/w/ir/x/w/gopath/pkg/mod/golang.org/toolchain@v0.0.1-go1.24.2.linux-amd64/src/testing/testing.go:1792 +0x225 testing.(*T).Run.gowrap1() /home/swarming/.swarming/w/ir/x/w/gopath/pkg/mod/golang.org/toolchain@v0.0.1-go1.24.2.linux-amd64/src/testing/testing.go:1851 +0x44 ================== testing.go:1490: race detected during execution of test --- FAIL: Test/references/issue59851.txt (2.36s)

watchflakes

Comment From: gopherbot

Change https://go.dev/cl/686916 mentions this issue: gopls/internal/cmd: avoid the use of channels in the sessions API