CachyOS / CachyOS/cachyos-benchmarker
Benchmark asset download fails and leaves an incomplete work directory
- Dominant language
- Shell
- Stars
- 48
- Forks
- 8
- PR merge metrics
- No merged PRs in 30d
Description
While running:
```bash
./cachyos-benchmarker benchmark-workdir
```
the preparation stopped working when downloading the NAMD example archive. The HTTPS download failed because of a certificate verification error and created an empty file. The script did not stop after the download failure, so it tried to extract the empty archive:
```text
--> Downloading NAMD example archive...
--> Preparing NAMD...
tar: This does not look like a tar archive
gzip: stdin: unexpected end of file
tar: Child returned status 1
sed: can't read namd/apoa1/apoa1.namd: No such file or directory
```
Interrupted Blender and Firefox downloads also left zero-byte files behind. On the next run, some incomplete files or directories were treated as already prepared, while Firefox started downloading again.
The problem is that download and extraction errors are not checked consistently. Newly downloaded files are not validated before extraction, and file or directory existence can be mistaken for successful preparation.
This needs to be fixed so that:
- a failed download stops preparation with a clear error;
- empty or invalid files are never accepted as downloaded assets;
- extraction failures stop the script;
- incomplete files and directories do not break later runs.
I currently do not know which implementation approach is best. Possible options include downloading to a `.part` file and validating it before renaming, safely resuming partial downloads, or removing failed downloads and retrying from the beginning. This issue is intended to track and discuss the fix.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by running ./cachyos-benchmarker benchmark-workdir and trace the download and preparation paths for the NAMD, Blender, and Firefox assets. Check how download, archive extraction, and existing files or directories are handled; done means failures stop clearly, invalid assets are rejected, extraction errors stop preparation, and later runs are not blocked by incomplete state.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- shell
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100