Repository navigation
Description
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
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
- Admission that looks at the host's real memory pressure (Admission ignores the host's real memory pressure: a swapping worker still creates and warm-boots devices #1246).
- Changing
ios.slim.bootTimeoutMs, its meaning or its default. - One shared key for both iOS modes.
- Changing the timeout error's text.
- The other fixed waits: the 30 s per
simctlcall, the slim readback, Android's emulator exit wait at shutdown and delete, Android's snapshot save and power-off. - The boot estimates quoted to waiting requesters.
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.bootTimeoutMsandandroid.bootTimeoutMsset inconfig.jsonchange those deadlines after a daemon restart; a bad value stops the daemon with an error naming the key.simlock config getshows both keys.- The website configuration reference describes both keys; the capacity page points to
ios.full.bootTimeoutMsand the requirements page toandroid.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
- Configurable boot deadlines for full iOS simulators and Android emulators #1315 Configurable boot deadlines for full iOS simulators and Android emulators — an operator on a slow host sets how long a full iOS or an Android boot may take, 300 s by default. Risk: a key that does not reach one of the boots, so that boot keeps failing at the old deadline.
Completion conditions → #1315 delivers all four.
Open work in the same area:
- Admission ignores the host's real memory pressure: a swapping worker still creates and warm-boots devices #1246 (admission and memory pressure) touches capacity, not boot deadlines: no Depends on.
- Warm pool: a baseline kind is learned on its Nth lease in 24 h and warms its newest version #1261 (warm pool baseline learning) changes
config.get's schema and bumps the protocol, as Configurable boot deadlines for full iOS simulators and Android emulators #1315 does; iOS simulator tunnels: forward only to the lease's simulator, reverse on the exact port #1288 (iOS simulator tunnels) changes the sameIosSimctlDriver.createcall, its options type, the iOS manual and the shrink-only line limits; simlock tunnel emulator adb: the caller's own adb sees the remote emulator #1289 raises the samesrc/daemon/main.tsline limit. No Depends on: Configurable boot deadlines for full iOS simulators and Android emulators #1315 goes first, and those tasks, not yet started, take its changes when they rebase (maintainer, 2026-11-05).
Written by an agent.
Activity
V3RON commentedon Nov 5, 2026
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.
feat(config): configurable boot deadlines for full iOS simulators and…
github-actions commentedon Nov 5, 2026
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.V3RON commentedon Nov 5, 2026
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'sdefinition.ts) was done by hand on the maintainer's request and went to the gate without a review.Written by an agent.