Tarball cache not evicted #668

Closed
opened 2025-02-12 17:55:50 +00:00 by strangeglyph · 2 comments
Member

Describe the bug

Hi everyone,

I have a strange problem with the nix cache. I use the mozilla overlays (from https://github.com/mozilla/nixpkgs-mozilla) to get firefox-nightly, added to my nixos.config as follows:

nixpkgs.overlays = let
    moz-overlays = builtins.fetchTarball { url = "https://github.com/mozilla/nixpkgs-mozilla/archive/master.tar.gz"; };
    ff-nightly-overlay = import "${moz-overlays}/firefox-overlay.nix";
  in [
    ff-nightly-overlay
  ];

Recently, this started failing due to url literals in the overlay file. If we look at the commits, we can see that this fixed back in 2022 (c89bd565a2), so clearly there seems to be some caching issue.

However both after deleting ~/.cache/nix, the error persists. Not only that, also rebuilding with --options tarball-ttl 1 persists the error.

Bonus strangeness: This bug occurs if nixos is on the 24.05 channel but not on the 24.11 channel.

Steps To Reproduce

Enter snippet above in nixos.config, make sure nixos channel is on 24.05 and rebuild.

Expected behavior

The most recent tarball of the github archive should be pulled.

nix --version output

nix (Lix, like Nix) 2.93.0-dev
System type: x86_64-linux
Additional system types: i686-linux, x86_64-v1-linux, x86_64-v2-linux, x86_64-v3-linux
Features: gc, signed-caches
System configuration file: /etc/nix/nix.conf
User configuration files: /home/lschuetze/.config/nix/nix.conf:/etc/xdg/nix/nix.conf:/home/lschuetze/.nix-profile/etc/xdg/nix/nix.conf:/nix/profile/etc/xdg/nix/nix.conf:/home/lschuetze/.local/state/nix/profile/etc/xdg/nix/nix.conf:/etc/profiles/per-user/lschuetze/etc/xdg/nix/nix.conf:/nix/var/nix/profiles/default/etc/xdg/nix/nix.conf:/run/current-system/sw/etc/xdg/nix/nix.conf
Store directory: /nix/store
State directory: /nix/var/nix
Data directory: /nix/store/nsgjdq35swvscm2np70js75gam93yz6z-lix-2.93.0-dev/share

Additional context

We were unable to reproduce the issue on @pennae's laptop.

## Describe the bug Hi everyone, I have a strange problem with the nix cache. I use the mozilla overlays (from https://github.com/mozilla/nixpkgs-mozilla) to get firefox-nightly, added to my nixos.config as follows: ```nix nixpkgs.overlays = let moz-overlays = builtins.fetchTarball { url = "https://github.com/mozilla/nixpkgs-mozilla/archive/master.tar.gz"; }; ff-nightly-overlay = import "${moz-overlays}/firefox-overlay.nix"; in [ ff-nightly-overlay ]; ``` Recently, this started failing due to url literals in the overlay file. If we look at the commits, we can see that this fixed back in 2022 (https://github.com/mozilla/nixpkgs-mozilla/commit/c89bd565a2d83aa109dbe541dc6e2b8b2904712c), so clearly there seems to be some caching issue. However both after deleting ~/.cache/nix, the error persists. Not only that, also rebuilding with `--options tarball-ttl 1` persists the error. Bonus strangeness: This bug occurs if nixos is on the 24.05 channel but not on the 24.11 channel. ## Steps To Reproduce Enter snippet above in nixos.config, make sure nixos channel is on 24.05 and rebuild. ## Expected behavior The most recent tarball of the github archive should be pulled. ## `nix --version` output ``` nix (Lix, like Nix) 2.93.0-dev System type: x86_64-linux Additional system types: i686-linux, x86_64-v1-linux, x86_64-v2-linux, x86_64-v3-linux Features: gc, signed-caches System configuration file: /etc/nix/nix.conf User configuration files: /home/lschuetze/.config/nix/nix.conf:/etc/xdg/nix/nix.conf:/home/lschuetze/.nix-profile/etc/xdg/nix/nix.conf:/nix/profile/etc/xdg/nix/nix.conf:/home/lschuetze/.local/state/nix/profile/etc/xdg/nix/nix.conf:/etc/profiles/per-user/lschuetze/etc/xdg/nix/nix.conf:/nix/var/nix/profiles/default/etc/xdg/nix/nix.conf:/run/current-system/sw/etc/xdg/nix/nix.conf Store directory: /nix/store State directory: /nix/var/nix Data directory: /nix/store/nsgjdq35swvscm2np70js75gam93yz6z-lix-2.93.0-dev/share ``` ## Additional context We were unable to reproduce the issue on @pennae's laptop.
Owner

Hm. The way I would try to diagnose this is by finding the store path of the offending sources and then shoving breakpoints into appropriate places (or running Lix in rr and reproing the problem) till we know which store call it comes from.

Hm. The way I would try to diagnose this is by finding the store path of the offending sources and then shoving breakpoints into appropriate places (or running Lix in rr and reproing the problem) till we know which store call it comes from.
Owner

okay, wow. this was a config issue. there's an old version of the mozilla overlay in /root/.config/nixpkgs/overlays, which gets loaded during the building Nix phase of nixos-rebuild. not a lix issue!

okay, wow. this was a config issue. there's an old version of the mozilla overlay in `/root/.config/nixpkgs/overlays`, which gets loaded during the `building Nix` phase of nixos-rebuild. not a lix issue!
Sign in to join this conversation.
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: lix-project/lix#668
No description provided.