fix(copy): keep lifecycle usable after missing source#799
Open
stephenlclarke wants to merge 1 commit into
Open
fix(copy): keep lifecycle usable after missing source#799stephenlclarke wants to merge 1 commit into
stephenlclarke wants to merge 1 commit into
Conversation
Finish copy-out metadata and vsock streams when guest-side validation fails so the task group releases the container state lock. Preserve the original guest error across the coordination race and verify a later exec succeeds on the same container. Fixes: apple/container#1927 Release-Highlight: Fixes apple/container#1927: copying a missing container path now fails promptly without blocking later exec, stop, or delete operations.
3 tasks
|
I believe this PR fixed apple/container#1927. Built Env: macOS 26.5.2, Apple Silicon (M4), Swift 6.3.3 / 6.3-RELEASE toolchains. Results:
Core issue from #1927 (indefinite hang on |
stephenlclarke
added a commit
to stephenlclarke/containerization
that referenced
this pull request
Jul 12, 2026
Tighten the VM regression for apple/container#1927 so a failed copy-out from a missing guest path rejects internal coordination fallback errors before proving the container can exec afterward. Upstream-PR: apple#799 Fixes: apple/container#1927 Release-Highlight: Fixes apple/container#1927: copying a missing container path now fails promptly without blocking later exec, stop, or delete operations.
stephenlclarke
added a commit
to stephenlclarke/container
that referenced
this pull request
Jul 12, 2026
Use stephenlclarke/containerization@79b675d so runtime builds include the apple#1927 missing-source copy-out regression alignment from apple/containerization#799. Upstream-PR: apple/containerization#799 Fixes: apple#1927 Release-Highlight: Fixes apple#1927: missing container copy sources fail promptly without blocking later lifecycle operations.
stephenlclarke
added a commit
to stephenlclarke/container-compose
that referenced
this pull request
Jul 12, 2026
Supports Docker Compose cp - archive streams for stdin-to-service and service-to-stdout copies by staging tar streams through the compose layer and existing Apple path-copy APIs. Pins stephenlclarke/containerization@79b675d so the runtime carries the apple/container#1927 copy lifecycle regression coverage from apple/containerization#799. Upstream scan found no direct Docker Compose copy-stream PR to import; adjacent Apple work reviewed: apple/container#963, apple/containerization#652, apple/container#1832, apple/container#1905. Release-Highlight: Support Docker Compose cp - archive streams for stdin-to-service and service-to-stdout copies; includes apple/container#1927 copy lifecycle fix via apple/containerization#799.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Finish copy-out coordination streams when guest-side source validation fails, preserve the original guest error across the task-group race, and release the container state lock so later lifecycle operations remain usable.
Motivation
apple/container#1927 reports that
container cphangs indefinitely when the guest source path does not exist. The same container then cannot be used byexec,stop,delete, or system shutdown becauseLinuxContainer.copyOutstill owns its state lock.The producer task receives the guest error before emitting metadata or establishing a vsock connection. Its sibling task waits on those asynchronous streams and does not unblock merely because the task group is cancelled. The group therefore cannot unwind. Closing both streams fixes the deadlock, while a small synchronized error state ensures the consumer cannot replace the useful guest error with an internal
no metadataorvsock connection not establishederror.Changes
Validation
notFoundguest-path error, and completes a subsequent exec on the same container.Compatibility
There is no public API or successful-transfer behavior change. Missing guest paths now fail promptly and leave the container usable.
apple/containercan surface the lower-runtime error without adding its own lock or stream cleanup.Related
Release Note Highlight