iOS seed is shut down right after bootstatus, so every clone repeats iOS's first-boot work

Aperta
#1,540 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
typescript
Ambito
devtools, mobile

Direzione di ricerca

Start with src/drivers/ios/index.ts and read #makeSeed, #bootAndWait, and #shutdown to trace the seed lifecycle; related issue #1202 may provide context. The issue suggests waiting for the simulator to settle, but leaves the completion signal or configurable delay to decide. Done when seed creation preserves the first-boot work so later clones avoid repeating the reported load spike.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug:new
What happened

Every fresh lease of an iPhone Duo simulator (iOS 27.3) spent about 5 minutes in iOS first-boot work
after the clone booted. Poster extensions, BackgroundShortcutRunner, CommCenter and other first-boot
daemons were running, and the host load average reached 200-400 (Apple silicon, 16 GB).

During that window:

  • opening Safari took 35-55 s;
  • the first XCUITest snapshot exceeded a 90 s client timeout.
What you expected

A clone of a ready seed should boot into a settled system.

How to reproduce
  1. Let simlock make a new iOS seed for a model.
  2. Lease that model and watch the host load for the first minutes after boot.
  3. Lease it again: every new lease repeats the spike.
Environment

simlock 0.7.0 (main at ee19e97 has the same code), macOS 27.3 arm64, Xcode 27.3, iOS 27.3 runtime.

Logs and evidence

src/drivers/ios/index.ts #makeSeed runs #bootAndWait (bootstatus) and then #shutdown straight
away. bootstatus returns before iOS finishes its first-boot work, so the seed never stores that work, and
each clone does it again.

The workaround we measured:

  1. Boot the seed once in the sources set.
  2. Wait about 8 minutes, until host load is back near idle (about 2.5).
  3. Launch and quit Safari once.
  4. Shut the seed down. It grew from 2.0 to 2.6 GB.

Cold leases from that seed:

  • opening Safari took 8.6-16.6 s;
  • the first snapshot took 3.9-8.75 s;
  • later snapshots took under 1 s;
  • the first-boot spike was gone.

Suggestion: let the seed settle before #shutdown. Settled could mean simulator CPU low for a while, or
a configurable delay such as drivers.ios.seedSettleMs. It costs minutes once per seed rather than once
per lease. Related: #1202.

Lingua principale
TypeScript
Stelle
705
Fork
40
Merge medio
12h 9m
PR unite (30g)
376

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di callstackincubator/simlock

Tutte le issue di callstackincubator/simlock

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.