Guest resource drops do not release host-side WASI handles
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 5/5
- 預估耗時
- 一週以上
- 新手友好度
- 35/100
- Issue 類型
- 功能
- 描述清晰度
- 基本清楚
- 活躍度
- 活躍
- 技術堆疊
- rust, wasm
- 領域
- backend, embedded-iot
研究方向
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.
由索引模型根據 Issue 內容生成。
描述
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
- 主要語言
- Rust
- 星號
- 734
- 分支
- 39
- 平均合併
- 3 天 16 小時
- 30 天內合併 PR
- 12
環境準備
在瀏覽器裡用你自己的 GitHub 帳號啟動這個專案的開發容器。
- 沒有 Dockerfile 或 Docker Compose 檔案
- 沒有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
hyperlight-dev/hyperlight-wasm 的其他 Issue
-
lifecycle/needs review
難度 2/5 1-3 小時 新手友好度 66/100
hyperlight-dev/hyperlight-wasm#567 ·
維護者通常 1 天內回覆
-
lifecycle/needs review
難度 3/5 1-2 天 新手友好度 35/100
hyperlight-dev/hyperlight-wasm#583 ·
維護者通常 1 天內回覆
-
kind/enhancement lifecycle/needs review
難度 3/5 半天 新手友好度 45/100
hyperlight-dev/hyperlight-wasm#577 ·
維護者通常 1 天內回覆
-
lifecycle/needs review
難度 4/5 3-5 天 新手友好度 25/100
hyperlight-dev/hyperlight-wasm#573 ·
維護者通常 1 天內回覆
-
lifecycle/needs review
難度 4/5 3-5 天 新手友好度 35/100
hyperlight-dev/hyperlight-wasm#550 ·
維護者通常 1 天內回覆
查看 hyperlight-dev/hyperlight-wasm 的全部 Issue
相似的 Issue
-
bug P2: medium
難度 2/5 1-3 小時 新手友好度 66/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 64/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 75/100
維護者通常 1 天內回覆
-
難度 1/5 1 小時以內 新手友好度 86/100
-
tests
難度 2/5 1-3 小時 新手友好度 70/100
vfarcic/dot-agent-deck#2512 ·
維護者通常 1 天內回覆