calling create without file stdio blocks
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 30/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- go
- Domain
- operating-systems
Research direction
Start by reading the Create() path, CreateOpt, monitor.Wait(), and the IO interface, then compare their behavior with os/exec Cmd.Wait() and Process.Wait(). Determine which cleanup approach fits the existing interfaces; done means Create no longer blocks indefinitely on forwarded stdio while avoiding leaked goroutines.
Written by the indexing model from the issue text.
Description
os/exec allows 2 ways to wait on command: Cmd.Wait() makes sure all the goroutines that can be created by Cmd.Start() are cleaned up and doesn't return before stdio is closed. Process.Wait() returns after the process has exited but leaks goroutines. Previously monitor.Wait() in this package waited only for process but was changed to fix those leaks.
Problem is that there is one command Create() that by design takes stdio, forwards it to its children and then exits itself. That means that Cmd.Wait() does not return because the attach stdio has not finished. In containerd this does not appear because the interfaces passed in are always regular files(fifos) and don't create extra goroutines in os/exec internals.
I'd recommend either changing CreateOpt to take *io.File or implementing pipe copy in this library so it can be cleaned up outside of stdlib(that would probably mean adding a cleanup function to the IO interface).
@crosbymichael
- Dominant language
- Go
- Stars
- 177
- Forks
- 84
- 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/go-runc
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
containerd/go-runc#110 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 25/100
containerd/go-runc#94 · 3 comments ·
-
Add more statsOpen
Difficulty 4/5 3-5 days Newbie friendliness 30/100
containerd/go-runc#85 ·
-
Enable passing the --auto-dedup flagPossibly taken @austinvazquez claimed this 1131 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
containerd/go-runc#73 · 1 comment ·
-
Support for msec time interval in EventsPossibly taken @austinvazquez claimed this 1131 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 35/100
containerd/go-runc#53 ·
All issues in containerd/go-runc
Similar issues
-
ready-for-agent
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
jordansmall/spindrift#7895 ·
Maintainers usually reply within 1 day
-
documentation priority: medium skill: intermediate status: ready for dev
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
hyperledger-labs/fabric-smart-client#2830 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
Maintainers usually reply within 1 day
-
P3 tech debt
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day