container icon indicating copy to clipboard operation
container copied to clipboard

[Bug]: Consistent Error Propagation

Open dkovba opened this issue 1 year ago • 1 comments

Created from https://github.com/apple/container/issues/167.

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

Not applicable.

Current behavior

Inconsistent error propagation.

Expected Behavior

Consistent Error Propagation

  • Errors should be properly propagated through the XPC hierarchy
  • Failure states should be clearly communicated to clients
  • Timeouts should be implemented for all operations

Graceful Recovery

  • The system should recover from communication failures
  • Resources should be properly released even when operations fail
  • Failed operations should leave the system in a consistent state

Environment

Not applicable.

Code of Conduct

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

dkovba avatar Jun 27 '25 18:06 dkovba

An example where this is reproducible:

  1. Trigger an error in vminitd, for example, by adding throw ContainerizationError(.internalError, message: "Important error message") to TerminalIO.start().
  2. Run a container using bin/container run -it --rm alpine:latest date.

Results:

Error: interrupted: "internalError: "failed to start container" (cause: "interrupted: "XPC connection error: Connection interrupted"")
Ensure container system service has been started with `container system start`."

dkovba avatar Jul 01 '25 20:07 dkovba