Temp dataRootDir leaked on abnormal exit or startup failure
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 58/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- typescript
- 领域
- testing-qa
调研方向
Start in src/harperLifecycle.ts by reading teardownHarper(), trackHarperProcess, signalHarperTree(), and startHarper(). Trace how dataRootDir and the log dir are created and how exit, SIGINT, SIGTERM, timeout, and startup paths are handled. Done means catchable abnormal exits clean temporary directories and startup removes stale harper-integration-test-* trees without affecting live runs.
由索引模型根据 Issue 内容生成。
描述
teardownHarper() removes the run's temp dataRootDir, but only when it is actually reached — which is solely via each suite's own after/afterEach hook. On a failed, killed, or timed-out run the directory is left behind forever.
Mechanism (current main)
src/harperLifecycle.ts—teardownHarper()doesrm(dataRootDir, { recursive: true, force: true, maxRetries: 10 }). This is the only place the data root is removed.- The interrupt-safety net,
trackHarperProcess(registered onexit/SIGINT/SIGTERM), callssignalHarperTree()to kill processes. It never touchesdataRootDir. - On
SIGKILL, nothing runs at all.
So the cleanup path and the interrupt path are disjoint: every abnormal exit leaks a temp tree.
Observed impact
On a dev box this accumulated ~160 orphaned /tmp/harper-integration-test-* directories with no owning process, driving /tmp down to 3.1 G free, at which point runs failed with Disk quota exceeded.
Secondary consequence worth recording because it cost real time: on a machine where /tmp is a RAM-backed tmpfs, once it fills, every Bash call starts failing with a bare Exit code 1 while file tools keep working. Three separate agent sessions each burned their whole budget misdiagnosing that as something else. The disk symptom does not look like a disk symptom.
Relationship to the existing issues
This is a sibling of, but distinct from, the process/address leaks already tracked:
- #13 — loopback pool leaks addresses from runners killed mid-shard (dead-PID sweep only runs when the pool is full)
- #29 — detached Harper children orphaned permanently on SIGKILL/SIGHUP; reap guard covers only
exit/SIGINT/SIGTERM
Those two are about processes and bound ports, and they are genuinely hard (SIGKILL is uncatchable from the parent, hence #29's child-side parent-liveness watchdog proposal). This one is about filesystem state, is not covered by either, and is untouched by the recent SIGINT/SIGTERM hardening commits.
Suggested direction
Wire dataRootDir (and the log dir) removal into the same trackHarperProcess reaper that already handles the catchable signals, so a Ctrl-C or a timeout cleans up. For the SIGKILL case the parent can do nothing, so the practical complement is a stale-directory sweep at startup: on startHarper, remove harper-integration-test-* trees whose owning PID is gone — the same liveness test #13 already applies to pool addresses.
Found by the qa-explorer campaign.
— Claude Opus 5.5
- 主要语言
- TypeScript
- 星标
- 1
- 派生
- 0
- 平均合并
- 13 天 14 小时
- 30 天内合并 PR
- 5
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
HarperFast/integration-testing 的其他 Issue
-
setupHarperWithFixture overwrites ctx.harper, dropping pre-set hostname (breaks multi-node add_node)未关闭
难度 2/5 1-3 小时 新手友好度 68/100
-
enhancement good first issue
难度 2/5 1-3 小时 新手友好度 85/100
-
难度 3/5 1-2 天 新手友好度 74/100
-
Detached Harper children are orphaned permanently when the runner dies by SIGKILL/SIGHUP — reap guard only covers exit/SIGINT/SIGTERM可能重新可做 @kriszyp 于 60 天前认领,目前没有进行中的 PR。 未关闭
HarperFast/integration-testing#29 · 1 条评论 · 已指派 1 人 ·
-
难度 3/5 1-2 天 新手友好度 72/100
查看 HarperFast/integration-testing 的全部 Issue
相似的 Issue
-
area: repo priority: P2 type: bug
难度 2/5 1-3 小时 新手友好度 76/100
appandflow/stim#4107 · 1 条评论 ·
维护者通常 1 天内回复
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
难度 1/5 1-3 小时 新手友好度 60/100
lingdojo/kana-dojo#32859 · 1 条评论 · 5 个 reaction ·
维护者通常 1 天内回复
-
code-quality refactoring
难度 2/5 1-3 小时 新手友好度 78/100
github/gh-aw-firewall#10364 ·
维护者通常 1 天内回复
-
Merge the duplicate kaffir_corn record into sorghum可能已有人在做 @Crypto-Shroom 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 65/100
Crypto-Shroom/Bird-Feed-Calculator#322 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 75/100
drizzle-team/drizzle-orm#6552 ·
维护者通常 2 天内回复