Content-addressed Nix − call for testers

Since I have enabled the ca-* related feature I think I have encountered a bug.
I filed it here
https://github.com/NixOS/nix/issues/4903
I think that when those ca-* flags are on sometimes nix tries to fetch unexisting cache path.
I’ve tried to enable -vvv to see what exactly was happening.
I’m waiting to test without the flags to see If the bug persists.
Unfortunately the bug itself is quite transient. It sometimes appears repeatedly, but I can’t isolate a minimum set of features to trigger it.

I finally managed to get my system to actually build something.

Sometimes I have to manually nix store delete something due to failed clean up from earlier builds, with I can live and cope with.

Though I do have some other problem now, I am not sure how to fix:

autogen> RPATH of binary /nix/store/kx284d6sd0i4dyfqv8ma26nhz1239swn-autogen-5.18.16-bin/bin/autogen contains a forbidden reference to /tmp/nix-build-autogen-5.18.16.drv-0/
error: builder for '/nix/store/nvyslzkbqqvasb2mr8pzcjyz558883zf-autogen-5.18.16.drv' failed with exit code 1

Also, using --keep-going I have already observed that there are sometimes hash mismatches, probably for FODs (it has to be for FODs, as I removed all substitutes).

@NobbZ Sounds like you are building with sandboxing disabled - this should be fixed by [staging] autogen: fix patchelf invocation to remove generic build path from rpath by r-burns · Pull Request #126557 · NixOS/nixpkgs · GitHub

This was indeed true, that machine still had the sandbox disabled.

Thanks for the hint! Will try again later, though currently it’s building the Linux kernel and as it’s already doing this for 2 hours, I prefer to not cancel this :smiley:

I’m now getting a build failure, 00:41 EST 2021-06-30

error: hash mismatch importing path '/nix/store/i3ibpx67yncp4w4mpkf5pwvjjsd0aqln-bootstrap-tools';
         specified: sha256:04hma6x4y5lffi9gzsjgq7b87yadr01vjdng8xy9zrb0rf95kfwg
         got:       sha256:0hb7fazqa9zplfxkgsg5swq7l4zb4bgyac4svcaqk7kjhcjbgbgy
error: some substitutes for the outputs of derivation '/nix/store/dsfkb3v7gzswh3xsms5a8ml14nmzcizi-bootstrap-tools.drv' failed (usually happens due to networking issues); try '--fallback' to build derivation from source
error: 1 dependencies of derivation '/nix/store/z8kvwlkczbj055ihanr2vrx7jy8bf70a-acl-2.3.0.drv' failed to build
error: 1 dependencies of derivation '/nix/store/picvc269h6kvcbg0x5qpcvq75648q4qq-bash-4.4-p23.drv' failed to build
error: 1 dependencies of derivation '/nix/store/l4nyd83gnj4dmy9z4cbsyd1dgyrhyawa-gcc-10.3.0.drv' failed to build
error: 1 dependencies of derivation '/nix/store/c5v1v5qxk3mjq02x3jzhxi0bvv33zyxk-gcc-wrapper-10.3.0.drv' failed to build
error: 1 dependencies of derivation '/nix/store/5afxjjf6y5p896vs2mz7wf0s89lv2zpa-glibc-2.32-46.drv' failed to build
error: 1 dependencies of derivation '/nix/store/jvbcgx66fc0xs0590vzmy7bim9a803mf-xz-5.2.5.drv' failed to build
error: 1 dependencies of derivation '/nix/store/qiwgz7kpm7jhcvgfm924v20y9bxmq234-S.gpg-agent.drv' failed to build

I have all 3 levels enabled.

Anyone used __contentAddressed = true with node2nix?

I’m using it with my mkDerivation but I’m not sure if it propagates to all the node dependencies. It seems to rebuild a lot every time.

__contentAddressed does not propagate at all. You need to set it for each derivation you want to be CA.

1 Like

Is there a way to check that all dependent derivations are content addressed? Something like nix-store -q --tree result.

There’s no direct built-in way, but you can run something like

nix path-info --json --recursive /run/current-system | jq '.[] | select(.ca == null) | .path'
1 Like

Does it propagate to buildInputs deps? With __contentAddressed = true it doesn’t seem to.

Will it do when I’ll use config.contentAddressedByDefault = true?

“doesnt propagate at all” means exactly that. If you have derivations A, B, and C, where A depends on B and B on C and B is CA, then A and C will still be IA.

Everything you build from that “instantiation” of nixpkgs will be CA, unless it already has an explicit __contentAddressed = false.

1 Like

Is it possible to use config.contentAddressedByDefault = true with nix build to build 1 thing?

I wish I could test that without having to switch to content-addressed nix system-wide.

Unfortunately no. You can define an overlay that defines pkgsCA = import super.path { config.contentAddressedByDefault = true; }[^1] (I have something like that in my config).

[^1]: Hopefully there is a less ugly way to do that

1 Like

I got this while trying to build rust code (with crate2nix). Should I report that somewhere?

error: hash mismatch importing path '/nix/store/nsjps4rkirnl5ax95nv0gknxbwfgxx5x-nss-cacert-3.63';
         specified: sha256:0436qysvr0vd0j2bbi50573k4cfssyp85fyw4nh2qjx2drdclf22
         got:       sha256:0i89bik568xsxqypi2vgb5abd78cqrwnc3a0x3m7mkbyqbyy7pg5
error: hash mismatch importing path '/nix/store/szqzgsdclhyww9iq6gavs6v5pqns4hj2-libunistring-0.9.10';
         specified: sha256:1gcnvxyhh8g3jp2gl2d9zrmp5m3vhgddzc0yihq17iz8ar9hyb2f
         got:       sha256:1f4yx9iass21g6scn6q82132hhg8r6g4wl5mb4dpxsdbdw6xsm0i
error: hash mismatch importing path '/nix/store/nsjps4rkirnl5ax95nv0gknxbwfgxx5x-nss-cacert-3.63';
         specified: sha256:0436qysvr0vd0j2bbi50573k4cfssyp85fyw4nh2qjx2drdclf22
         got:       sha256:0i89bik568xsxqypi2vgb5abd78cqrwnc3a0x3m7mkbyqbyy7pg5
error: hash mismatch importing path '/nix/store/i9433i8qbk9rn936m2dqpdi5s54r183y-gcc-10.3.0-man';
         specified: sha256:0n5v5ara56lhzwz3pdqkf0zpmy0lwsb9v3yz2h19g5y8r7y5k8rw
         got:       sha256:1v2i95r2liqa7xjn2vl26fwddl92k578hrg3zj3fb3r4sgdsaczp
error: hash mismatch importing path '/nix/store/f1sidjc7ir0mizhlkvfn8g6fji6wmb96-perl5.32.1-FCGI-ProcManager-0.28';
         specified: sha256:1v432zr4qd9jg32z09q2kh7rb4vjxs7jgqmd63xf8kvz0mhn7xpq
         got:       sha256:06lv10lybg5zlhr2d8b95bdpym8dcb0kqb8v6wj6l9yg6h0kv9hm
error: hash mismatch importing path '/nix/store/dbm85l30sbfgzc7ikjaccr5p7y7l5wk5-perl5.32.1-HTML-TagCloud-0.38';
         specified: sha256:1d7798ahb0bnai0w5rkgsxxyi5k74dx8nbq1ws4384rldlxan7m4
         got:       sha256:1bzll36y2zh9164xlrq9a6xzx2hz03mn219948110bx4nladvwpv
error: hash mismatch importing path '/nix/store/i3ibpx67yncp4w4mpkf5pwvjjsd0aqln-bootstrap-tools';
         specified: sha256:04hma6x4y5lffi9gzsjgq7b87yadr01vjdng8xy9zrb0rf95kfwg
         got:       sha256:0hb7fazqa9zplfxkgsg5swq7l4zb4bgyac4svcaqk7kjhcjbgbgy
error: hash mismatch importing path '/nix/store/qg3pj9l8zga9zm5hpm4c9lmi8zkaasn0-gmp-6.2.1';
         specified: sha256:0b6pa81z7iwf588dhr741qjsb1f4snqfcq1cv87vsk8wm7qc4vz2
         got:       sha256:1hrxpadjixraw7xr806k29kzsy492kkl8vq6ikhmlszhfg26bh1k
error: hash mismatch importing path '/nix/store/vghhj441vf9z5pr9f4pvn3whpx75c15h-isl-0.20';
         specified: sha256:0xn5lhsy04g6xaq1wgvsdb4scfcnavy03byfspv7bifqy81nsvm3
         got:       sha256:0xiw95sww50kcsdgbjq7h5b8mi3mflzwmy27x3gsxma7yyykk9fh
error: hash mismatch importing path '/nix/store/cbs57ggwizlxpkjx9asn0nsxk14m7iaw-libmpc-1.2.1';
         specified: sha256:0imkqhbwzrq4sjqi3n0bzsq9f2k85p3qf92f0ig47126nfq92pqh
         got:       sha256:1k32q1k985vsbgbkqw1zi37va8pk651qbjjivp395lvrxfm1g8rj
error: hash mismatch importing path '/nix/store/szqzgsdclhyww9iq6gavs6v5pqns4hj2-libunistring-0.9.10';
         specified: sha256:1gcnvxyhh8g3jp2gl2d9zrmp5m3vhgddzc0yihq17iz8ar9hyb2f
         got:       sha256:1f4yx9iass21g6scn6q82132hhg8r6g4wl5mb4dpxsdbdw6xsm0i
error: hash mismatch importing path '/nix/store/i3ibpx67yncp4w4mpkf5pwvjjsd0aqln-bootstrap-tools';
         specified: sha256:04hma6x4y5lffi9gzsjgq7b87yadr01vjdng8xy9zrb0rf95kfwg
         got:       sha256:0hb7fazqa9zplfxkgsg5swq7l4zb4bgyac4svcaqk7kjhcjbgbgy
error: hash mismatch importing path '/nix/store/szqzgsdclhyww9iq6gavs6v5pqns4hj2-libunistring-0.9.10';
         specified: sha256:1gcnvxyhh8g3jp2gl2d9zrmp5m3vhgddzc0yihq17iz8ar9hyb2f
         got:       sha256:1f4yx9iass21g6scn6q82132hhg8r6g4wl5mb4dpxsdbdw6xsm0i
error: hash mismatch importing path '/nix/store/i3ibpx67yncp4w4mpkf5pwvjjsd0aqln-bootstrap-tools';
         specified: sha256:04hma6x4y5lffi9gzsjgq7b87yadr01vjdng8xy9zrb0rf95kfwg
         got:       sha256:0hb7fazqa9zplfxkgsg5swq7l4zb4bgyac4svcaqk7kjhcjbgbgy
error: hash mismatch importing path '/nix/store/5q95vkhiia9795pvw1xlwxx6bbiaxlf5-perl5.32.1-Encode-Locale-1.05';
         specified: sha256:1xi6687iwxph086nhbidbvglgvik876j7jc3ik3ng0pf9xx5f897
         got:       sha256:1a1pg76mk9j2cgznxjz1lr6v975h6dpnfm0jyw76kgfbyp0787gd
error: hash mismatch importing path '/nix/store/slba6gf0j54b56a2a8xkpwlldkpv61zz-perl5.32.1-HTML-Tagset-3.20';
         specified: sha256:13a1dnjjlyfa71h0yfw9bkdwxyyrx0s7psisqra78r2rr709xsi2
         got:       sha256:092lcfc840kg62j7g9p4dy807b204nmgan8x1fiyg6vnix1ffyq8
error: hash mismatch importing path '/nix/store/gw04lzck5hp1wkj7sfrxlkk4zzriqq1s-perl5.32.1-IO-HTML-1.004';
         specified: sha256:1i6r47b6fhb8gpp73vjk0fik68q70fw5abl31k2dc1g7xpwzdm77
         got:       sha256:0y89kc0pkk0ibl22c5qbjqvp81vaaaq4cjy1p0fmycvqdpvz8p1l
error: hash mismatch importing path '/nix/store/szqzgsdclhyww9iq6gavs6v5pqns4hj2-libunistring-0.9.10';
         specified: sha256:1gcnvxyhh8g3jp2gl2d9zrmp5m3vhgddzc0yihq17iz8ar9hyb2f
         got:       sha256:1f4yx9iass21g6scn6q82132hhg8r6g4wl5mb4dpxsdbdw6xsm0i
error: hash mismatch importing path '/nix/store/i3ibpx67yncp4w4mpkf5pwvjjsd0aqln-bootstrap-tools';
         specified: sha256:04hma6x4y5lffi9gzsjgq7b87yadr01vjdng8xy9zrb0rf95kfwg
         got:       sha256:0hb7fazqa9zplfxkgsg5swq7l4zb4bgyac4svcaqk7kjhcjbgbgy
error: hash mismatch importing path '/nix/store/1xdfsfpavr4f717h6w7jl822m3cq03i4-perl5.32.1-LWP-MediaTypes-6.04';
         specified: sha256:0nd6fgsi30hbz34zkygnx9ybgbxnpapbjb3a9kyq7fywahplb7vp
         got:       sha256:034cvb199mdfnh09xhsvl4c0g9ryx046wa6cj7ffj06al12i3r69
error: hash mismatch importing path '/nix/store/4sm7mky4m4y4fx1rrwv3m8hjvr9l1gk6-perl5.32.1-Sub-Uplevel-0.2800';
         specified: sha256:03ild4sf9rjnyn307ak99y6p37wis87cih32p274wbdrkg0pp70r
         got:       sha256:0bjzcx896vz92iyi39vw5p3hg631zcjy00rzmgrrm0ax8rassrz1
error: hash mismatch importing path '/nix/store/qrkbpgmc6s23a7s6h3wqiblnr5whl96l-glibc-locales-2.32-46';
         specified: sha256:0lfw3y7brrpz19aakcw1lzwdn7ir1cy44rl5dczajsx3ksav90d7
         got:       sha256:1iiry50a166lv4lyxh3w7qjdspvsq9fxhnsj9iqhbmdqimhz4bra
error: hash mismatch importing path '/nix/store/w6q66aw493sxlpikq5y6zdcri9qlmmb5-libpthread-stubs-0.4';
         specified: sha256:0bifc5f1qhvqqr65wz3b0c9k8gn0rdp5b6jmcs76gkn8psqyczn4
         got:       sha256:05klni0ryji2h7j120vlcw8hwilja709chzq9r916gmplf2b5jr8
error: hash mismatch importing path '/nix/store/i3ibpx67yncp4w4mpkf5pwvjjsd0aqln-bootstrap-tools';
         specified: sha256:04hma6x4y5lffi9gzsjgq7b87yadr01vjdng8xy9zrb0rf95kfwg
         got:       sha256:0hb7fazqa9zplfxkgsg5swq7l4zb4bgyac4svcaqk7kjhcjbgbgy
error: hash mismatch importing path '/nix/store/szqzgsdclhyww9iq6gavs6v5pqns4hj2-libunistring-0.9.10';
         specified: sha256:1gcnvxyhh8g3jp2gl2d9zrmp5m3vhgddzc0yihq17iz8ar9hyb2f
         got:       sha256:1f4yx9iass21g6scn6q82132hhg8r6g4wl5mb4dpxsdbdw6xsm0i
error: hash mismatch importing path '/nix/store/4sm7mky4m4y4fx1rrwv3m8hjvr9l1gk6-perl5.32.1-Sub-Uplevel-0.2800';
         specified: sha256:03ild4sf9rjnyn307ak99y6p37wis87cih32p274wbdrkg0pp70r
         got:       sha256:0bjzcx896vz92iyi39vw5p3hg631zcjy00rzmgrrm0ax8rassrz1
error: hash mismatch importing path '/nix/store/sb9i9561wkrd700y4dr0kba6siv943q2-perl5.32.1-Test-Deep-1.130';
         specified: sha256:10qzlh6wrl10d1ykx4ivcskdpb8wfi7ij24y0bpp95x4iixkj7rq
         got:       sha256:1lscz50cvwfv0w963x94axw0kmx69gwklszwiha0hmqvdfbqg5id
error: hash mismatch importing path '/nix/store/sd36wimf8wqkzs0qga74cigxb6ggbwlk-perl5.32.1-Test-Needs-0.002006';
         specified: sha256:0129wm9sslmadw5r1gnckh46h6xz98572p2x31fv2q674vqlmfcn
         got:       sha256:1fcpvj8hqjszynz91mznil82dqmgpnszba4f1jq8gs3cjdxmskjx
error: hash mismatch importing path '/nix/store/5diqwbbp7dqi8d6321j1n7anf5wg2gcc-perl5.32.1-Test-NoWarnings-1.04';
         specified: sha256:0d0h2frv3qssw7qrrfw3a1f2zf58q7258sy89b1xcd1iivbzzydf
         got:       sha256:1mmm7wsazrf92wyzn6picg4glxxj650d9kavvlmn1sv7ddn2hg69
error: hash mismatch importing path '/nix/store/7l79fas729lcm4xg4a662bfhir19m2hq-perl5.32.1-Test-RequiresInternet-0.05';
         specified: sha256:0y3vw69pw4lhmvy8197g96jbqw0zrqnw35kp2dq1l9i6jz96cnql
         got:       sha256:05n106knschh6hdzfhs70pzg7ka1jxi36231bmyyp8nnnzk13cmb
error: hash mismatch importing path '/nix/store/4xirz1drc429bg678758y546bxvsj9zw-perl5.32.1-TimeDate-2.33';
         specified: sha256:04yid67jqvy4bqzsbhypvz800rb3ps88pqznv7sgmy35v774bq8s
         got:       sha256:1fh6v8m962vwb938kdf4s28vjx7qrn2wjphhrb6kcp9hd0l1gcdj
error: hash mismatch importing path '/nix/store/i3ibpx67yncp4w4mpkf5pwvjjsd0aqln-bootstrap-tools';
         specified: sha256:04hma6x4y5lffi9gzsjgq7b87yadr01vjdng8xy9zrb0rf95kfwg
         got:       sha256:0hb7fazqa9zplfxkgsg5swq7l4zb4bgyac4svcaqk7kjhcjbgbgy
error: hash mismatch importing path '/nix/store/szqzgsdclhyww9iq6gavs6v5pqns4hj2-libunistring-0.9.10';
         specified: sha256:1gcnvxyhh8g3jp2gl2d9zrmp5m3vhgddzc0yihq17iz8ar9hyb2f
         got:       sha256:1f4yx9iass21g6scn6q82132hhg8r6g4wl5mb4dpxsdbdw6xsm0i
error: hash mismatch importing path '/nix/store/svhrf6ws0ff5vxs23x0fs175w1fjzg8n-perl5.32.1-Try-Tiny-0.30';
         specified: sha256:1zc5nvrvawn4c420hnyac7fa375rzn598avs6qwb6z2bbb46399k
         got:       sha256:07kwyf9nmabhi2y4sakg1i9clx83fhvvyy154nzx9pjndbah14qc
