Temp dataRootDir leaked on abnormal exit or startup failure
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 58/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- typescript
- Lĩnh vực
- testing-qa
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
- Ngôn ngữ chính
- TypeScript
- Star
- 1
- Fork
- 0
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của HarperFast/integration-testing
-
setupHarperWithFixture overwrites ctx.harper, dropping pre-set hostname (breaks multi-node add_node)Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
enhancement good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 74/100
-
A listener on all interfaces silently receives a test node's connections on macOS; the conflict canary cannot see itCó thể đã có người làm @dawsontoth đã nhận hôm nay. Đang mở
HarperFast/integration-testing#38 · 1 bình luận · 1 người được giao ·
-
Detached Harper children are orphaned permanently when the runner dies by SIGKILL/SIGHUP — reap guard only covers exit/SIGINT/SIGTERMCó thể làm lại được @kriszyp đã nhận 39 ngày trước và không có pull request nào đang mở. Đang mở
HarperFast/integration-testing#29 · 1 bình luận · 1 người được giao ·
Tất cả issue của HarperFast/integration-testing
Issue tương tự
-
documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
inu-appcenter/memorIN-frontend#106 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
kind/bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 7 ngày
-
[Bug] @deck.gl/arcgis dist import resolves to unpublished @deck.gl/core source path (9.3.11, 9.4.0)Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
fix: CopyFilters ignores tabĐang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
CSCfi/sd-search-ui#145 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Add: Cbeebies pl SDĐang mởcheck:passed streams:add
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 1 ngày