You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
error: input compression not recognized (private cache using zstd compression) #11261
When I run nix build, I repeatedly get an error about compression when trying to substitute from a private cache.
error: input compression not recognized
error: some substitutes for the outputs of derivation '/nix/store/l59dvqj9lbm2n5agfx19hxbm2qlq4w0g-pnpm-9.0.6.tgz.drv' failed (usually happens due to networking issues); try '--fallback' to build derivation from source
The pnpm package in question is our own package that has this as its src:
I don't get this issue if I switch from compression=zstd to compression=gzip and overwrite the cache. So I think it is an issue specific to using zstd with a cache.
Discussed during aforementioned Nix maintainers meeting:
We have a test for zstd compression for a binary cache
If this were HTTP, I would ask the following. S3 should be analogous.
What does curl http(s)://your-cache.local/l59dvqj9lbm2n5agfx19hxbm2qlq4w0g.narinfo return?
It should provide you with a nar.zstd filename.
If you download that, is it in the correct file format?
My PR was about http transport encoding (this is transparent to nix as curl handles it i.e. it should not appear in narinfo either), but the person here uses zstd compression on the content itself.
If I find some time, I'll see if I can reproduce using minio. Unfortunately, my main specimen was serving production use cases and I already did the cache surgery, so I can't easily grab that info you are requesting.
This gives me a strong feeling of Deja Vu with an issue I've tackled in #10341. The original problem I've had was also with minio but with a reverse proxy #10275.
It would be helpful to see the http headers you get when downloading the nar. My guess is that this is once again TarArchive biting us in the rear.
I thought it has been ironed out since there's a nixos test for substitution of gzip files with gzip Encoding-Type.
I thought it has been ironed out since there's a nixos test for substitution of gzip files with gzip Encoding-Type.
I've only seen this with non-gzip compression (i.e. zstd). So i wonder if its a zstd-in-gzip-stream bug.
Unfortunately, since this happened on a production cache, I just did whatever cache surgery I could to recover and I no longer have any sample files that exhibit the behavior.
Activity
andrewhamon commentedon Aug 5, 2024
I don't get this issue if I switch from
compression=zstdtocompression=gzipand overwrite the cache. So I think it is an issue specific to using zstd with a cache.nixos-discourse commentedon Aug 13, 2024
This issue has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/2024-08-12-nix-team-meeting-minutes-168/50561/1
roberth commentedon Aug 13, 2024
Discussed during aforementioned Nix maintainers meeting:
We have a test for zstd compression for a binary cache
If this were HTTP, I would ask the following. S3 should be analogous.
What does
curl http(s)://your-cache.local/l59dvqj9lbm2n5agfx19hxbm2qlq4w0g.narinforeturn?It should provide you with a
nar.zstdfilename.If you download that, is it in the correct file format?
Possibly related: #7712
Mic92 commentedon Aug 14, 2024
My PR was about http transport encoding (this is transparent to nix as curl handles it i.e. it should not appear in narinfo either), but the person here uses zstd compression on the content itself.
andrewhamon commentedon Aug 14, 2024
If I find some time, I'll see if I can reproduce using minio. Unfortunately, my main specimen was serving production use cases and I already did the cache surgery, so I can't easily grab that info you are requesting.
xokdvium commentedon Nov 5, 2024
This gives me a strong feeling of Deja Vu with an issue I've tackled in #10341. The original problem I've had was also with minio but with a reverse proxy #10275.
It would be helpful to see the http headers you get when downloading the nar.My guess is that this is once againTarArchivebiting us in the rear.I thought it has been ironed out since there's a nixos test for substitution of gzip files with gzip
Encoding-Type.Edit: Didn't catch that the cache is on plain S3
andrewhamon commentedon Nov 6, 2024
Well... it was gcloud using s3 compat
I've only seen this with non-gzip compression (i.e. zstd). So i wonder if its a zstd-in-gzip-stream bug.
Unfortunately, since this happened on a production cache, I just did whatever cache surgery I could to recover and I no longer have any sample files that exhibit the behavior.