os: TestPipeEOF failures with "timed out waiting for read"
bcmills opened this issue · 7 comments
#!watchflakes
post <- pkg == "os" && test == "TestPipeEOF" && `timed out waiting for read`
2019-12-12T13:32:03-c39cd41/darwin-amd64-10_14:
--- FAIL: TestPipeEOF (1.08s)
pipe_test.go:378: line 0
pipe_test.go:378: line 1
pipe_test.go:378: line 2
pipe_test.go:386: timed out waiting for read
FAIL
FAIL os 2.452s
See previously #35275, which had a very similar failure mode but with an additional file already closed
message at the end.
This is the only failure I could find after CL 204800.
2021-02-19T00:05:03-0c63312/darwin-amd64-race
--- FAIL: TestFifoEOF (1.09s)
fifo_test.go:99: line 0
fifo_test.go:99: line 1
fifo_test.go:99: line 2
fifo_test.go:107: timed out waiting for read
FAIL
FAIL os 12.691s
2020-03-14T07:03:15-d774d97/freebsd-arm-paulzhol
--- FAIL: TestFifoEOF (1.04s)
fifo_test.go:100: line 0
fifo_test.go:100: line 1
fifo_test.go:108: timed out waiting for read
fifo_test.go:97: read /tmp/workdir-host-freebsd-arm-paulzhol/tmp/TestFifoEOF145353261/fifo: file already closed
fifo_test.go:86: error closing reader: close /tmp/workdir-host-freebsd-arm-paulzhol/tmp/TestFifoEOF145353261/fifo: file already closed
fifo_test.go:66: error writing to fifo: write /tmp/workdir-host-freebsd-arm-paulzhol/tmp/TestFifoEOF145353261/fifo: broken pipe
FAIL
FAIL os 3.573s
[Edit: Oops, that's a slightly different test name.]
A more thorough history, including a failure in 2021:
greplogs --dashboard -md -l -e 'FAIL: TestPipeEOF .*\n(?: .*\n)* .*: timed out waiting for read'
2021-03-25T19:24:25-569c86d/darwin-amd64-10_14
2020-08-17T14:50:17-7ee2622/solaris-amd64-oraclerel
2020-06-18T20:58:26-a07e281/solaris-amd64-oraclerel
2020-02-07T18:06:58-ff091b5/solaris-amd64-oraclerel
2019-12-12T13:32:03-c39cd41/darwin-amd64-10_14
2019-11-04T10:13:30-1b2ff10/aix-ppc64
2019-11-02T21:51:09-61fa798/aix-ppc64
2019-11-01T00:04:51-4a09a9b/aix-ppc64
2019-10-31T21:47:51-15bff20/windows-amd64-2016
2019-10-31T16:02:25-d5caea7/aix-ppc64
This test has an arbitrary short timeout:
https://cs.opensource.google/go/go/+/master:src/os/pipe_test.go;l=400;drc=9839668b5619f45e293dd40339bf0ac614ea6bee
It also has several moderately long (10ms) sleeps, whose purpose isn't obvious:
https://cs.opensource.google/go/go/+/master:src/os/pipe_test.go;l=368;drc=9839668b5619f45e293dd40339bf0ac614ea6bee
The sleeps come straight from the test case in #24164. I expect it could be written better.
Change https://go.dev/cl/457336 mentions this issue: os: deflake TestPipeEOF
Change https://go.dev/cl/458015 mentions this issue: os: clean up tests