go icon indicating copy to clipboard operation
go copied to clipboard

x/tools/internal/jsonrpc2_v2: failures with "connection refused"

Open bcmills opened this issue 2 years ago • 8 comments

#!watchflakes
post <- pkg == "golang.org/x/tools/internal/jsonrpc2_v2" && `connection refused`

greplogs --dashboard -md -l -e '(?ms)connection refused.*FAIL\s+golang\.org/x/tools/internal/jsonrpc2_v2' --since=2021-06-03

2021-11-05T04:20:33-6f75aad-0a5ca24/solaris-amd64-oraclerel

--- FAIL: TestIdleTimeout (0.23s)
    serve_test.go:38: dial tcp 127.0.0.1:57098: connect: connection refused
FAIL
FAIL	golang.org/x/tools/internal/jsonrpc2_v2	0.616s

2021-11-03T20:51:16-84e69e7-88407a8/openbsd-amd64-68 2021-10-09T14:53:12-ee04797-eba91e8/dragonfly-amd64 2021-10-08T19:19:09-c5188f2-b9e1e1b/openbsd-amd64-64 2021-09-24T07:22:13-6d1e33f-d413908/plan9-arm 2021-09-19T16:34:52-7559231-771b8ea/freebsd-amd64-race 2021-08-18T22:16:57-bf6c7f2-eda3de0/solaris-amd64-oraclerel 2021-08-02T20:18:28-bb69444-8a7ee4c/freebsd-386-11_4 2021-07-13T20:15:39-ef97713-a985897/solaris-amd64-oraclerel 2021-07-08T19:56:33-febfa9d-3d1d066/linux-amd64-wsl

--- FAIL: TestServe (1.49s)
    --- FAIL: TestServe/tcp (1.47s)
        serve_test.go:104: dial tcp 127.0.0.1:43425: connect: connection refused
FAIL
FAIL	golang.org/x/tools/internal/jsonrpc2_v2	1.801s

2021-07-08T19:53:41-c979f92-296ddf2/linux-amd64-wsl 2021-07-08T17:53:43-55cd480-296ddf2/linux-amd64-wsl 2021-06-24T04:20:08-4833ac5-0e7012e/darwin-amd64-nocgo

Likely related to #46520.

bcmills avatar Nov 05 '21 14:11 bcmills

Change https://go.dev/cl/388598 mentions this issue: internal/jsonrpc2_v2: eliminate arbitrary timeouts in tests

gopherbot avatar Mar 01 '22 03:03 gopherbot

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

gopherbot avatar Mar 01 '22 03:03 gopherbot

Change https://go.dev/cl/388134 mentions this issue: internal/jsonrpc2_v2: rework Connection concurrency

gopherbot avatar Mar 01 '22 03:03 gopherbot

Change https://go.dev/cl/388600 mentions this issue: internal/lsp/protocol: avoid replying with non-nil interface values in case of error

gopherbot avatar Mar 01 '22 05:03 gopherbot

Change https://go.dev/cl/388775 mentions this issue: internal/jsonrpc2_v2: error out in-flight client calls when the reader breaks

gopherbot avatar Mar 01 '22 22:03 gopherbot

Found new matching dashboard test flakes for:

#!watchflakes
post <- pkg == "golang.org/x/tools/internal/jsonrpc2_v2" && `connection refused`
2022-07-25 19:36 openbsd-amd64-68 tools@2a6393fe go@d9242f7a x/tools/internal/jsonrpc2_v2.TestIdleTimeout (log)
--- FAIL: TestIdleTimeout (0.21s)
    serve_test.go:38: dial tcp 127.0.0.1:19493: connect: connection refused
2022-08-05 17:04 openbsd-386-68 tools@06d96ee8 go@fefac44a x/tools/internal/jsonrpc2_v2.TestIdleTimeout (log)
--- FAIL: TestIdleTimeout (0.50s)
    serve_test.go:38: dial tcp 127.0.0.1:41282: connect: connection refused
2022-08-11 16:19 openbsd-386-70 tools@37a81b68 go@3c200d6c x/tools/internal/jsonrpc2_v2.TestIdleTimeout (log)
--- FAIL: TestIdleTimeout (0.84s)
    serve_test.go:38: dial tcp 127.0.0.1:25776: connect: connection refused
2022-08-12 12:39 openbsd-amd64-68 tools@88d981ef go@2cf49a76 x/tools/internal/jsonrpc2_v2.TestIdleTimeout (log)
--- FAIL: TestIdleTimeout (0.51s)
    serve_test.go:38: dial tcp 127.0.0.1:42921: connect: connection refused
2022-08-15 17:37 openbsd-386-68 tools@987de349 go@a1390356 x/tools/internal/jsonrpc2_v2.TestIdleTimeout (log)
--- FAIL: TestIdleTimeout (0.23s)
    serve_test.go:38: dial tcp 127.0.0.1:33705: connect: connection refused
2022-08-25 21:25 openbsd-386-70 tools@2f38e1de go@d7a3fa12 x/tools/internal/jsonrpc2_v2.TestIdleTimeout (log)
--- FAIL: TestIdleTimeout (0.53s)
    serve_test.go:38: dial tcp 127.0.0.1:39589: connect: connection refused
