golang/go

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.

CC @ianlancetaylor

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.]

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