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/internal/jsonrpc2_v2: "panic: close of closed channel" in idleListener.run #51435

Closed
bcmills opened this issue Mar 2, 2022 · 13 comments
Assignees
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. Tools This label describes issues relating to any tools in the x/tools repository.
Milestone

Comments

@bcmills
Copy link
Contributor

bcmills commented Mar 2, 2022

#!watchflakes
post <- pkg == "golang.org/x/tools/internal/jsonrpc2_v2" && 
        `panic: close of closed channel` && `\(\*idleListener\)\.run`

panic: close of closed channel

goroutine 200 [running]:
golang.org/x/tools/internal/jsonrpc2_v2.(*idleListener).run(0x5dba6090)
/tmp/workdir/gopath/src/golang.org/x/tools/internal/jsonrpc2_v2/serve.go:276 +0x168
created by golang.org/x/tools/internal/jsonrpc2_v2.NewIdleListener
/tmp/workdir/gopath/src/golang.org/x/tools/internal/jsonrpc2_v2/serve.go:185 +0x136
FAIL golang.org/x/tools/internal/jsonrpc2_v2 1.607s


`greplogs --dashboard -md -l -e '(?ms)panic: close of closed channel.*FAIL\s+golang\.org/x/tools/internal/jsonrpc2_v2'`

[2022-03-02T15:39:07-abbbcaf-40e24a9/openbsd-386-68](https://build.golang.org/log/2b108c1fce127ee077fc14f7dd88d6a44d89c4cd)
[2022-02-15T19:04:00-be40034-b5af5c0/openbsd-386-68](https://build.golang.org/log/5da4dfa703d1f2c44511cbc5c9d0ebc7831bcbe0)
[2022-01-04T22:27:20-15409b5-f154f8b/openbsd-amd64-68](https://build.golang.org/log/40c620d4d7c13ec534c3533c671cf529c990f5ac)
[2021-12-09T13:44:55-e06c107-de690c2/openbsd-386-70-n2](https://build.golang.org/log/dcbe0cd8fb9b7440f657b5a013d1bd7851a94875)
[2021-12-06T21:14:21-feb39d0-d16a575/openbsd-amd64-68](https://build.golang.org/log/087673868df53a8cb9d1526ca75cb9e516113769)
[2021-11-01T14:45:28-42daa65-82f902a/freebsd-amd64-12_2](https://build.golang.org/log/458efad28fe972b0ad49c0477e9babab89b067ea)
[2021-10-21T17:03:18-4100dac-2ac3bdf/openbsd-amd64-68](https://build.golang.org/log/397ef5361eb807778da4f593b64637c6f37c06b8)
[2021-10-19T23:13:35-81f084e-2be5b84/netbsd-amd64-9_0](https://build.golang.org/log/a4ac3f84e2ae8f0083e7101928edfa37a99cd008)
[2021-05-18T22:36:55-17b3466-eeadce2/openbsd-amd64-68](https://build.golang.org/log/d9a1b51af28c8c14b3f0d00485c3dcd00ba844f4)
[2021-05-13T12:32:21-57c3a74-a63cded/openbsd-386-68](https://build.golang.org/log/f4c1b55feda7a1741bebae62edb1f0033ba60496)
[2021-05-12T14:43:27-be4aaae-485474d/openbsd-amd64-68](https://build.golang.org/log/9bd8037f2a514178807acbe0ff580c72d5c6d1b0)
@bcmills bcmills added the NeedsFix The path to resolution is known, but the work has not been done. label Mar 2, 2022
@bcmills bcmills self-assigned this Mar 2, 2022
@gopherbot gopherbot added the Tools This label describes issues relating to any tools in the x/tools repository. label Mar 2, 2022
@gopherbot gopherbot added this to the Unreleased milestone Mar 2, 2022
uji added a commit to uji/tools that referenced this issue Mar 5, 2022
…el" in idleListener.run

When timeout, closing timeout channel in idleListener.run may be called many times.
I added sync.Once field to idleListner for preventing it.

Fixes golang/go#51435
@gopherbot
Copy link

Change https://go.dev/cl/390194 mentions this issue: internal/jsonrpc2_v2: add sync.Once for "panic: close of closed channel" in idleListener.run

@adonovan
Copy link
Member

Will be fixed (or rendered obsolete) by https://go-review.googlesource.com/c/tools/+/388597/.

@heschi
Copy link
Contributor

heschi commented Jul 6, 2022

@gopherbot
Copy link

Found new matching dashboard test flakes for:

#!watchflakes
post <- pkg == "golang.org/x/tools/internal/jsonrpc2_v2" && 
        `panic: close of closed channel` && `\(\*idleListener\)\.run`
2022-07-29 20:19 openbsd-386-68 tools@9580c84d go@dee3efd9 x/tools/internal/jsonrpc2_v2 (log)
panic: close of closed channel

goroutine 210 [running]:
golang.org/x/tools/internal/jsonrpc2_v2.(*idleListener).run(0x7483a180)
	/tmp/workdir/gopath/src/golang.org/x/tools/internal/jsonrpc2_v2/serve.go:275 +0x168
created by golang.org/x/tools/internal/jsonrpc2_v2.NewIdleListener
	/tmp/workdir/gopath/src/golang.org/x/tools/internal/jsonrpc2_v2/serve.go:184 +0x136
2022-08-10 17:41 openbsd-amd64-68 tools@0ad49fde go@d4280fda x/tools/internal/jsonrpc2_v2 (log)
panic: close of closed channel

goroutine 206 [running]:
golang.org/x/tools/internal/jsonrpc2_v2.(*idleListener).run(0xc000462340)
	/tmp/workdir/gopath/src/golang.org/x/tools/internal/jsonrpc2_v2/serve.go:275 +0x19f
created by golang.org/x/tools/internal/jsonrpc2_v2.NewIdleListener
	/tmp/workdir/gopath/src/golang.org/x/tools/internal/jsonrpc2_v2/serve.go:184 +0x130
2022-08-10 17:41 openbsd-amd64-70 tools@0ad49fde go@9f8685f4 x/tools/internal/jsonrpc2_v2 (log)
panic: close of closed channel

goroutine 116 [running]:
golang.org/x/tools/internal/jsonrpc2_v2.(*idleListener).run(0xc0000ca380)
	/tmp/workdir/gopath/src/golang.org/x/tools/internal/jsonrpc2_v2/serve.go:275 +0x19f
created by golang.org/x/tools/internal/jsonrpc2_v2.NewIdleListener
	/tmp/workdir/gopath/src/golang.org/x/tools/internal/jsonrpc2_v2/serve.go:184 +0x130
2022-08-31 14:39 openbsd-amd64-68 tools@41c3a9b1 go@5634629f x/tools/internal/jsonrpc2_v2 (log)
panic: close of closed channel

goroutine 204 [running]:
golang.org/x/tools/internal/jsonrpc2_v2.(*idleListener).run(0xc0003ba000)
	/tmp/workdir/gopath/src/golang.org/x/tools/internal/jsonrpc2_v2/serve.go:275 +0x19f
created by golang.org/x/tools/internal/jsonrpc2_v2.NewIdleListener
	/tmp/workdir/gopath/src/golang.org/x/tools/internal/jsonrpc2_v2/serve.go:184 +0x130
2022-08-31 21:08 openbsd-386-70 tools@4ccc73cb go@889d3265 x/tools/internal/jsonrpc2_v2 (log)
panic: close of closed channel

goroutine 126 [running]:
golang.org/x/tools/internal/jsonrpc2_v2.(*idleListener).run(0x65ba6090)
	/tmp/workdir/gopath/src/golang.org/x/tools/internal/jsonrpc2_v2/serve.go:275 +0x168
created by golang.org/x/tools/internal/jsonrpc2_v2.NewIdleListener
	/tmp/workdir/gopath/src/golang.org/x/tools/internal/jsonrpc2_v2/serve.go:184 +0x136

watchflakes

@gopherbot
Copy link

Found new dashboard test flakes for:

#!watchflakes
post <- pkg == "golang.org/x/tools/internal/jsonrpc2_v2" && 
        `panic: close of closed channel` && `\(\*idleListener\)\.run`
2022-09-20 16:27 openbsd-amd64-68 tools@6782af03 go@d5a5db3b x/tools/internal/jsonrpc2_v2 (log)
panic: close of closed channel

goroutine 186 [running]:
golang.org/x/tools/internal/jsonrpc2_v2.(*idleListener).run(0xc0003a6040)
	/tmp/workdir/gopath/src/golang.org/x/tools/internal/jsonrpc2_v2/serve.go:275 +0x19e
created by golang.org/x/tools/internal/jsonrpc2_v2.NewIdleListener
	/tmp/workdir/gopath/src/golang.org/x/tools/internal/jsonrpc2_v2/serve.go:184 +0x130

watchflakes

@gopherbot
Copy link

Found new dashboard test flakes for:

#!watchflakes
post <- pkg == "golang.org/x/tools/internal/jsonrpc2_v2" && 
        `panic: close of closed channel` && `\(\*idleListener\)\.run`
2022-09-21 16:48 openbsd-386-68 tools@2f047133 go@c8e1cf49 x/tools/internal/jsonrpc2_v2 (log)
panic: close of closed channel

goroutine 199 [running]:
golang.org/x/tools/internal/jsonrpc2_v2.(*idleListener).run(0x668101b0)
	/tmp/workdir/gopath/src/golang.org/x/tools/internal/jsonrpc2_v2/serve.go:275 +0x168
created by golang.org/x/tools/internal/jsonrpc2_v2.NewIdleListener
	/tmp/workdir/gopath/src/golang.org/x/tools/internal/jsonrpc2_v2/serve.go:184 +0x136
2022-09-21 16:48 openbsd-amd64-68 tools@2f047133 go@a366ed59 x/tools/internal/jsonrpc2_v2 (log)
panic: close of closed channel

goroutine 62 [running]:
golang.org/x/tools/internal/jsonrpc2_v2.(*idleListener).run(0xc000092b40)
	/tmp/workdir/gopath/src/golang.org/x/tools/internal/jsonrpc2_v2/serve.go:275 +0x19f
created by golang.org/x/tools/internal/jsonrpc2_v2.NewIdleListener
	/tmp/workdir/gopath/src/golang.org/x/tools/internal/jsonrpc2_v2/serve.go:184 +0x130

watchflakes

@gopherbot
Copy link

Found new dashboard test flakes for:

#!watchflakes
post <- pkg == "golang.org/x/tools/internal/jsonrpc2_v2" && 
        `panic: close of closed channel` && `\(\*idleListener\)\.run`
2022-09-26 22:21 openbsd-386-68 tools@eb45e986 go@2b9596cb x/tools/internal/jsonrpc2_v2 (log)
panic: close of closed channel

goroutine 210 [running]:
golang.org/x/tools/internal/jsonrpc2_v2.(*idleListener).run(0x623b2090)
	/tmp/workdir/gopath/src/golang.org/x/tools/internal/jsonrpc2_v2/serve.go:275 +0x168
created by golang.org/x/tools/internal/jsonrpc2_v2.NewIdleListener
	/tmp/workdir/gopath/src/golang.org/x/tools/internal/jsonrpc2_v2/serve.go:184 +0x136

watchflakes

@gopherbot
Copy link

Change https://go.dev/cl/435357 mentions this issue: internal/jsonrpc2_v2: avoid dup close of timeout channel

@gopherbot
Copy link

Found new dashboard test flakes for:

#!watchflakes
post <- pkg == "golang.org/x/tools/internal/jsonrpc2_v2" && 
        `panic: close of closed channel` && `\(\*idleListener\)\.run`
2022-09-29 22:28 openbsd-amd64-68 tools@d49f960b go@d7dbe011 x/tools/internal/jsonrpc2_v2 (log)
panic: close of closed channel

goroutine 210 [running]:
golang.org/x/tools/internal/jsonrpc2_v2.(*idleListener).run(0xc0001be000)
	/tmp/workdir/gopath/src/golang.org/x/tools/internal/jsonrpc2_v2/serve.go:275 +0x18d
created by golang.org/x/tools/internal/jsonrpc2_v2.NewIdleListener
	/tmp/workdir/gopath/src/golang.org/x/tools/internal/jsonrpc2_v2/serve.go:184 +0x130

watchflakes

@gopherbot
Copy link

Found new dashboard test flakes for:

#!watchflakes
post <- pkg == "golang.org/x/tools/internal/jsonrpc2_v2" && 
        `panic: close of closed channel` && `\(\*idleListener\)\.run`
2022-10-07 14:50 openbsd-amd64-68 tools@26a95e69 go@947091d3 x/tools/internal/jsonrpc2_v2 (log)
panic: close of closed channel

goroutine 95 [running]:
golang.org/x/tools/internal/jsonrpc2_v2.(*idleListener).run(0xc00030e340)
	/tmp/workdir/gopath/src/golang.org/x/tools/internal/jsonrpc2_v2/serve.go:275 +0x19e
created by golang.org/x/tools/internal/jsonrpc2_v2.NewIdleListener
	/tmp/workdir/gopath/src/golang.org/x/tools/internal/jsonrpc2_v2/serve.go:184 +0x130

watchflakes

@gopherbot
Copy link

Change https://go.dev/cl/388597 mentions this issue: internal/jsonrpc2_v2: rework concurrency in idleListener

@gopherbot
Copy link

Found new dashboard test flakes for:

#!watchflakes
post <- pkg == "golang.org/x/tools/internal/jsonrpc2_v2" && 
        `panic: close of closed channel` && `\(\*idleListener\)\.run`
2022-10-17 17:58 openbsd-amd64-68 tools@bc4e384f go@b65e259e x/tools/internal/jsonrpc2_v2 (log)
panic: close of closed channel

goroutine 227 [running]:
golang.org/x/tools/internal/jsonrpc2_v2.(*idleListener).run(0xc00071a380)
	/tmp/workdir/gopath/src/golang.org/x/tools/internal/jsonrpc2_v2/serve.go:275 +0x18d
created by golang.org/x/tools/internal/jsonrpc2_v2.NewIdleListener
	/tmp/workdir/gopath/src/golang.org/x/tools/internal/jsonrpc2_v2/serve.go:184 +0x130

watchflakes

@ZekeLu
Copy link
Contributor

ZekeLu commented Oct 26, 2022

golang/tools@bc4e384 does not contain golang/tools@371ef16 yet. So the found flake is not new. This issue can be closed.

@bcmills bcmills closed this as completed Oct 26, 2022
@golang golang locked and limited conversation to collaborators Oct 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. Tools This label describes issues relating to any tools in the x/tools repository.
Projects
Archived in project
5 participants