[Bug]: `container` daemon hangs when `container cp` from a mounted volume
- 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. Create a named volume:
`container volume create some-vol`
2. Start a temporary container to transfer data:
`container run -d --name temp-importer -v some-vol:/target alpine tail -f /dev/null`
3. Now depending on the src/dst setup the behavior is different.
#### Volume as dst: copy from the host to the mounted volume
`container cp /path/to/host/src temp-importer:/target`
The command didn't seem to have any effects even with `--debug` option.
- No output from CLI
- No files in the `/target` folder of the temp container (except for `lost+found`)
#### Volume as src: copy from the mounted volume to the host
Then I did another test the other away around.
After manually creating a file with `touch /target/hi` in the temp container, I tried to copy from the mounted volume to the host:
`container cp temp-importer:/target/hi /path/to/host/dst`
The command was stuck and the daemon simply became unresponsive afterwards.
### Problem description
I was initially trying to migrate some data from the host to a volume created with `container`, and found out `container cp` didn't work once a mounted volume is involved, either as source or destination.
- no-ops when copying from the host to the mounted volume
- `container` daemon hangs when copying from the mounted volume to the host
### Logs
Can't locate any logs.
```
❯ container system logs --debug
Filtering the log data using "subsystem ==[cd] "com.apple.container""
Timestamp Thread Type Activity PID TTL
--------------------------------------------------------------------------------------------------------------------
Log - Default: 0, Info: 0, Debug: 0, Error: 0, Fault: 0
Activity - Create: 0, Transition: 0, Actions: 0
```
### Environment
```markdown
- OS: macOS 26.5.1 (25F80)
- Xcode: N/A
- Container: Container CLI version 1.0.0
```
### Code of Conduct
- [x] I agree to follow this project's Code of Conduct
Contributor guide
Research direction
Start by reproducing the issue with the listed `container volume create`, `container run`, and `container cp` commands on macOS. Trace the `container cp` entry point for both host-to-volume and volume-to-host cases, then verify that files are transferred and the daemon remains responsive; `container system logs --debug` currently provides no useful output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- backend, cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100