Skip to content

[Bug]: container cp on nonexistent source path hangs indefinitely; exec/stop on same container then hang too #1927

Description

@wooii

I have done the following

  • 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
  6. 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

- 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

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Fields

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions