[Issue]: No free-space check before multi-GB downloads and extractions
I maintainer di solito rispondono entro 2 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 50/100
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- Rust
- Stelle
- 40
- Fork
- 10
- Merge medio
- 5g 11h
- PR unite (30g)
- 52
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di ROCm/rocm-cli
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
I maintainer di solito rispondono entro 2 giorni
-
bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
ROCm/rocm-cli#393 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
I maintainer di solito rispondono entro 2 giorni
Tutte le issue di ROCm/rocm-cli
Issue simili
-
agent:triaged bug bughunt pm:npm priority:p1
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
SocketDev/socket-patch#464 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
I maintainer di solito rispondono entro 3 giorni
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
stellar/stellar-cli#2773 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno