sys_epoll_wait/sys_epoll_pwait2 drop syscalls when 4 FDs ready for operation
维护者通常 2 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 62/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- c, linux
调研方向
错误位于 src/preload/syscallbuf.c 的系统调用缓冲预加载代码中,大约第 2827-2828 行,那里将 epoll_wait 调用的返回值与 EINTR 进行比较。请在 sys_epoll_pwait2 处理程序中检查同样的模式。阅读链接的 man 手册中关于返回值的章节,然后通过录制一个获得四个就绪文件描述符的程序来确认修复,并检查没有系统调用丢失。当返回值检查测试的是 -1 和 errno,而不是返回值本身时,即完成。
由索引模型根据 Issue 内容生成。
描述
per https://www.man7.org/linux/man-pages/man2/epoll_wait.2.html
On success, epoll_wait() returns the number of file descriptors
ready for the requested I/O operation, or zero if no file
descriptor became ready during the requested timeout milliseconds.
On failure, epoll_wait() returns -1 and errno is set to indicate
the error.
https://github.com/rr-debugger/rr/blob/master/src/preload/syscallbuf.c#L2827-L2828 (and corresponding code for sys_epoll_pwait2) check the return value of the syscall against EINTR (defined to be 4). This is a bug, and drops syscalls when using rr recording.
Instead, ret should be checked against -1, and errno against EINTR.
Thanks to my AI for finding this bug 😅
- 主要语言
- C++
- 星标
- 10.7k
- 派生
- 666
- 平均合并
- 1 天 21 小时
- 30 天内合并 PR
- 31
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
rr-debugger/rr 的其他 Issue
-
难度 3/5 1-2 天 新手友好度 55/100
rr-debugger/rr#4152 ·
维护者通常 2 天内回复
-
难度 3/5 1-2 天 新手友好度 52/100
rr-debugger/rr#4146 ·
维护者通常 2 天内回复
-
难度 4/5 3-5 天 新手友好度 43/100
rr-debugger/rr#4127 · 1 条评论 ·
维护者通常 2 天内回复
-
难度 4/5 3-5 天 新手友好度 35/100
rr-debugger/rr#4060 · 5 条评论 ·
维护者通常 2 天内回复
-
难度 3/5 1-2 天 新手友好度 68/100
rr-debugger/rr#4059 · 1 条评论 ·
维护者通常 2 天内回复
相似的 Issue
-
PriorityNotificationQueue::wakeUpAll() loses the wake-up for a thread that is not waiting yet可能已有人在做 @matejk 今天认领。 未关闭bug
难度 2/5 1-3 小时 新手友好度 78/100
pocoproject/poco#5674 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 69/100
-
area:qmc bug
难度 2/5 1-3 小时 新手友好度 69/100
维护者通常 3 天内回复
-
bug good first issue
难度 2/5 1-3 小时 新手友好度 74/100
ASGC-Game-Jam/asgc-gamejam-2026#563 ·
维护者通常 1 天内回复
-
area/ysql kind/bug priority/medium status/awaiting-triage
难度 2/5 1-3 小时 新手友好度 78/100
yugabyte/yugabyte-db#37523 ·
维护者通常 1 天内回复