#!watchflakes
post <- goos ~ `darwin|ios` && goarch == "arm64" && pkg == "net" && test == "TestCloseWrite"

greplogs --dashboard -md -l -e '(?m)FAIL: TestCloseWrite/.*\n(\s+.*\n)*.*i/o timeout'

2021-11-03T21:45:33-d3f5dd5/darwin-arm64-11_0-toothrot 2020-10-20T17:52:41-90c924f/ios-arm64-corellium 2020-09-28T21:30:01-af18bce/linux-mips64le-mengzhuo 2020-09-07T02:46:24-1a119ed/darwin-arm64-corellium 2020-08-26T16:15:32-6382809/darwin-arm64-corellium 2020-08-18T15:50:52-b58d297/darwin-arm64-corellium 2020-05-01T19:55:48-30f8074/darwin-arm64-corellium 2020-04-13T21:56:15-1b15c7f/darwin-arm64-corellium

See previously #34837.

Comment From: bcmills

Still ongoing (but rare) on darwin/arm64.

greplogs -l -e '(?m)FAIL: TestCloseWrite/.*\n(\s+.*\n)*.*i/o timeout' --since=2021-11-04 2022-06-14T21:55:52-cb9bf93/darwin-arm64-11 2021-11-05T00:52:09-bd580a0/darwin-arm64-11_0-toothrot

(attn @neild, @ianlancetaylor)

Comment From: neild

I wonder if this is a variation on #37795?

Comment From: neild

The mips64le failure above has "too many open files" in the log, and is likely unrelated. I'll bet this is the same macOS bug as #37795. If it is, a similar workaround might work--add a small delay so that we don't close (or CloseWrite) a socket while reading from it.

Comment From: bcmills

Seems worth a shot, at least! (We can always try it, and reopen the issue if it turns out not to be the right workaround.)

Comment From: gopherbot

Change https://go.dev/cl/414534 mentions this issue: net: avoid darwin/arm64 platform bug in TestCloseWrite

Comment From: bcmills

Sent https://go.dev/cl/414534 with a port of the workaround from #37795, prompted by another failure on the dashboard.

greplogs -l -e '(?m)FAIL: TestCloseWrite/.*\n(\s+.*\n)*.*i/o timeout' --since=2022-06-15 2022-06-26T00:21:33-666d736/darwin-arm64-12

Comment From: heschi

Unless I'm misunderstanding something, this recurred on 6/29: 2022-06-29T22:28:30-b2cc0fe/darwin-arm64-11

Comment From: bcmills

watchflakes found another in #57589. Added a pattern for this issue.

Comment From: gopherbot

Found new dashboard test flakes for:

#!watchflakes
post <- goos ~ `darwin|ios` && goarch == "arm64" && pkg == "net" && test == "TestCloseWrite"
2023-02-10 17:30 darwin-arm64-12 go@f69dbb6d net.TestCloseWrite (log) --- FAIL: TestCloseWrite (0.00s) --- FAIL: TestCloseWrite/unix (159.80s) net_test.go:176: got (0, read unix ->/tmp/buildlet/tmp/4113395035/sock: i/o timeout); want (0, io.EOF) net_test.go:119: got (0, read unix /tmp/buildlet/tmp/4113395035/sock->: i/o timeout); want (0, io.EOF)

watchflakes

Comment From: bcmills

(Note that the above failure was on release-branch.go1.19.)

Comment From: neild

If this is indeed #37795, then I believe we should stop seeing this on more recent Darwin versions. (macOS 13 and higher? Not sure which version has the fix.)

Comment From: gopherbot

Found new dashboard test flakes for:

#!watchflakes
post <- goos ~ `darwin|ios` && goarch == "arm64" && pkg == "net" && test == "TestCloseWrite"
2023-05-16 19:46 darwin-arm64-12 go@b3d1cce3 net.TestCloseWrite (log) --- FAIL: TestCloseWrite (0.00s) --- FAIL: TestCloseWrite/tcp (159.74s) net_test.go:119: got (0, read tcp4 127.0.0.1:55818->127.0.0.1:55819: i/o timeout); want (0, io.EOF) net_test.go:176: got (0, read tcp 127.0.0.1:55819->127.0.0.1:55818: i/o timeout); want (0, io.EOF)

watchflakes

Comment From: gopherbot

Found new dashboard test flakes for:

#!watchflakes
post <- goos ~ `darwin|ios` && goarch == "arm64" && pkg == "net" && test == "TestCloseWrite"
2023-05-19 22:45 darwin-arm64-12 go@fe786638 net.TestCloseWrite (log) --- FAIL: TestCloseWrite (0.00s) --- FAIL: TestCloseWrite/unix (159.70s) net_test.go:176: got (0, read unix ->/tmp/buildlet/tmp/330333358/sock: i/o timeout); want (0, io.EOF) net_test.go:119: got (0, read unix /tmp/buildlet/tmp/330333358/sock->: i/o timeout); want (0, io.EOF)

watchflakes

Comment From: gopherbot

Found new dashboard test flakes for:

#!watchflakes
post <- goos ~ `darwin|ios` && goarch == "arm64" && pkg == "net" && test == "TestCloseWrite"
2023-10-13 17:10 darwin-arm64-12 go@6dd7462a net.TestCloseWrite (log) --- FAIL: TestCloseWrite (0.00s) --- FAIL: TestCloseWrite/tcp (159.96s) net_test.go:174: got (0, read tcp 127.0.0.1:54752->127.0.0.1:54750: i/o timeout); want (0, io.EOF) net_test.go:117: got (0, read tcp4 127.0.0.1:54750->127.0.0.1:54752: i/o timeout); want (0, io.EOF)

watchflakes

Comment From: gopherbot

Found new dashboard test flakes for:

#!watchflakes
post <- goos ~ `darwin|ios` && goarch == "arm64" && pkg == "net" && test == "TestCloseWrite"
2024-03-28 21:12 darwin-arm64-11 go@4edf4bb2 net.TestCloseWrite (log) --- FAIL: TestCloseWrite (0.00s) --- FAIL: TestCloseWrite/unix (159.49s) net_test.go:117: got (0, read unix /tmp/buildlet/tmp/1591061272/sock->: i/o timeout); want (0, io.EOF) net_test.go:174: got (0, read unix ->/tmp/buildlet/tmp/1591061272/sock: i/o timeout); want (0, io.EOF)

watchflakes

Comment From: gopherbot

Found new dashboard test flakes for:

#!watchflakes
post <- goos ~ `darwin|ios` && goarch == "arm64" && pkg == "net" && test == "TestCloseWrite"
2024-04-15 17:26 darwin-arm64-12 go@55e4097c net.TestCloseWrite (log) --- FAIL: TestCloseWrite (0.00s) --- FAIL: TestCloseWrite/unix (159.63s) net_test.go:174: got (0, read unix ->/tmp/buildlet/tmp/323781204/sock: i/o timeout); want (0, io.EOF) net_test.go:117: got (0, read unix /tmp/buildlet/tmp/323781204/sock->: i/o timeout); want (0, io.EOF)

watchflakes

Comment From: gopherbot

Change https://go.dev/cl/671457 mentions this issue: net: avoid windows hand in TestCloseWrite