Skip to content

Configurable boot deadline for full iOS simulators #1311

Closed
1 of 1 issue completed
Closed

Description

@V3RON

Request: #1248

Problem

In the reporter's words: "On a 16 GiB, 10-core Mac (macOS 26.4.1, Xcode 26.6, iOS 26.5 runtime, simlock 0.5.0), every new full-mode iPhone 17 simulator failed with BootTimeoutError: Timed out waiting for device to boot for about two hours: lease requests through the gateway and the warm pool alike (warm pool target is short ... boot-failed), with 14+ devices created and deleted. A plain xcrun simctl boot + bootstatus -b of a fresh iPhone 17 on the same Mac took 241 s (load average 360 while the warm pool was booting another device at the same time)."

A full iOS simulator gets a fixed 120 s boot deadline that no setting changes; only a slim one reads a setting (ios.slim.bootTimeoutMs). An Android emulator has the same problem: a fixed 180 s boot deadline.

Who it is for

An operator running a worker on a slow or busy Mac (little RAM, builds and other work beside Simlock), where a healthy device takes longer to boot than Simlock waits.

Outcome

  • Every boot of a full iOS simulator waits ios.full.bootTimeoutMs, 300 s unless set. That covers a full lease, a slim request Simlock serves full (runtime below iOS 18.5), every recovery boot (slim or full), and the first boot of a new seed.
  • Every boot of an Android emulator waits android.bootTimeoutMs, 300 s unless set.
  • Out of the box, a boot that takes 241 s, as reported, succeeds on both platforms.
  • An operator on a slower host raises the key and the next boot uses it after a daemon restart.

How it works for the user

flowchart TD
  A[Lease request or warm pool needs a device] --> B[Simlock boots a simulator or emulator]
  B --> C{Ready within the boot deadline?}
  C -- yes --> D[Device granted or kept warm]
  C -- no --> E[Boot fails: device deleted, warm pool says boot-failed, request retries]
  E --> F[Operator raises ios.full.bootTimeoutMs or android.bootTimeoutMs]
  F --> G[daemon stop, then daemon start]
  G --> B
Loading

Before, on a busy Mac where a boot takes 241 s:

$ simlock lease --platform ios --model "iPhone 17"
error: Timed out waiting for device to boot: <device id>

After, with the defaults, the same command is granted a device once the boot ends (241 s is inside 300 s).

On a host slower still:

$ simlock config set ios.full.bootTimeoutMs 600000
Updated ios.full.bootTimeoutMs in <config path>; takes effect on daemon restart.
$ simlock daemon stop
$ simlock daemon start

Examples

Config Boot Today's deadline After
nothing set full iOS lease 120 s 300 s
nothing set slim lease, iOS 26.5 runtime 600 s 600 s (ios.slim.bootTimeoutMs, unchanged)
nothing set slim lease, iOS 18.4 runtime (served full) 120 s 300 s
nothing set recovery boot of a slim device 120 s 300 s
nothing set first boot of a new iOS seed 120 s 300 s
ios.full.bootTimeoutMs: 400000 full iOS lease 120 s 400 s
nothing set Android lease, recovery, seed boot 180 s 300 s
android.bootTimeoutMs: 600000 Android boot 180 s 600 s
android.bootTimeoutMs: 600000 Android emulator that will not exit at shutdown SIGKILL after 180 s SIGKILL after 180 s
ios.full.bootTimeoutMs: 0, -1 or "300000" daemon start (key unknown: warned, ignored) refused, naming the key

What could go wrong

  • A boot that really hangs now takes 5 minutes to fail instead of 2 (iOS) or 3 (Android), so a broken host retries more slowly. Likely, and the price of the fix.
  • A cold lease that makes a new seed and then boots its copy can take up to two deadlines (10 minutes by default), past the gateway's 5-minute lease request wait. A slim lease can already do this today.
  • A raised Android deadline must not make Simlock throw away a seed it is still making. Unlikely once built as specified.

