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
-
难度 2/5 1-3 小时 新手友好度 64/100
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 86/100
-
tests
难度 2/5 1-3 小时 新手友好度 70/100
vfarcic/dot-agent-deck#2512 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 65/100
pop-os/cosmic-applets#1641 ·
维护者通常 3 天内回复
-
难度 2/5 1-3 小时 新手友好度 70/100
pop-os/cosmic-store#650 ·