Bound all external process calls with a timeout and forced termination
Maintainer thường phản hồi trong vòng 1 ngày
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
- 35/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ệ
- java
- Lĩnh vực
- operating-systems
Hướng nghiên cứu
Start with UtilsLinuxOs.getWholeDisks, which already uses the CompletableFuture drain, waitFor(timeout) and destroyForcibly pattern, and compare it with the unbounded calls in UtilsLinuxOs.getPartitionFromFilePath, UtilsMacOs and UtilOs.runPowerShellOneLiner. Before writing code, settle where the shared runCommand helper should live, since the issue leaves that open. Done means every ProcessBuilder call site is bounded and force-destroyed on timeout, returns null or an empty list, and logs a warning.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Background
PR #254 (#252) added proper timeouts to the USB VID/PID lookups on Windows
(UtilsWinOs.getUsbIds, 15 s) and macOS (UtilsMacOs.runCommandLines, 10 s):
output is drained asynchronously, waitFor(timeout) is honoured, and the child
is destroyForcibly()'d on expiry. Review feedback (Copilot) flagged that the
remaining process calls do not follow this pattern.
Problem
Many ProcessBuilder call sites either:
- call
process.waitFor()with no timeout, or - read stdout to EOF with
readLine()before callingwaitFor(n, SECONDS),
making the timeout ineffective, and never destroy the child.
A hung child (stale network mount for df, stalled DiskArbitration for
diskutil, slow/broken WMI for PowerShell) can block drive detection,
benchmark setup, or the UI indefinitely.
Affected call sites (non-exhaustive)
UtilsLinuxOs.getPartitionFromFilePath(df -k),waitFor()without a timeoutUtilsLinuxOs.getDeviceNamesFromPartition(lsblk -no pkname),waitFor()without a timeoutUtilsMacOs:df -k,diskutil info(lines ~92, ~153),system_profiler,
the generic command runner (~208),mount(~318)UtilOs: remainingwaitFor()calls with no timeout (Linux SMART/lsblk/udevadm helpers) and
read-then-waitFor(n)PowerShell helpers (e.g.runPowerShellOneLiner)
Proposed approach
- Use the existing pattern from
UtilsLinuxOs.getWholeDisks:
CompletableFutureoutput drain →waitFor(timeout)→destroyForcibly()infinally. - Consider one shared helper (e.g.
runCommand(timeout, String... cmd) → List<String>)
so call sites stay consistent. Confirm package/location before adding. - Timeouts: 10 s for native tools, 15 s for PowerShell (start-up + WMI).
- On timeout: log at WARNING and return the existing "unavailable" value
(null/empty list) so detection failures never block a benchmark.
Priority
Low–medium. Hangs are rare on Linux (sysfs/statfs), more plausible on macOS
(diskutil) and Windows (PowerShell/WMI).
- Ngôn ngữ chính
- Java
- Star
- 6
- Fork
- 6
- Merge trung bình
- 10 giờ 11 phút
- Pull request đã merge (30 ngày)
- 12
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
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 JDiskMark/jdm-java
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement linux
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
Maintainer thường phản hồi trong vòng 1 ngày
-
documentation linux
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Publish JDiskMark on FlathubĐang mởenhancement linux
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug linux
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 52/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của JDiskMark/jdm-java
Issue tương tự
-
Độ 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 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
bloxbean/yaci-store#1445 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
图片灯箱过长的话底部carousel滑动没有惯性Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
-
Spare PermissionĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 63/100
Etar-Group/Etar-Calendar#2234 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[BUG] MCP resources-as-tools drops invocation context when listing templatesCó thể đã có người làm @CryoThrust đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
langchain4j/langchain4j#7320 ·
Maintainer thường phản hồi trong vòng 1 ngày