[Darwin] Read() does not always return when closing the reader
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 38/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- go
- Domain
- operating-systems
Research direction
Start with TestFifoCloseWhileReadingAndWriting in fifo_test.go and run make test on macOS and Linux to reproduce the difference. Trace the FIFO reader close and pending Read behavior when a writer is open; done means the test consistently returns the expected error after closing the reader on both platforms.
Written by the indexing model from the issue text.
Description
I'm seeing different behaviours on MacOS and Linux, when closing a reader.
When running make test with https://github.com/containerd/fifo/pull/42 applied, the TestFifoCloseWhileReadingAndWriting fails on MacOS but passes on Linux.
On MacOS, I'm seeing that if I open a writer on a FIFO, closing the reader won't unblock a pending Read() and a Write() from the writer will be received by the reader (After we close the reader):
=== RUN TestFifoCloseWhileReadingAndWriting
fifo_test.go:437:
Error Trace: fifo_test.go:437
Error: An error is expected but got nil.
Test: TestFifoCloseWhileReadingAndWriting
fifo_test.go:441: Read should not succeed
If there are no writers for the FIFO, closing the reader works as expected on both Linux and MacOS, i.e. the pending Read() returns the expected error (ErrReadClosed).
- Dominant language
- Go
- Stars
- 87
- Forks
- 33
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from containerd/fifo
-
Difficulty 2/5 1-3 hours Newbie friendliness 50/100
containerd/fifo#67 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 42/100
containerd/fifo#56 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
containerd/fifo#18 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
containerd/fifo#5 · 1 comment ·
Similar issues
-
P3 tech debt
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
Maintainers usually reply within 1 day
-
kind/feature needs-triage priority/unprioritized
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
NVIDIA/k8s-test-infra#1504 ·
Maintainers usually reply within 1 day
-
Area/Infrastructure Aspect/Infra Resources Type/Bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
wso2/agent-manager#2717 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
open-policy-agent/opa#9685 · 1 comment ·
Maintainers usually reply within 1 day