Skip to content

[Bug]: help/default commands can hang when apiserver launchd state is wedged #1459

Closed

Description

@chrisgeo

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

No deterministic setup is currently known.

This issue tracks a conditional failure mode: systems where com.apple.container.apiserver is registered with launchd but does not answer XPC requests, such as dead, wedged, or stale launchd/XPC states reported in related apiserver hang issues (#1329, #798, #621).

In that state, the pre-fix help/default command paths can block before printing help because they initialize plugin loading, which calls ClientHealthCheck.ping() and waits on the apiserver:

container --help
container help
container

A healthy apiserver setup is expected not to reproduce this. For example, the maintainer check in #1455 ran make all and then timed the three commands above; all returned quickly. That result is consistent with this issue being specific to stale/wedged apiserver state rather than normal help rendering.

Problem description

Help and default command rendering should not require the API server to be reachable. These paths should be able to print local CLI help even when com.apple.container.apiserver is unavailable, stale-registered, or wedged.

Current pre-fix behavior: help/default paths can reach Application.createPluginLoader(), which calls ClientHealthCheck.ping() to fetch roots from the apiserver before printing help. If the apiserver is in a state where the XPC reply never arrives, the command can block rather than showing help.

Expected behavior: container --help, container help, and container should print the base help text without requiring an apiserver XPC round trip.

Observed recovery in related stale-apiserver cases has involved launchctl bootout ..., but that is a recovery/cleanup action, not a reliable reproduction step for this issue.

Environment

Additional context

#1455 proposes a defensive fix: skip API-server/plugin loading for help/default help rendering, and make idempotent XPC sends return on non-firing replies instead of being trapped by structured-concurrency TaskGroup cleanup.

The issue is intentionally scoped to help/default command robustness. It does not claim to fix every apiserver startup/stop hang reported in #1329, #798, or #621.

Code of Conduct

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

Activity

  1. chrisgeo commented on May 14, 2026

    @chrisgeo
    ContributorAuthor

    No longer seeing this recently; will try to reproduce if it continue to happen.

    Closing for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions