Skip to content

Having a single blake3 store path from a one-time trial breaks things #13511

@grahamc

Description

@grahamc

Describe the bug

Essentially any store path that used blake3 taints the system if you don't keep the feature on.

Steps To Reproduce

  1. Have a blake3 store path
  2. Run nix path-info --json --all
  3. Witness the error: error: experimental Nix feature 'blake3-hashes' is disabled; add '--extra-experimental-features blake3-hashes' to enable it

Note you also can't delete that path:

grahamc@Grahams-MacBook-Pro nix-src % nix-store --delete /nix/store/pym15ihqmch7c9l45zxwf20r2drfj97p-oh-no-a-hash-mismatch2
finding garbage collector roots...
0 store paths deleted, 0.00 MiB freed
error: experimental Nix feature 'blake3-hashes' is disabled; add '--extra-experimental-features blake3-hashes' to enable it

And actually, passing that flag to the delete command doesn't actually work:

grahamc@Grahams-MacBook-Pro nix-src % nix-store --delete /nix/store/pym15ihqmch7c9l45zxwf20r2drfj97p-oh-no-a-hash-mismatch2 --extra-experimental-features blake3-hashes
finding garbage collector roots...
0 store paths deleted, 0.00 MiB freed
error: experimental Nix feature 'blake3-hashes' is disabled; add '--extra-experimental-features blake3-hashes' to enable it

...because you need sudo :)

grahamc@Grahams-MacBook-Pro nix-src % sudo nix-store --delete /nix/store/pym15ihqmch7c9l45zxwf20r2drfj97p-oh-no-a-hash-mismatch2 --extra-experimental-features blake3-hashes
warning: $HOME ('/Users/grahamc') is not owned by you, falling back to the one defined in the 'passwd' file ('/var/root')
finding garbage collector roots...
deleting '/nix/store/pym15ihqmch7c9l45zxwf20r2drfj97p-oh-no-a-hash-mismatch2'
deleting unused links...
note: currently hard linking saves 0.00 MiB
1 store paths deleted, 0.00 MiB freed

Expected behavior

A user should be able to introspect their database and also delete paths, even if an experimental feature was needed to create that path.

Metadata

grahamc@Grahams-MacBook-Pro nix-src % nix-env --version
nix-env (Determinate Nix 3.8.2) 2.30.1

Checklist


Add 👍 to issues you find important.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions