[Issue]: No free-space check before multi-GB downloads and extractions
Los mantenedores suelen responder en 2 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 50/100
Línea de trabajo
Start with the SDK install paths in apps/rocm/src/therock.rs, especially the tarball download at line 1062 and the following extraction, then inspect download_file_to_path in crates/rocm-core/src/lib.rs:115. Review the existing sysinfo usage and TODO in crates/rocm-dash-collectors/src/host.rs:57. Done means installs check required space before download and extraction and present a clear insufficient-space error, including handling for a write failure caused by no space.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Problem Description
ROCm CLI starts multi-GB downloads and extractions without ever checking whether there is room for them. There is no free-space check anywhere in the codebase, and no handling of the resulting out-of-space error, so a user with a nearly-full disk gets a low-level write failure partway through an install rather than an upfront "you need N GB free".
Verified by searching apps/, crates/, engines/, and xtask/ for available_space, free_space, statvfs, ENOSPC, StorageFull, disk_space, fs2, and nix::sys::statvfs, plus prose variants (no space, out of space, insufficient disk, free disk) — zero hits. Nothing maps ErrorKind::StorageFull to a user-facing message.
sysinfo is already a dependency of crates/rocm-dash-collectors (used for CPU/memory metrics). sysinfo::Disks appears only in a TODO comment at crates/rocm-dash-collectors/src/host.rs:57, so the capability is available but unused.
This is made worse by the fact that a failed write currently leaks its partial file (see the companion issue on orphaned partial downloads), so hitting a full disk both fails the install and permanently consumes the space that was left.
Steps to Reproduce
- On a machine with less free space than the SDK requires, run an SDK install.
- The install begins downloading and fails partway through with a write error, rather than refusing upfront with a space requirement.
Suggested Fix
Check available space before starting a download or extraction and fail early with the required and available amounts. The natural checkpoints are the SDK install paths in apps/rocm/src/therock.rs (the tarball download at line 1062 and the extraction that follows it) and the shared helper download_file_to_path in crates/rocm-core/src/lib.rs:115.
Two details worth deciding:
- Extraction needs headroom well beyond the compressed artifact, so the check should account for the extracted size, not just the download.
Content-Lengthgives the download size cheaply where the server provides it; the extracted size needs either a manifest value or a conservative multiplier.
It would also help to surface a clear message when a write does fail for lack of space, instead of the raw OS error.
Additional Information
Found while investigating unbounded disk growth from repeated installs.
- Lenguaje dominante
- Rust
- Estrellas
- 40
- Forks
- 10
- Merge medio
- 5 d 11 h
- PR fusionados (30 d)
- 52
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una 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 ROCm/rocm-cli
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 2 días
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
Los mantenedores suelen responder en 2 días
-
bug
Dificultad 1/5 Menos de una hora Aptitud para principiantes 92/100
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
ROCm/rocm-cli#393 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
Los mantenedores suelen responder en 2 días
Todos los issues de ROCm/rocm-cli
Issues similares
-
agent:triaged bug bughunt pm:npm priority:p1
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
SocketDev/socket-patch#464 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
Los mantenedores suelen responder en 3 días
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
stellar/stellar-cli#2773 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día