2022-08-26 17:59 freebsd-amd64-12_3 tools@717a6716 go@846c378b x/tools/internal/jsonrpc2_v2.TestIdleTimeout (log)
--- FAIL: TestIdleTimeout (0.78s)
    serve_test.go:38: dial tcp 127.0.0.1:52829: connect: connection refused
2022-08-31 18:33 linux-ppc64-buildlet tools@cb91d6c8 go@86e9e0ea x/tools/internal/jsonrpc2_v2.TestIdleTimeout (log)
--- FAIL: TestIdleTimeout (0.33s)
    serve_test.go:38: dial tcp 127.0.0.1:41650: connect: connection refused
2022-09-01 22:03 openbsd-386-68 tools@40cfafff go@0592ce5f x/tools/internal/jsonrpc2_v2.TestIdleTimeout (log)
--- FAIL: TestIdleTimeout (0.36s)
    serve_test.go:38: dial tcp 127.0.0.1:48578: connect: connection refused
2022-09-02 18:17 linux-s390x-ibm tools@5ba85415 go@0cf996a9 x/tools/internal/jsonrpc2_v2.TestIdleTimeout (log)
--- FAIL: TestIdleTimeout (0.44s)
    serve_test.go:38: dial tcp 127.0.0.1:43873: connect: connection refused
2022-09-07 14:10 openbsd-386-70 tools@c1dd25e8 go@88149ed4 x/tools/internal/jsonrpc2_v2.TestIdleTimeout (log)
--- FAIL: TestIdleTimeout (0.37s)
    serve_test.go:38: dial tcp 127.0.0.1:16458: connect: connection refused
2022-09-08 19:07 openbsd-386-68 tools@4754f75d go@76c94eb7 x/tools/internal/jsonrpc2_v2.TestIdleTimeout (log)
--- FAIL: TestIdleTimeout (0.44s)
    serve_test.go:38: dial tcp 127.0.0.1:46165: connect: connection refused
2022-09-08 19:07 openbsd-386-70 tools@4754f75d go@218294f1 x/tools/internal/jsonrpc2_v2.TestIdleTimeout (log)
--- FAIL: TestIdleTimeout (0.89s)
    serve_test.go:38: dial tcp 127.0.0.1:22060: connect: connection refused
2022-09-13 15:21 openbsd-amd64-68 tools@9250e22a go@9503bcae x/tools/internal/jsonrpc2_v2.TestIdleTimeout (log)
--- FAIL: TestIdleTimeout (0.48s)
    serve_test.go:38: dial tcp 127.0.0.1:37056: connect: connection refused
2022-09-17 00:45 openbsd-amd64-68 tools@4d18923f go@19d792c1 x/tools/internal/jsonrpc2_v2.TestIdleTimeout (log)
--- FAIL: TestIdleTimeout (0.26s)
    serve_test.go:38: dial tcp 127.0.0.1:48575: connect: connection refused
2022-09-19 18:18 linux-ppc64-buildlet tools@fdf581fd go@31d06b58 x/tools/internal/jsonrpc2_v2.TestServe (log)
--- FAIL: TestServe (0.25s)
    --- FAIL: TestServe/tcp (0.22s)
        serve_test.go:104: dial tcp 127.0.0.1:43987: connect: connection refused

watchflakes

gopherbot avatar Sep 20 '22 19:09 gopherbot

Found new dashboard test flakes for:

#!watchflakes
post <- pkg == "golang.org/x/tools/internal/jsonrpc2_v2" && `connection refused`
2022-09-20 12:41 openbsd-386-68 tools@f9016238 go@225bcec9 x/tools/internal/jsonrpc2_v2.TestIdleTimeout (log)
--- FAIL: TestIdleTimeout (0.98s)
    serve_test.go:38: dial tcp 127.0.0.1:42163: connect: connection refused

watchflakes

gopherbot avatar Sep 21 '22 19:09 gopherbot

Found new dashboard test flakes for:

#!watchflakes
post <- pkg == "golang.org/x/tools/internal/jsonrpc2_v2" && `connection refused`
2022-09-21 16:48 linux-s390x-ibm tools@2f047133 go@e40a130c x/tools/internal/jsonrpc2_v2.TestIdleTimeout (log)
--- FAIL: TestIdleTimeout (0.53s)
    serve_test.go:38: dial tcp 127.0.0.1:45873: connect: connection refused

watchflakes

gopherbot avatar Sep 22 '22 15:09 gopherbot

Found new dashboard test flakes for:

#!watchflakes
post <- pkg == "golang.org/x/tools/internal/jsonrpc2_v2" && `connection refused`
2022-09-27 19:33 linux-s390x-ibm tools@10e9d3ce go@d268504f x/tools/internal/jsonrpc2_v2.TestIdleTimeout (log)
--- FAIL: TestIdleTimeout (0.35s)
    serve_test.go:38: dial tcp 127.0.0.1:43919: connect: connection refused

watchflakes

gopherbot avatar Sep 28 '22 19:09 gopherbot

