nix nar ls on a zstd compressed file crashes nix #993
Labels
No labels
Affects/CppNix
Affects/Nightly
Affects/Only nightly
Affects/Stable
Area/build-packaging
Area/cli
Area/evaluator
Area/fetching
Area/flakes
Area/language
Area/lix ci
Area/nix-eval-jobs
Area/profiles
Area/protocol
Area/releng
Area/remote-builds
Area/repl
Area/repl/debugger
Area/store
bug
Context
contributors
Context
drive-by
Context
maintainers
Context
RFD
crash 💥
Cross Compilation
devx
docs
Downstream Dependents
E/easy
E/hard
E/help wanted
E/reproducible
E/requires rearchitecture
Feature/S3
imported
Language/Bash
Language/C++
Language/NixLang
Language/Python
Language/Rust
Needs Langver
OS/Linux
OS/macOS
performance
regression
release-blocker
stability
Status
blocked
Status
invalid
Status
postponed
Status
wontfix
testing
testing/flakey
Topic/Large Scale Installations
ux
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: lix-project/lix#993
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Describe the bug
I tried to download a NAR file to understand how it works, but the remote store (attic) seems to give users compressed NAR files (which I didn't know until i asked someone more knowledgeable)
Steps To Reproduce
nix nar dump-path <path> | zstd >test.nar
nix nar ls test.nar /
Expected behavior
nix nar ls work with all compressed files
nix --version
outputAdditional context
I think you might need to get low memory or smth, because I was unable to reproduce this when making my own compressed nar files, i get the error out of memory instead of the crash
The file testt.nar is f7pd1mr3fwd02n5l7wrmq8k31phxwv8p.nar, from a private cache, and since it doesn't contain any PII, i'm willing to share it if needed (it's 11M)
the cli does not support compressed nar files in this manner. we definitely should not be crashing like this and show an actionable error message instead (e.g. "input is not a correct NAR file. if it is compressed it must be decompressed first." idk).
This issue was mentioned on Gerrit on the following CLs:
@pennae wrote in #993 (comment):
Oh yeah sorry, i thought it did because it was sometimes failing with "Out of memory" messages, which led to me to incorrectly assume that it was taking the little memory available to try to decompress it, and couldn't.
Thanks!