error: hash mismatch importing path '/nix/store/04qhx240mazv9ighyf9mzjying0wfb6g-perl5.32.1-URI-5.05';
         specified: sha256:0qwp2dg9bwx0lbbx5hnc3vqhbhpkwq3xd3kjm0ajrj5f7vrbc092
         got:       sha256:0fdd80545wffi0hgmgp9wm3ysrwmrmmvqna69i5q736gzw46cb0f
error: hash mismatch importing path '/nix/store/ya3srk77jzxs978k9hyiac6hbfb0wkn5-perl5.32.1-XML-NamespaceSupport-1.12';
         specified: sha256:1zfa646kcp151nqb4lg7b635bcmsmvnc9scc0i1xgjr4yzysfwki
         got:       sha256:0pd612b03mpq0qs0nb0scc78mmv5iz702qgfhbis8xqfbsb6lf4s
error: hash mismatch importing path '/nix/store/szqzgsdclhyww9iq6gavs6v5pqns4hj2-libunistring-0.9.10';
         specified: sha256:1gcnvxyhh8g3jp2gl2d9zrmp5m3vhgddzc0yihq17iz8ar9hyb2f
         got:       sha256:1f4yx9iass21g6scn6q82132hhg8r6g4wl5mb4dpxsdbdw6xsm0i
error: hash mismatch importing path '/nix/store/la3prlqmx650xlsdbca1aiyb0qd7idar-perl5.32.1-CPAN-Meta-Check-0.014';
         specified: sha256:01i8ilwlkz404l4j78x89vyavd4ixpwrnmy4x90wy276rxy9sl4n
         got:       sha256:05l0dkz4q2ybkhgzi1wyr73xljd53hf5b6zm6qiagrxj9q309hvj
error: hash mismatch importing path '/nix/store/9d5ci2x9zgjdsymqdvzyfz4bjapwyjd4-perl5.32.1-Capture-Tiny-0.48';
         specified: sha256:1pyi107s3blkcnivk0ahbknk4g4gx8zix9i4vf0il0r7z9pi956z
         got:       sha256:0kl8qq2dl0nr7z26vkkacccssfrx855hwca3rfjlw1bzslplnjnp
error: hash mismatch importing path '/nix/store/29plagljzijhq9lgglng3plw5qry7gii-ruby2.7.3-afm-0.2.2';
         specified: sha256:1qcdgscdjjbarqij579n6x3m0y53jfw6wylhw47yx24xdpzrsizh
         got:       sha256:0zp3sq6hq2f14s2v65qp98gp2k54dmk93hb21mbfj7i3kivsvwd3
error: hash mismatch importing path '/nix/store/qzwqmr6dacq1y7n6qxiwwcrs5ginv03w-ruby2.7.3-asciidoctor-diagram-ditaamini-0.13.1';
         specified: sha256:103r0qxig0dxzw6qc65zf4lqidf37aikkffa30jpd5l8zpxy6083
         got:       sha256:1zxyvj72qrncqgarlbxxg0nv7jcx60jf0718as611lpb3ach94bp
error: hash mismatch importing path '/nix/store/szqzgsdclhyww9iq6gavs6v5pqns4hj2-libunistring-0.9.10';
         specified: sha256:1gcnvxyhh8g3jp2gl2d9zrmp5m3vhgddzc0yihq17iz8ar9hyb2f
         got:       sha256:1f4yx9iass21g6scn6q82132hhg8r6g4wl5mb4dpxsdbdw6xsm0i
error: hash mismatch importing path '/nix/store/77dv93279m1wqxn1h91qjs414vwj1mwx-ncurses-6.2-man';
         specified: sha256:1nxzmksndxi4advwv8502xdj9qpgd3j8w5im7r459kwpb1r36yxa
         got:       sha256:0h71wk31cq3g1v9fgy7lgqv0fv7sbsy09yzgp532w9wsvzwa95qj