Words used

  • boot deadline: how long Simlock waits for one boot to finish before it gives up, e.g. 300 s for a full iPhone 17.
  • full device: an iOS simulator with every system service on; the opposite of slim, e.g. simlock lease --mode full.
  • slim device: an iOS 18.5+ simulator with groups of system services turned off (ios.slim.categories).
  • seed: the shut-down device Simlock boots once per model and OS and copies into every new device of that kind.
  • recovery boot: the reboot of a crashed device under its lease, by the health monitor.

Non-goals

Completion conditions

  • With no setting, a full iOS boot, an iOS seed boot and an Android boot each wait 300 s before giving up (test on main).
  • ios.full.bootTimeoutMs and android.bootTimeoutMs set in config.json change those deadlines after a daemon restart; a bad value stops the daemon with an error naming the key.
  • simlock config get shows both keys.
  • The website configuration reference describes both keys; the capacity page points to ios.full.bootTimeoutMs and the requirements page to android.bootTimeoutMs.

Open questions

none

Decisions

No ADR: the feature is one task and adds two config keys beside an existing one of the same kind.

Shared values

none

Behaviours

Behaviour (invoker, action, what it sees) Seam Cases Task
An operator's full iOS boot waits ios.full.bootTimeoutMs, then fails with BootTimeoutError IosSimctlDriver.makeReady prepare full; prepare slim on an iOS 18.4 runtime; recover full; recover slim; prepare slim on iOS 18.5 keeps ios.slim.bootTimeoutMs; key unset (300 s) and set (400 s) #1315
A provision that makes a new iOS seed boots the seed within ios.full.bootTimeoutMs IosSimctlDriver.provision key unset (300 s); key set (400 s) #1315
An Android boot waits android.bootTimeoutMs, then fails with BootTimeoutError AndroidDriver.makeReady, AndroidDriver.provision prepare from the snapshot; recover; a seed's two cold boots; a second makeReady while the device still boots; key unset (300 s) and set (600 s) #1315
An Android shutdown or delete waits 180 s for the emulator to exit, whatever android.bootTimeoutMs is AndroidDriver.shutdown, AndroidDriver.destroy key 600 s, emulator never exits #1315
An Android seed still being made is kept by a source listing while its two boots may still run AndroidDriver.listSources android.bootTimeoutMs 600 s, listing 1000 s into the make: kept; listing past the larger of 900 s and twice android.bootTimeoutMs plus 600 s: removed #1315
An operator's config sets the two keys, or leaves them out loadConfig both unset (300000 each); both set; 0, -1, "300000" each refused naming the key #1315
An admin reads the config and sees both keys Dispatcher config.get defaults; set values #1315
A worker starts its drivers with the two keys from its config discoverDrivers iOS key set; Android key set #1315

Tasks

Completion conditions → #1315 delivers all four.

Open work in the same area:

Written by an agent.

Sub-issues

Sub-issues

1 of 1 Issues completed
Loading 1 sub-issues

Activity

  1. added
    feature:spec
    on Nov 5, 2026
  2. added
    feature:planned
    and removed
    feature:spec
    on Nov 5, 2026
  3. V3RON commented on Nov 5, 2026

    @V3RON
    ContributorAuthor

    Spec updated: added Who it is for through Tasks; one task, #1315 (ios.full.bootTimeoutMs, android.bootTimeoutMs), checked ready and approved.

    Written by an agent.

  4. github-actions commented on Nov 5, 2026

    @github-actions
    Contributor

    Closing: all 1 sub-issues are closed. The PR that closed the last one walks the completion conditions (delivery rule 9); reopen this if one does not hold on main. Flip its ADRs to Accepted if delivery has not.

  5. V3RON commented on Nov 5, 2026

    @V3RON
    ContributorAuthor

    Delivery run

    Merged: #1321 (#1315)
    Parked: none
    Waiting: none
    Decided: none

    The final merge of main (c8149a5, after #1324 moved driver keys into each driver's definition.ts) was done by hand on the maintainer's request and went to the gate without a review.

    Written by an agent.

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

    feature:planned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions