Bound all external process calls with a timeout and forced termination
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- java
- Área
- operating-systems
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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).
- Lenguaje dominante
- Java
- Estrellas
- 6
- Forks
- 6
- Merge medio
- 10 h 11 min
- PR fusionados (30 d)
- 12
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de JDiskMark/jdm-java
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
Los mantenedores suelen responder en 1 día
-
enhancement linux
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
Los mantenedores suelen responder en 1 día
-
documentation linux
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Publish JDiskMark on FlathubAbiertoenhancement linux
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
Los mantenedores suelen responder en 1 día
-
bug linux
Dificultad 3/5 1-2 días Aptitud para principiantes 52/100
Los mantenedores suelen responder en 1 día
Todos los issues de JDiskMark/jdm-java
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
bloxbean/yaci-store#1445 ·
Los mantenedores suelen responder en 1 día
-
图片灯箱过长的话底部carousel滑动没有惯性Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
-
Spare PermissionAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 63/100
Etar-Group/Etar-Calendar#2234 ·
Los mantenedores suelen responder en 1 día
-
[BUG] MCP resources-as-tools drops invocation context when listing templatesPosiblemente ocupada @CryoThrust la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
langchain4j/langchain4j#7320 ·
Los mantenedores suelen responder en 1 día