error: hash mismatch importing path '/nix/store/k6yn68dkmfqi4fb75s43lqql31xa3vs7-ruby2.7.3-hashery-2.1.2';
         specified: sha256:0zw4irpp5px760xn6a2xmf6h853hdk80c1xhc0giimx9cm5jx5ks
         got:       sha256:0dbs4rzd0yx839406hs946zkjj9fwaa4f5jwv31lw9jzz008lk7v
error: hash mismatch importing path '/nix/store/szqzgsdclhyww9iq6gavs6v5pqns4hj2-libunistring-0.9.10';
         specified: sha256:1gcnvxyhh8g3jp2gl2d9zrmp5m3vhgddzc0yihq17iz8ar9hyb2f
         got:       sha256:1f4yx9iass21g6scn6q82132hhg8r6g4wl5mb4dpxsdbdw6xsm0i
error: hash mismatch importing path '/nix/store/yyc11jqvfyaj9rdgs4dz7l35fvgbccnn-ruby2.7.3-concurrent-ruby-1.1.8';
         specified: sha256:0jkd9iyjll27vhxlvkjkx40d0cfq1jllm2kzj517qxbphf0cqp93
         got:       sha256:0sll328qbipm9n8bb4vyxm8ph2bllxia3ki0cajwa5k9a9nz9jv9
error: hash mismatch importing path '/nix/store/282sk1n3spxva3y2m1w2163nzr0f30yh-ruby2.7.3-mime-types-data-3.2021.0225';
         specified: sha256:0dfn1sg98y1c1z02a0wak5cvprik1zqdjypyfnnshix8sav8p7j0
         got:       sha256:1qrn9kkfgfjwm42njiv5s82pww1b7p1wk0ckapbwz40vpr8fyjkv
error: hash mismatch importing path '/nix/store/xfdjbvfna8ai2dp3a3470rk2022vw9ya-ruby2.7.3-asciidoctor-diagram-plantuml-1.2021.0';
         specified: sha256:0lsqakayy6g8fb3giqdispwgbpagb0zl9pxnbx1xvg7h46hwq8a8
         got:       sha256:0pyk9zdc08ahdwpcmr31ajgfy1bgna59y05r8q5llp0fn9l27k1b
error: hash mismatch importing path '/nix/store/wrpyjr4na8qz030ammbbfiyjd2dfawdh-ruby2.7.3-pdf-core-0.7.0';
         specified: sha256:00dmysp1mpa159269cfzn8lkyjr2mhhl9k6x1q4fgpqs5x7wm5bz
         got:       sha256:1rsgzbsc9kwhk6aisc8jbliwcxnllj52zyr8c401j3f33rhaiw8f
error: hash mismatch importing path '/nix/store/y145xcasjcrd80z91zkcjc760cbk0xl2-ruby2.7.3-polyglot-0.3.5';
         specified: sha256:11fckgwrw96zrak1iizyni2146w8dypwys48f9ilmp26ncrgh92a
         got:       sha256:1jmhyn0hhk9lf8339ri0bqy6myfyympgcmbid2886vyw15ghf3pd
error: hash mismatch importing path '/nix/store/9lp61b6a6kmirf3r5qx0qcpris0zv3q4-ruby2.7.3-pygments.rb-2.1.0';
         specified: sha256:174zcqk2iwplggw53sa5d5kfrgkpa11fy093rv29fxr0mmip6g59
         got:       sha256:0aihhj64vnmrvi486q8wckbvhchmfpq61jqlpp4cjpp2iwmhmpz2
error: hash mismatch importing path '/nix/store/scqpfp65yskgr1f4k6k5ja8hp7vkic37-ruby2.7.3-rexml-3.2.4';
         specified: sha256:0hm5qgijjx8vpza6ss9xq6915ja4sn6z2gg9chfl3djk1hrkbglc
         got:       sha256:0w2hkpw3y1nj1304vj5q6a0zn3zmzkw3d6csrraaq4r6l1nj4311
