You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: container daemon hangs when container cp from a mounted volume #1873
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
This is a known limitation — container cp doesn't handle Virtualization.framework's filesystem passthrough reliably for mounted volumes. Until it's fixed, the workaround is to use container exec with a direct copy command inside the container:
container exec <container-name> cp -a /mounted/path/file /destination/
For migrating data into a new container, you can also use a shared bind mount as an intermediate: mount the same host directory in both containers, then copy from within. Full migration guide covering this and other gotchas: https://maccontainer.dev/compose-alternative/
Additional data point: still reproducible on 1.5.0, also affects bind mounts (virtiofs), and the data silently lands in the rootfs layer underneath the mountpoint.
Reproduced on container CLI 1.5.0 (brew), macOS 27.0.1 arm64, alpine:latest.
container volume create v1
container run -d --name b -v v1:/dane alpine sleep infinity
echo HELLO > plik.txt
container cp plik.txt b:/dane/plik.txt ; echo $? # 0
container exec b cat /dane/plik.txt # No such file or directory
container exec b mount | grep dane # /dev/vdc on /dane type ext4
container exec b sh -c 'echo X > /dane/inside.txt'
container cp b:/dane/inside.txt ./out.txt # Error ... notFound: copy: path not found '/dane/inside.txt'
container stop b && container export -o b.tar b && tar tf b.tar | grep dane
# dane/ dane/plik.txt <- the file is in the rootfs layer under the mountpoint
Same with -v /host/dir:/dane (virtiofs): cp returns 0, file absent in the container and on the host, but present in container export output.
Control: container cp plik.txt b:/tmp/plik.txt works. tar -c plik.txt | container exec -i b tar -x -C /dane works.
Expected: cp resolves the path as the running container sees it (through mounts), or fails with a non-zero exit code.
Actual: exit 0 and data silently lands in the masked rootfs directory; copy out of mounted paths fails with notFound (on 1.5.0 the daemon no longer hangs).
Activity
Jakeshadow commentedon Jul 1, 2026
This is a known limitation —
container cpdoesn't handle Virtualization.framework's filesystem passthrough reliably for mounted volumes. Until it's fixed, the workaround is to usecontainer execwith a direct copy command inside the container:For migrating data into a new container, you can also use a shared bind mount as an intermediate: mount the same host directory in both containers, then copy from within. Full migration guide covering this and other gotchas: https://maccontainer.dev/compose-alternative/
magnimodi commentedon Oct 13, 2026
Additional data point: still reproducible on 1.5.0, also affects bind mounts (virtiofs), and the data silently lands in the rootfs layer underneath the mountpoint.
Reproduced on container CLI 1.5.0 (brew), macOS 27.0.1 arm64, alpine:latest.
Same with
-v /host/dir:/dane(virtiofs): cp returns 0, file absent in the container and on the host, but present incontainer exportoutput.Control:
container cp plik.txt b:/tmp/plik.txtworks.tar -c plik.txt | container exec -i b tar -x -C /daneworks.Expected: cp resolves the path as the running container sees it (through mounts), or fails with a non-zero exit code.
Actual: exit 0 and data silently lands in the masked rootfs directory; copy out of mounted paths fails with notFound (on 1.5.0 the daemon no longer hangs).
Log: only
copyIn xpc handler [uuid=b], no error.Stream file transfers on mounted paths through exec (#27) (#32)