Found new dashboard test flakes for:

#!watchflakes
post <- pkg == "golang.org/x/tools/internal/jsonrpc2_v2" && `connection refused`
2022-10-05 17:59 openbsd-386-68 tools@c5514b75 go@947091d3 x/tools/internal/jsonrpc2_v2.TestIdleTimeout (log)
--- FAIL: TestIdleTimeout (0.39s)
    serve_test.go:38: dial tcp 127.0.0.1:14718: connect: connection refused
2022-10-10 18:26 openbsd-386-70 tools@150b5f8b go@742e0a97 x/tools/internal/jsonrpc2_v2.TestServe (log)
--- FAIL: TestServe (0.66s)
    --- FAIL: TestServe/tcp (0.33s)
        serve_test.go:104: dial tcp 127.0.0.1:1230: connect: connection refused

watchflakes

gopherbot avatar Oct 13 '22 12:10 gopherbot

Found new dashboard test flakes for:

#!watchflakes
post <- pkg == "golang.org/x/tools/internal/jsonrpc2_v2" && `connection refused`
2022-10-15 19:01 openbsd-386-68 tools@9b5e55b1 go@61f0409c x/tools/internal/jsonrpc2_v2.TestIdleTimeout (log)
--- FAIL: TestIdleTimeout (0.55s)
    serve_test.go:38: dial tcp 127.0.0.1:27706: connect: connection refused

watchflakes

gopherbot avatar Oct 15 '22 19:10 gopherbot

Change https://go.dev/cl/443355 mentions this issue: internal/jsonrpc2_v2: remove “Box” suffix from channel field names

gopherbot avatar Oct 17 '22 15:10 gopherbot

Found new dashboard test flakes for:

#!watchflakes
post <- pkg == "golang.org/x/tools/internal/jsonrpc2_v2" && `connection refused`
2022-10-19 20:55 linux-amd64 tools@9eda97bc go@947091d3 x/tools/internal/jsonrpc2_v2.TestIdleTimeout (log)
--- FAIL: TestIdleTimeout (0.01s)
    serve_test.go:127: testing with idle timout 1ms
    serve_test.go:93: conn3 failed to connect after 216.156µs: dial tcp 127.0.0.1:32777: connect: connection refused

watchflakes

gopherbot avatar Oct 19 '22 21:10 gopherbot

Change https://go.dev/cl/446315 mentions this issue: internal/jsonrpc2_v2: initiate shutdown when the Writer breaks

gopherbot avatar Oct 31 '22 18:10 gopherbot

This should be fixed as of CL 443678 or earlier.

bcmills avatar Oct 31 '22 18:10 bcmills

Change https://go.dev/cl/447035 mentions this issue: internal/jsonrpc2_v2: initiate shutdown when the Writer breaks

gopherbot avatar Nov 01 '22 19:11 gopherbot

Found new dashboard test flakes for:

#!watchflakes
post <- pkg == "golang.org/x/tools/internal/jsonrpc2_v2" && `connection refused`
2022-11-04 18:06 openbsd-386-70 tools@39c2fd8b go@156bf3dd x/tools/internal/jsonrpc2_v2.TestIdleTimeout (log)
--- FAIL: TestIdleTimeout (0.13s)
    serve_test.go:124: testing with idle timout 1ms
    serve_test.go:53: jsonrpc2.Dial: dial tcp 127.0.0.1:37504: connect: connection refused
    serve_test.go:124: testing with idle timout 2ms
    serve_test.go:90: conn3 failed to connect after 997.433µs: dial tcp 127.0.0.1:16059: connect: connection refused

watchflakes

gopherbot avatar Nov 04 '22 18:11 gopherbot

Ah, that failure mode is new, at least!

The test failure here isn't because of the connection refused error, but because that error occured when the duration since the last connection is supposed to have gone idle is less than the idle timeout. 🤔

bcmills avatar Nov 04 '22 20:11 bcmills

Change https://go.dev/cl/448096 mentions this issue: internal/jsonrpc2_v2: eliminate a potentially Accept/Dial race in TestIdleTimeout

gopherbot avatar Nov 04 '22 21:11 gopherbot

Found new dashboard test flakes for:

#!watchflakes
post <- pkg == "golang.org/x/tools/internal/jsonrpc2_v2" && `connection refused`
2022-11-09 13:57 openbsd-amd64-68 tools@d41a43b9 go@3a410941 x/tools/internal/jsonrpc2_v2.TestIdleTimeout (log)
--- FAIL: TestIdleTimeout (0.45s)
    serve_test.go:124: testing with idle timout 1ms
    serve_test.go:64: conn1.Call(ctx, "ping", nil): EOF
    serve_test.go:124: testing with idle timout 2ms
    serve_test.go:90: conn3 failed to connect after 785.332µs: dial tcp 127.0.0.1:31208: connect: connection refused

watchflakes

gopherbot avatar Nov 17 '22 16:11 gopherbot

That last flake was just before https://go.dev/cl/448096 landed, so I'm considering this likely to have been fixed by that CL.

bcmills avatar Nov 17 '22 16:11 bcmills