Orphan iOS devices stay on disk after a failed shutdown; `cleanup` doesn't see them
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 18/100
- Issue-Typ
- Bug
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- ios, macos, typescript
- Bereich
- devtools
Rechercherichtung
The failure sits in the shutdown and delete path: the device.purge-failed and device.quarantined events come from the daemon's shutdown step, and the orphan detection is the doctor orphan-device check. Read the lease-end shutdown code, the quarantine retry logic, and how cleanup selects devices, then compare them with the clone/create timeout change referenced in #1563. Done means a quarantined device gets a final forced delete, cleanup removes orphans, and a rejected request deletes its simulator, with tests for each path.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
What happened
On a 16 GB Mac under memory pressure, deleting a simulator at lease end runs simctl shutdown with a 30 s timeout. The daemon log shows it timing out, then the device is quarantined and the reclaim retries fail:
device.purge-failed DriverCrashError: simctl shutdown <udid> timed out after 30000ms
device.quarantined kind: shutdown-failed
quarantine reclaim retry failed (attempts 3)
Some of those simulators stay in ~/.simlock/devices/ios with no row in simlock list. I had three (1.2 to 1.5 GB each), left on 0.7.0. After upgrading to 0.8.0 and restarting the daemon they were still there, and only doctor saw them:
$ simlock --version
0.8.0
$ simlock list # only the one live lease
$ simlock cleanup --dry-run
[]
$ simlock doctor
{"findings":[{"kind":"orphan-device", ... "platform":"ios"}, (x3) ...]}
A handful of these push the disk under the 10 GB pressure line. Two orphans in an earlier batch came from provisions whose requests were then rejected with unresolvable-spec, so a rejected request may also leave its new simulator behind.
This looks like the shutdown/delete side of #1546. #1563 bounded clone/create and deletes a late copy, but the shutdown at lease end still has the fixed 30 s limit, and a daemon restart does not reconcile the orphans.
What I expected
- A quarantined device whose retries are used up gets a last forced
simctl delete. cleanup(or a periodic doctor reconcile) removesorphan-devicefindings.- A rejected request deletes the simulator it created.
How to reproduce
The shutdown timeout only happened under memory pressure (swap about 2.5 GB, pressure "warn"), so that part is intermittent. Once orphans exist, the list / cleanup / doctor check above shows them every time.
Environment
simlock 0.8.0 (orphans created on 0.7.0), macOS 27, iOS 27.2 runtime.
Workaround
simlock doctor --purge-orphans --yes removed all three on 0.8.0 without a daemon restart. A restart alone does not clear them.
Suggested fix
Give the shutdown at lease end the same kind of setting #1563 added for clone/create, and run the orphan reconcile from cleanup or on a timer.
- Vorherrschende Sprache
- TypeScript
- Sterne
- 705
- Forks
- 40
- Ø Merge
- 12 Std. 9 Min.
- Gemergte PRs (30 T.)
- 376
Entwicklungsumgebung
Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus callstackincubator/simlock
-
request:new
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
callstackincubator/simlock#1806 ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug:new
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
callstackincubator/simlock#1780 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
task:draft
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
callstackincubator/simlock#1441 ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug:new
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 45/100
callstackincubator/simlock#1805 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug:new
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 45/100
callstackincubator/simlock#1804 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in callstackincubator/simlock
Ähnliche Issues
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 82/100
Maintainer antworten meist innerhalb von 1 Tag
-
Update project links after the repository renamesEvtl. vergeben @JonathanTSilva hat das heute übernommen. Offenai-generated priority: p2 size: xs type: bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 85/100
JonathanTSilva/jts-website#119 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 74/100
promplate/code-review#158 · 1 Kommentar · 1 Reaktion ·
Maintainer antworten meist innerhalb von 1 Tag
-
[Docs] CONTRIBUTING points the Backend Remake milestone at a branch that does not existEvtl. vergeben @franpts2 hat das heute übernommen. Offendocs
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 90/100
Maintainer antworten meist innerhalb von 3 Tagen