handling of incomplete recordings for rr record and rr ls

未关闭
#4,146 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 2 天内回复

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
52/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
cpp, linux
领域
cli

调研方向

Start by locating the code paths for rr ls -l and rr record, then trace how incomplete recordings and early capability-check failures are handled. Run the relevant tests for listing and recording; done means an aborted recording no longer prevents a detailed listing, with the behavior for cleaning up or retaining failed recordings made clear.

由索引模型根据 Issue 内容生成。

描述

rr ls gives me a listing of recordings. If I want to see a detailed list and enter rr ls -l, I get

rr: Trace file `/home/user/.local/share/rr/true-0/incomplete' found.
rr recording terminated abnormally and the trace is incomplete.

Any incomplete recording prevents a detailed listing from being printed

I presume these are aborted recordings because

> rr record true
rr: Saving execution to trace directory `/home/user/.local/share/rr/true-0'.
[FATAL src/PerfCounters.cc:407:start_counter()] rr needs /proc/sys/kernel/perf_event_paranoid <= 3, but it is 4.

creates the recording directory before doing the capability check.
The incomplete file contains the number "85" in ASCII and a newline, which doesn't seem like helpful information at first glance.

I think rr ls -l should list all traces by principle of least surprise.

I guess I would like rr record to not create a folder or have the ability to clean it up in the presence of an early failure.

Now that I know what to look for, I can obviously write a script to clean those recordings, but it would nice if casual users wouldn't have to worry about those details. Expert users using rr recordings in an automated fashion might want to keep a log of recording failures, but they are more likely to read the documentation and use the correct flags.

主要语言
C++
星标
10.7k
派生
666
平均合并
1 天 21 小时
30 天内合并 PR
31

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

rr-debugger/rr 的其他 Issue

查看 rr-debugger/rr 的全部 Issue

相似的 Issue

更多 C++ Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。