[Bug]: container cp on nonexistent source path hangs indefinitely; exec/stop on same container then hang too
- Dominant language
- Swift
- Stars
- 49.9k
- Forks
- 1.8k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 22
Description
### I have done the following
- [x] I have searched the existing issues
- [ ] If possible, I've reproduced the issue using the 'main' branch of this project
### Steps to reproduce
1. container run -it --name test ubuntu:latest bash
2. container cp test:/existing/file.txt ~/local/file.txt
→ works fine, returns fast
3. container cp test:/path/that/does/not/exist ~/local/foo.txt
→ hangs indefinitely, no error, no timeout
4. Ctrl-C to abort
5. container stop test
→ also hangs indefinitely
5. container system stop
→ also hangs indefinitely
Only recovery found: restart macos.
### Problem description
`container cp` on a source path that doesn't exist inside the container hangs
forever instead of returning an error immediately. Worse, once this happens every subsequent
command against that same container — exec -it, stop, system stop — also
hangs indefinitely.
Expected behavior:
- cp on a missing path should fail fast with a clear "no such file or
directory" error.
- Even if a single operation does hang, it should not take down the whole
container's control channel — stop should still work, or at minimum
should time out with a clear error rather than hanging forever.
Actual behavior:
- cp hangs with no timeout.
- exec and stop on the same container then hang too.
- Only way to recover is restart macos.
### Environment
```markdown
- OS: macOS 26.5.2 (Tahoe)
- Hardware: Apple Silicon (M4)
- Container: Container CLI version 1.1.0 (installed via Homebrew)
- Image: docker.io/library/ubuntu:latest (Ubuntu 26.04 LTS, arm64)
```
### Code of Conduct
- [x] I agree to follow this project's Code of Conduct
Contributor guide
Research direction
Start with the reported container run and container cp steps using the nonexistent source path, then observe whether container exec, container stop, and container system stop remain blocked. Trace the container cp control path and its effect on later commands; done means cp returns a clear missing-path error and subsequent stop operations complete or report a timeout.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100