Guest resource drops do not release host-side WASI handles
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Anfängerfreundlichkeit
- 35/100
- Issue-Typ
- Feature
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- rust, wasm
- Bereich
- backend, embedded-iot
Rechercherichtung
Start by reading the component-binding tracking issue hyperlight-dev/hyperlight#810 and the sandbox reproduction in hyperlight-dev/hyperlight-sandbox#250. Trace how guest-owned WASI resources are represented in the generated host resource table and how drops are handled. Done means dropping a guest resource notifies the host and releases its table entry while live guest resources remain usable across executions.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Problem
When a Wasm guest drops a host-owned resource such as a WASI descriptor, stream, or directory-entry stream, hyperlight-wasm does not notify the host that the resource was released. The generated host resource table therefore retains the entry, and host-side implementations cannot safely distinguish closed resources from resources intentionally retained by a stateful guest.
This becomes visible in long-lived sandboxes that preserve state across executions. In hyperlight-dev/hyperlight-sandbox#250, a regression test opened and closed 600 unique output files in one run and another 600 in the next. Without run-boundary cleanup, the second run failed on file 424 when CapFs reached its 1,024 open-handle limit:
OSError: [Errno 29] I/O error: '/output/second-424.txt'
Clearing all host handles at each execution boundary avoids the leak, but it also means a guest file object retained in interpreter memory cannot remain usable across runs. Keeping all handles preserves live objects but leaks every resource the guest has already closed.
Expected behavior
Dropping a guest-owned host resource should notify the host and release or return the corresponding host resource-table entry. Host implementations could then clean up closed descriptors and streams while preserving genuinely live resources across executions.
References
- Upstream component-binding tracking issue: hyperlight-dev/hyperlight#810
- Sandbox behavior and concrete reproduction: hyperlight-dev/hyperlight-sandbox#250
- Vorherrschende Sprache
- Rust
- Sterne
- 734
- Forks
- 39
- Ø Merge
- 3 T. 16 Std.
- Gemergte PRs (30 T.)
- 12
Entwicklungsumgebung
Startet den Dev-Container des Projekts im Browser, mit Ihrem eigenen GitHub-Konto.
- Kein Dockerfile und keine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Beitragsleitfaden lesen
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 hyperlight-dev/hyperlight-wasm
-
lifecycle/needs review
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 66/100
hyperlight-dev/hyperlight-wasm#567 ·
Maintainer antworten meist innerhalb von 1 Tag
-
lifecycle/needs review
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 35/100
hyperlight-dev/hyperlight-wasm#583 ·
Maintainer antworten meist innerhalb von 1 Tag
-
kind/enhancement lifecycle/needs review
Schwierigkeit 3/5 Ein halber Tag Anfängerfreundlichkeit 45/100
hyperlight-dev/hyperlight-wasm#577 ·
Maintainer antworten meist innerhalb von 1 Tag
-
lifecycle/needs review
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 25/100
hyperlight-dev/hyperlight-wasm#573 ·
Maintainer antworten meist innerhalb von 1 Tag
-
lifecycle/needs review
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 35/100
hyperlight-dev/hyperlight-wasm#550 ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in hyperlight-dev/hyperlight-wasm
Ähnliche Issues
-
bug P2: medium
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 66/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 64/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 86/100
-
tests
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
vfarcic/dot-agent-deck#2512 ·
Maintainer antworten meist innerhalb von 1 Tag