Skip to content

swm-macos-runner: worst-case shutdown can exceed ExitTimeOut (330 s > 300 s) #312

Backlog

Description

@smartwatermelon-agent

The macOS runner supervisor's worst-case shutdown can run past the LaunchAgent's ExitTimeOut of 300 s. launchd then sends SIGKILL, and teardown can stop part-way (a VM left running or not deleted).

Worst case, found while writing the idle-max change (#311):

  • A SIGTERM arrives during a bounded_check. The check runs to its end first: a token mint (up to 30 s), then the runner DELETE (up to 30 s).
  • Teardown follows: tart stop 60 s, wait_run 60 s, tart delete 120 s, and a runner DELETE of 30 s if the check's DELETE failed.
  • Total: about 330 s.

The plist comment says 230 s. It counts neither the in-flight check nor wait_run.

The same window exists on main today on the update-pending path (aaf8d98). #311 adds a second path into the same check.

Possible fixes: raise ExitTimeOut, or cut the in-flight check short on SIGTERM. Which fits better needs checking against how the NOS supervisor handles the same case.

Activity

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