container icon indicating copy to clipboard operation
container copied to clipboard

[Bug]: The CI has a high failure rate

Open dkovba opened this issue 1 year ago • 3 comments

I have done the following

  • [x] I have searched the existing issues
  • [x] If possible, I've reproduced the issue using the 'main' branch of this project

Steps to reproduce

  1. Trigger PR checks.

Current behavior

The failure rate is 20% in multiple builds.

Some of the the failing tests:

  • testRunCommand
  • testRunCommandEnv
  • testRunCommandMemory
  • testRunCommandNoDNS
  • testRunCommandCPUs
  • testRunCommandDNSSearch
  • testRunCommandCidfile
  • Error: internalError: "failed to get a response from apiserver: internalError: "XPC timeout for request to com.apple.container.apiserver/ping""

Examples of test failures:

✘ Test testRunCommand() recorded an issue at TestCLIRunOptions.swift:35:25: Issue recorded
↳ failed to run container .executionFailed("command failed: Error: internalError: \"failed to start container\" (cause: \"interrupted: \"XPC connection error: Connection interrupted\"\")\n")
✘ Test run with 39 tests failed after 465.909 seconds with 1 issue.
make: *** [integration] Error 1
Error: Process completed with exit code 2.
✘ Test testRunCommandCidfile() recorded an issue at TestCLIRunOptions.swift:357:25: Issue recorded
↳ failed to run container .executionFailed("command failed: \u{1B}[33mWarning!\u{1B}[0m Running debug build. Performance may be degraded.\n2025-09-18T22:15:32+0000 error com.apple.container: [ContainerCommands] failed to stop container testruncommandcidfile: internalError: \"failed to stop container\" (cause: \"internalError: \"XPC timeout for request to com.apple.container.apiserver/containerStop\"\")\nError: internalError: \"stop failed for one or more containers testruncommandcidfile\"\n")
✘ Test testRunCommandCidfile() failed after 33.190 seconds with 1 issue.
✘ Suite TestCLIRunCommand failed after 57.427 seconds with 1 issue.
✘ Test run with 20 tests in 1 suite failed after 57.427 seconds with 1 issue.
✘ Test testRunCommandMemory() recorded an issue at TestCLIRunOptions.swift:183:25: Issue recorded
↳ failed to run container .executionFailed("command failed: \u{1B}[33mWarning!\u{1B}[0m Running debug build. Performance may be degraded.\n2025-09-19T02:37:27+0000 error com.apple.container: [ContainerCommands] failed to stop container testruncommandmemory: internalError: \"failed to stop container\" (cause: \"internalError: \"XPC timeout for request to com.apple.container.apiserver/containerStop\"\")\nError: internalError: \"stop failed for one or more containers testruncommandmemory\"\n")
✘ Test testRunCommandCPUs() recorded an issue at TestCLIRunOptions.swift:165:25: Issue recorded
↳ failed to run container .executionFailed("command failed: \u{1B}[33mWarning!\u{1B}[0m Running debug build. Performance may be degraded.\n2025-09-19T02:37:42+0000 error com.apple.container: [ContainerCommands] failed to stop container testruncommandcpus: internalError: \"failed to stop container\" (cause: \"internalError: \"XPC timeout for request to com.apple.container.apiserver/containerStop\"\")\nError: internalError: \"stop failed for one or more containers testruncommandcpus\"\n")
✘ Test testRunCommandMemory() failed after 32.426 seconds with 1 issue.
✘ Test testRunCommandCPUs() failed after 32.426 seconds with 1 issue.
✘ Suite TestCLIRunCommand failed after 55.449 seconds with 2 issues.
✘ Test run with 20 tests in 1 suite failed after 55.449 seconds with 2 issues.

Expected Behavior

The failure rate is 0% in multiple builds.

Environment

Reproducible in CI only.

Code of Conduct

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

dkovba avatar Jun 13 '25 23:06 dkovba

Please also see https://github.com/apple/containerization/issues/124.