error: hash mismatch importing path '/nix/store/qpycahjgb7lzidqbpzadkql7wnryzrrx-ruby2.7.3-ttfunk-1.5.1';
         specified: sha256:1x3k9ajf8krh9mbrpxnjqhf1mafk13dg1xvi15l7pww5y7sy0fdh
         got:       sha256:0rsv5xzyl9yr02mk3sq7d9ycpanp9l3brvlkv069vwlhfdppc8z0
error: hash mismatch importing path '/nix/store/6z4qb7spjhhnbpzvlrvx1zxdyv31z3i9-xcb-proto-1.14.1';
         specified: sha256:0hrdp0sxbchyhc8va69g36kg5nnsbjwhbislbcaal9mw14bq70fx
         got:       sha256:18w8yqzl7ak9rvnzlmjd9nkvb2hrn3z7wl42b1ac6piic2n1nm9d
error: hash mismatch importing path '/nix/store/6i9zj90x1n4ailf9z2wrd6ylrvjrsqcb-xorgproto-2021.3';
         specified: sha256:028z8ih389wrg193ynldwl1zxk6pj85vc72xczv0yiksklwcyc8d
         got:       sha256:05png43x47bvz43jn8dv9n26w9w2wbjr6pffb8b50366811fsgjl
error: hash mismatch importing path '/nix/store/k3gglsxrd6z4ibr6254lnnxfjlcfc1mb-xtrans-1.4.0';
         specified: sha256:0y4z9ayja462xj0cfl3brpqy2igg0sg06njr8ai9cpxmyvzfsz3c
         got:       sha256:1lakdr2l9kbwmnwr10cp68isz2iq98x5cq3j2579442yy8cvb7gq
error: renaming '/nix/store/0jm3z9kbqg9bc5bxhlbsn8fi5ydzyn14-bootstrap-tools.drv.chroot/nix/store/4rl8f57jmbvi4fa8862cxlmxr65xjxzg-bootstrap-tools' to '/nix/store/i3ibpx67yncp4w4mpkf5pwvjjsd0aqln-bootstrap-tools': Directory not empty

Running nix-build --experimental-features 'ca-derivations ca-references' -A bash yields an error in my nix-daemon nix-daemon: src/libstore/sqlite.cc:92: nix::SQLiteStmt::Use::Use(nix::SQLiteStmt&): Assertion `stmt.stmt' failed..

Is this known or should I open an issue about it?

Edit: I think I know what is the reason for this. If you only activate experimental features for nix-build and not your nix-daemon. This should be handled more gracefully in my opinion.

@thufschmitt anything I can do to help or get help with my “hash mismatch” issue?

@bbigras This looks like [CA-drvs] Nix fails to remove directory trees · Issue #4858 · NixOS/nix · GitHub. Does your Nix version include Remove a possible existing store path when building CA derivations by thufschmitt · Pull Request #4928 · NixOS/nix · GitHub ? If it does then yes, please open an issue

1 Like

@Sandro My guess is that your daemon didn’t have the ca-derivations experimental feature set when you started it, causing some internal inconsistency. I’ve opened #5017 to see what we can do about it as it’s at the very least a bad error message.

1 Like

Actually this doesn’t explain the “hash mismatch”. Looking at the log snippets, it looks like you’re fetching stuff from a binary cache. So that might be related to Make the Nar hash non modulo by thufschmitt · Pull Request #4849 · NixOS/nix · GitHub (in which case there’s not much to do except rebuilding the cache)

I’m actually planning to build a NixOS Vm-expression where this can be reproduced by @thufschmitt (I had the same issue), but I got far too busy this week, so it may take a few more days :slight_smile:

1 Like