Bound the signal transport drain by signal count, not file size
维护者通常 2 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 51/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- c
调研方向
Start in src/syscall/proc.c at drain_signal_transport and read the review discussion linked from #505 for context. Trace how the transport file is read under flock and how drained records are handled after unlocking. Done when standard signals are collapsed to at most one pending record each, while real-time signals and reparent records remain individually handled, without memory use scaling with the transport file size.
由索引模型根据 Issue 内容生成。
描述
Follow-up from #505 (review comment https://github.com/sysprog21/elfuse/pull/505#discussion_r4526279782).
drain_signal_transport in src/syscall/proc.c reads the whole transport file into one malloc(st_size) buffer while holding the file's flock. Another guest process can keep appending records to a stopped process's transport, and each record is one line, so the file and that single allocation can grow without limit. When malloc fails, the drain keeps the records and sets the drain flag again, so every vCPU exit retries the same allocation.
Standard signals (1 to 31) merge while pending, so a drain needs at most one record per standard signal. Real-time signals and reparent ("R") records are different: each one is handled separately. Proposed: while holding the flock, read the file in fixed-size chunks and collapse duplicate standard-signal records into a pending set. Then handle the set and the remaining records after the flock is released, as the drain does today. The memory a drain uses would then grow with the number of real-time and reparent records, not with the file size.
- 主要语言
- C
- 星标
- 287
- 派生
- 33
- 平均合并
- 2 天 17 小时
- 30 天内合并 PR
- 18
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
sysprog21/elfuse 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 64/100
维护者通常 2 天内回复
-
难度 1/5 1 小时以内 新手友好度 80/100
维护者通常 2 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 86/100
维护者通常 2 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 2 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 75/100
维护者通常 2 天内回复
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 70/100
libreswan/libreswan#3185 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 70/100
-
category:port-update
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 2 天内回复
-
llvm:instcombine
难度 2/5 1-3 小时 新手友好度 64/100
llvm/llvm-project#246503 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 85/100
维护者通常 1 天内回复