dkovba avatar Jun 14 '25 00:06 dkovba

Reproduced in 4 of 20 attempts:

  • https://github.com/apple/container/actions/runs/16329351388/job/46136193100

✘ Test testRunCommandEnv() recorded an issue at TestCLIRunOptions.swift:72:25: Issue recorded ↳ failed to run container .executionFailed("command failed: \u{1B}[33mWarning!\u{1B}[0m Running debug build. Performance may be degraded.\nError: internalError: "stop failed for one or more containers testRunCommandEnv"\n") ✘ Test testRunCommandEnv() failed after 15.080 seconds with 1 issue. ✘ Test testRunCommandMemory() recorded an issue at TestCLIRunOptions.swift:173:25: Issue recorded ↳ failed to run container .executionFailed("command failed: \u{1B}[33mWarning!\u{1B}[0m Running debug build. Performance may be degraded.\nError: internalError: "stop failed for one or more containers testRunCommandMemory"\n") ✘ Test testRunCommandMemory() failed after 15.887 seconds with 1 issue. ✘ Suite TestCLIRunCommand failed after 21.371 seconds with 2 issues. ✘ Test run with 19 tests failed after 21.371 seconds with 2 issues.

  • https://github.com/apple/container/actions/runs/16329351388/job/46212084617

Error: internalError: "failed to get a response from apiserver: internalError: "XPC timeout for request to com.apple.container.apiserver/ping""

  • https://github.com/apple/container/actions/runs/16329351388/job/46217807873

✘ Test testRunCommandNoDNS() recorded an issue at TestCLIRunOptions.swift:343:25: Issue recorded ↳ failed to run container .executionFailed("command failed: \u{1B}[33mWarning!\u{1B}[0m Running debug build. Performance may be degraded.\nError: interrupted: "internalError: "failed to start container" (cause: "interrupted: "XPC connection error: Connection interrupted"")\nEnsure container system service has been started with container system start."\n") ✘ Test testRunCommandCPUs() recorded an issue at TestCLIRunOptions.swift:155:25: Issue recorded ↳ failed to run container .executionFailed("command failed: \u{1B}[33mWarning!\u{1B}[0m Running debug build. Performance may be degraded.\nError: internalError: "stop failed for one or more containers testRunCommandCPUs"\n") ✘ Suite TestCLIRunCommand failed after 25.297 seconds with 2 issues. ✘ Test run with 19 tests failed after 25.297 seconds with 2 issues.

  • https://github.com/apple/container/actions/runs/16329351388/job/46220052740

✘ Test testRunCommandDNSSearch() recorded an issue at TestCLIRunOptions.swift:404:25: Issue recorded ↳ failed to run container .executionFailed("command failed: \u{1B}[33mWarning!\u{1B}[0m Running debug build. Performance may be degraded.\nError: interrupted: "internalError: "failed to start container" (cause: "interrupted: "XPC connection error: Connection interrupted"")\nEnsure container system service has been started with container system start."\n") ✘ Test testRunCommandDNSSearch() failed after 15.395 seconds with 1 issue. ✘ Test testRunCommandNoDNS() recorded an issue at TestCLIRunOptions.swift:343:25: Issue recorded ↳ failed to run container .executionFailed("command failed: \u{1B}[33mWarning!\u{1B}[0m Running debug build. Performance may be degraded.\nError: interrupted: "internalError: "failed to start container" (cause: "interrupted: "XPC connection error: Connection interrupted"")\nEnsure container system service has been started with container system start."\n") ✘ Test testRunCommandNoDNS() failed after 18.572 seconds with 1 issue. ✘ Suite TestCLIRunCommand failed after 27.493 seconds with 2 issues. ✘ Test run with 19 tests failed after 27.493 seconds with 2 issues.

dkovba avatar Jul 16 '25 23:07 dkovba

The remaining issues will be tracked in https://github.com/apple/container/issues/692.

dkovba avatar Sep 30 '25 23:09 dkovba