Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nix-env -i fails in latest nixos/nix Docker image #5777

Closed
tristanpemble opened this issue Dec 14, 2021 · 16 comments · Fixed by #5787
Closed

nix-env -i fails in latest nixos/nix Docker image #5777

tristanpemble opened this issue Dec 14, 2021 · 16 comments · Fixed by #5787
Labels
bug docker regression Something doesn't work anymore
Milestone

Comments

@tristanpemble
Copy link

tristanpemble commented Dec 14, 2021

the latest version of Nix fails on install of any package in the latest nixos/nix Docker images running v2.5. seems to be related to #5391

docker run --rm nixos/nix nix-env -i hello

installing 'hello-2.10'
unexpected error in download thread: error: unsharing filesystem state in download thread: Operation not permitted
warning: download of 'https://cache.nixos.org/nix-cache-info' was interrupted
these 169 derivations will be built:
  /nix/store/b7irlwi2wjlx5aj1dghx4c8k3ax6m56q-busybox.drv
  /nix/store/bzq60ip2z5xgi7jk6jgdw8cngfiwjrcm-bootstrap-tools.tar.xz.drv
  /nix/store/0zhkga32apid60mm7nh92z2970im5837-bootstrap-tools.drv
  /nix/store/34vpnpik7b1fb91gwv8pfw7s7v8yir01-gettext-0.21.tar.gz.drv
  /nix/store/8mg6zjhc5fbms6nm3snd41galx63ijhw-xz-5.2.5.tar.bz2.drv
  /nix/store/b550kvx7kg32hkxxf826bsl0nikhxr01-patchelf-0.12.tar.bz2.drv
  /nix/store/52kdp6c57jha5nb3aq2ndfjbhibd63bk-bootstrap-stage0-stdenv-linux.drv
  /nix/store/8s00f4rxm2zgmrzyi1i0m9wrn4mzdmcl-bootstrap-stage0-glibc-bootstrap.drv
  /nix/store/ga8svdn1iaf94vyrjwf6vn0bib7fabx7-bootstrap-stage0-binutils-wrapper-.drv
  /nix/store/3wkr201xq1k2zd4v741xcgigsdxdyj54-bootstrap-stage1-gcc-wrapper-.drv
  /nix/store/13fd0d4vch5gqm9ppi13yagbzv69687i-bootstrap-stage1-stdenv-linux.drv
  /nix/store/y87babk8jipsdynhb9sd9jbqlkyp670g-zlib-1.2.11.tar.gz.drv
  /nix/store/0m59h1gm832fgi6wnpifyyapb6wbzby1-zlib-1.2.11.drv
  /nix/store/7x9q5qdd27aljvvrnrvabb6h6b0sh082-01-fix-ftbfs-with-glibc-2.28.patch.drv
  /nix/store/w82bmsq3lbczpnvqr82dhj50igar0k6g-m4-1.4.18.tar.bz2.drv
  /nix/store/5kmqj01z7a661h8j845bqcwix3d57hfh-gnum4-1.4.18.drv
  /nix/store/qkfac3pcf3lhs730afzs49y53vbis1xk-bison-3.7.6.tar.gz.drv
  /nix/store/vkc1aycga83ni729dvyvwad50annhlid-perl-5.32.1.tar.gz.drv
  /nix/store/slfd9nm98zan5y99k36mk0dzmydl6y53-perl-5.32.1.drv
  /nix/store/1c1mm4kw1rz5jjdx1vw1k19xrfnvcd40-bison-3.7.6.drv
  /nix/store/xx8c83n2qac0kxiqkxlwlcrhgaaaibm0-xz-5.2.5.drv
  /nix/store/1da97w1h5jfjhc4wfn43w8pxzrkah4r1-gettext-0.21.drv
  /nix/store/hd3ajzairvilig9hqgwqsj1s34q01n1w-binutils-2.35.1.tar.bz2.drv
  /nix/store/5bz70pp9hwhmlmiya3r49fgzmnrs4xqj-texinfo-6.7.tar.xz.drv
  /nix/store/ihzy99hjnfc4zbvi64xpzsb39464r4iw-texinfo-6.7.drv
  /nix/store/kq2paa23msawvr7zkx2k4dbzycycba6l-binutils-2.35.1.drv
  /nix/store/qwaiggg6isy9379hviiwaya0x6jinmz2-expand-response-params.drv
  /nix/store/sjm9kx7n0ydyn3gld9z6a9w1hvqwifas-bootstrap-stage1-stdenv-linux.drv
  /nix/store/27ql8bh9bach8z4ddzplnm4vmnlkavhp-binutils-wrapper-2.35.1.drv
  /nix/store/v3vy850wbg43m8lbjx5nky834pp2vr26-bootstrap-stage2-gcc-wrapper-.drv
  /nix/store/j5l7j81hqhp8xrvjvjgaf7fj5wnkb4f2-bootstrap-stage2-stdenv-linux.drv
  /nix/store/dkfvki1g3k9yljsh9kq6aii2qbwhp1g7-patchelf-0.12.drv
  /nix/store/1zi0k7y01rhqr2gfqb42if0icswg65sj-locale-C.diff.drv
  /nix/store/lymvfnrc79jym216rl2byzihcn8j1s1m-linux-5.12.tar.xz.drv
  /nix/store/zk4x0si0cblyyivl7k5zmvi1jhcy8qfk-bootstrap-stage2-stdenv-linux.drv
  /nix/store/6wwlaa9d1pixw1y6c9dqaplpak704kkg-linux-headers-5.12.drv
  /nix/store/8fm1xkjq69i4a4ramgr14826zjmam2rh-automake-1.16.3.tar.xz.drv
  /nix/store/c99ihlhb2lh875spzsl6rnc4058grxvn-autoconf-2.71.tar.xz.drv
  /nix/store/m68a0gwv3112bad0nhzxbfizglc5565q-autoconf-2.71.drv
  /nix/store/as4h2lbvxl33y5ycpak5i73bagjf460a-automake-1.16.3.drv
  /nix/store/66ax27y1bdpfc4iybp3n06y1c4hvks1s-xz-5.2.5.drv
  /nix/store/mm45dc212wxhbv245mxlqmqksb843qfa-gettext-0.21.drv
  /nix/store/0pc18b91az604bmggly2891hgrjd9qbf-libtool-2.4.6.tar.gz.drv
  /nix/store/2nwmylx1p33hp3lvj7vg20h4dkmisgc9-perl-5.32.1.drv
  /nix/store/hk19faaf864dd1lms8jfk6zf8pzvfpms-help2man-1.48.1.tar.xz.drv
  /nix/store/kf2lcp7fx5s8qsk7ls2ci8gp0m1nqnxj-gettext-1.07.tar.gz.drv
  /nix/store/i6dkmczxbjdayxq5cdlxc0vacw4d4bqk-perl5.32.1-gettext-1.07.drv
  /nix/store/81wynrbybznmss33xhciy6ncvr3shfjv-help2man-1.48.1.drv
  /nix/store/yrk6p287glhk9cn6v6x15m0117zb22jh-libtool-2.4.6.drv
  /nix/store/1jh0nh1i3cvl3vxxa2ywzfjpmlx75z4s-hook.drv
  /nix/store/1nk3bpnfyqcimsisbq0jq3rlh34gfaw8-nuke-references.drv
  /nix/store/5zzya86a10chk9r0w1gv8b4c2yppgs92-python-setup-hook.sh.drv
  /nix/store/dfp7j0rnnzn17g3yw5yh70nw3y6jjjng-Python-3.8.11.tar.xz.drv
  /nix/store/pky1gmrqjv5x8rm0lizqdpf6vb780igi-expat-2.2.10.tar.xz.drv
  /nix/store/m9gkcvkcrihwm84zi610flaawcr4qljs-expat-2.2.10.drv
  /nix/store/58y89v7rl254dc2cygcfd5wzhv0kjm4m-bash44-013.drv
  /nix/store/bkhp2l6yxbziq265a77v60v0s68494ba-bash44-018.drv
  /nix/store/bwpr6g17bq0j17r5d4isxahhxn52cnnr-bash44-019.drv
  /nix/store/c8svmxmwjkzvwszy8ga7x2fwx0qbmm10-bash44-001.drv
  /nix/store/djmmx28jvbngp9wa15z4xasllaaqd1z0-bash44-004.drv
  /nix/store/f30binazxhx8g0xkiav6lglp29h4a164-bash44-002.drv
  /nix/store/fgg03wqpa11paihmbxc3dfqxhqgf10bi-bash44-007.drv
  /nix/store/ghyy9947nssi1vn8m6h0giik5sxgbvww-bash44-006.drv
  /nix/store/gk0dvdga6634xw6sy9ajyb381qaczdrd-bash44-017.drv
  /nix/store/ip70l59j1w6lfmi0fx02lmzjr2rahlgv-bash44-009.drv
  /nix/store/kpr5qx791p55y7kgbypw230nqp673fya-bash44-005.drv
  /nix/store/l42vs1awqpx8pf681fql357s3pa8qqk3-bash44-011.drv
  /nix/store/lx3frlxywbvvr9823sxqp07jlfniib9p-bash44-008.drv
  /nix/store/m5j1yp47lw1psd9n6bzina1167abbprr-bash44-023.drv
  /nix/store/myfzvw3m2fzg7r3xkzr15c0flbc9mxiq-bash-4.4.tar.gz.drv
  /nix/store/n1qz6fhb4fkz0i5f9sl6f1vqyrlnaiqv-bash44-016.drv
  /nix/store/n3g29b5ha33ssq0v79gsf4vd198vj5r3-bash44-015.drv
  /nix/store/pxjkwfqmn0hmzjqgbsh5j31wrqflhxbf-bash44-012.drv
  /nix/store/q8hxz4f402ps0vwhj3sgfyp6x0ss35sv-bash44-003.drv
  /nix/store/r4lwjq1nvwpaqabaaj5bv001xxfj4ziq-bash44-010.drv
  /nix/store/xadh3b1m14451ky8c8a297063nzrf1zn-bash44-020.drv
  /nix/store/xs5c12bzf9vrrniscd53p2j9vkmvww2p-bash44-014.drv
  /nix/store/z4ym1w4ssi236w2i6nsf7ba0s5ji9hd9-bash44-022.drv
  /nix/store/zr7jikfinzgh6k2b10zp9jmfg4gv7za0-bash44-021.drv
  /nix/store/qy4knip8wglyg4ryc8di5p4y4rvsqly0-bash-4.4-p23.drv
  /nix/store/r1wgrfpgnrb8x8k7s1d21h69mhvlkhv8-zlib-1.2.11.drv
  /nix/store/vd1qyrzvbchgflbgrf3y588k5af0d7mj-libffi-3.3.tar.gz.drv
  /nix/store/zk1k94pxizka2k0p6yfpgqfz7xd4d9wk-libffi-3.3.drv
  /nix/store/806qrynji7s8dayqd5gzqxk5s7816nyw-bzip2-1.0.6.0.2.tar.gz.drv
  /nix/store/zsqgm906fzza65k0gac5phxc98v0n620-bzip2-1.0.6.0.2.drv
  /nix/store/bgkrnppf5h8dmvlmsv5z75z871wfrb4z-python3-minimal-3.8.11.drv
  /nix/store/l5zr5m1agvvnic49fg6qc44g5fgj3la1-glibc-reinstate-prlimit64-fallback.patch?id=eab07e78b691ae7866267fc04d31c7c3ad6b0eeb.drv
  /nix/store/vpz8r54w9rh6cr7c840yczh1bp7m9rij-glibc-2.32.tar.xz.drv
  /nix/store/pbr1lfx5w1qm6pyzyqdn4kg6jph9hmaq-glibc-2.32-54.drv
  /nix/store/ikdaqc9ncgbqycvc311jz1wdyg1fww64-binutils-wrapper-2.35.1.drv
  /nix/store/lg85gf5z1idh7phrmgqplr85qqjlyb7x-expand-response-params.drv
  /nix/store/v7g3wdd8gf622i59j3bznaiv9gw618ff-bootstrap-stage3-gcc-wrapper-.drv
  /nix/store/v54ks7zfd0nfj822ir1pbi8mrszc1wpp-bootstrap-stage3-stdenv-linux.drv
  /nix/store/afvcnvh1qrd389b8glyz5qrnk6vfyp3n-xz-5.2.5.drv
  /nix/store/00k50a4x73rl43r8xzqp9vmqn00pvk3v-gettext-0.21.drv
  /nix/store/01n3wxxw29wj2pkjqimmmjzv7pihzmd7-which-2.21.tar.gz.drv
  /nix/store/099dmhaghfpjvywpn2iwbsap0z90zjg3-lzip-1.22.tar.gz.drv
  /nix/store/0awx519k5gn2km1qk27hi0g1vrq0bzpa-bootstrap-stage4-stdenv-linux.drv
  /nix/store/7c8fayg7fwfsx2sbi5jxg5pyrzdmryi9-zlib-1.2.11.drv
  /nix/store/ahkdrcpafzgxk2z80n65ll1x9f5slqn6-which-2.21.drv
  /nix/store/a5alapfd1s4rf9dbwb1h0mhlvanl3qvz-gmp-6.2.1.tar.bz2.drv
  /nix/store/dshdjj8sr0vp2rpvc24jf89jpi5593g5-gmp-6.2.1.drv
  /nix/store/mksyw0bf46w7q8rb9202n0g7fpkhxfcf-isl-0.20.tar.xz.drv
  /nix/store/dm2iwk7ydvkwis3kb2hw958i4lpz518n-isl-0.20.drv
  /nix/store/lv1hwcmry75256awiysfa7mb93a0c49c-mpfr-4.1.0.tar.xz.drv
  /nix/store/gr4asjj26idp1icnjqi0yjpkwnv5zy18-mpfr-4.1.0.drv
  /nix/store/7r3b56dqf8jy4qd922i8ziisrn6ijikr-mpc-1.2.1.tar.gz.drv
  /nix/store/nv35cmh49ghzjlwqbx9qr2qp9x8575hf-libmpc-1.2.1.drv
  /nix/store/5s87b3i5xfdd1mrl2haavfjrzfp4w4zf-libelf-0.8.13.tar.gz.drv
  /nix/store/qim5fi7z17rjf93cmxhlfk6qm0lkj3a1-libelf-0.8.13.drv
  /nix/store/slgzqc5n8khqjzps5gvz2fjr9lv3x3kl-gcc-10.3.0.tar.xz.drv
  /nix/store/yqx558d498f7wsmzr9w7qy6n6q5pz8yd-texinfo-6.7.drv
  /nix/store/8rdcm5mf6snp7wavm3ipc5jqqyd02gxp-gcc-10.3.0.drv
  /nix/store/a8p2byncr2k6wwwyc8f4wmimwrgrhxv1-expand-response-params.drv
  /nix/store/7d10rw95r8hrdfkzghf1g0hag1kyfwnw-bootstrap-stage4-gcc-wrapper-10.3.0.drv
  /nix/store/ljq2ll0jvkk8wj2cm8ip53xyk9qmyvyc-bootstrap-stage4-stdenv-linux.drv
  /nix/store/yf5dx1z2vzm76kqsifmj0yx32380bmsx-binutils-2.35.1.drv
  /nix/store/a5r5nbwzjj6v7rrmmjw9y67j4zv1jmf5-binutils-wrapper-2.35.1.drv
  /nix/store/841kb5glr8nis7cfm874if9bjmbcqwlh-gcc-wrapper-10.3.0.drv
  /nix/store/cnh3rigjsk9vfismiz6cjx3qf6g0pipz-sed-4.8.tar.xz.drv
  /nix/store/9lxqgzrl2iyysw156bkhj680kqff5yb6-gnused-4.8.drv
  /nix/store/k1l64ys6fwrcb1cfjcdfap4mh6f7acgj-lzip-1.22.drv
  /nix/store/nhijiwk3zpwd9yb7a9c59hnxg6bi4cp6-ed-1.17.tar.lz.drv
  /nix/store/cplq5kll0c4p920pk24k8vs4y6m8s3sk-ed-1.17.drv
  /nix/store/d4ldrmk64a56yhmh4w72r81jwd3yx991-patchelf-0.12.drv
  /nix/store/angvcbhbr5p8viv4zphsxxx5nl4zr1hi-patch-2.7.6.tar.xz.drv
  /nix/store/wdj164cg2a29iracdqxsnnxh2lbmz6sv-autoconf-2.71.drv
  /nix/store/aj2lmyg5g1dif30cv0a5hgs17fq1alyw-automake-1.16.3.drv
  /nix/store/byyanykp7l6cpwpmq1n9jplrpp8qdws1-perl-5.32.1.drv
  /nix/store/dkf6dr5xrigasd2ab1l7ab6as43s2z6q-perl5.32.1-gettext-1.07.drv
  /nix/store/xawmvq50y2mjx5j3w2gk84xj2n0r4p8n-help2man-1.48.1.drv
  /nix/store/5zb6wlbjhx8rakb5bs7xplnn7jh7flxs-libtool-2.4.6.drv
  /nix/store/icqfcs5w0abl0nhlmp9pi182mn8r21ng-hook.drv
  /nix/store/ggbif06x8rzbpr9qvc7rghb95mw8khl6-patch-2.7.6.drv
  /nix/store/p3pp8dzddar0yzl338zs155gi93dvj44-bzip2-1.0.6.0.2.drv
  /nix/store/ns2lgxa4f77pzylam18b31p5pk8qp8r2-diffutils-3.7.tar.xz.drv
  /nix/store/wp9axydpm4bbn3lji94zvqg6427lq529-xz-5.2.5.drv
  /nix/store/qa7d9ddhd7xcym1zblnjz6y3ds2js4sq-diffutils-3.7.drv
  /nix/store/ar36yc5fjkw282biprp46xizbpg102dy-gawk-5.1.0.tar.xz.drv
  /nix/store/qxr70926m0lqpwk91jn8vkgwbva1wrlx-gawk-5.1.0.drv
  /nix/store/jrxmi74200w7l24h0a6i99h2ck3f4r7m-make-4.3.tar.gz.drv
  /nix/store/sizg1h8c50qkrf29ljzglyl02r5fd927-gnumake-4.3.drv
  /nix/store/s4753m2grvl14g0rqh1m0l73khkvcfkv-stdenv-linux.drv
  /nix/store/243cx9j456mrmxx76hpmjf2zbn905vzd-mirrors-list.drv
  /nix/store/6b29gjz7rj4mw0ch0vy2m6qrqipz2bbb-pkg-config-0.29.2.tar.gz.drv
  /nix/store/dbg4ilab4zwa84s8pd9i2lgcay8jr0yh-stdenv-linux.drv
  /nix/store/x4grcgklzj660dfd57yhps7y8xql19ps-pkg-config-0.29.2.drv
  /nix/store/3bdwg6jcilcxaj59pyggrlrjfad4cjgb-pkg-config-wrapper-0.29.2.drv
  /nix/store/6v3wc7dqwsvjkpvj11xkv4k4j99s0nc7-openssl-1.1.1l.tar.gz.drv
  /nix/store/bvjjdqid3590hkbszlm81ppwrbk9zjaa-coreutils-8.32.tar.xz.drv
  /nix/store/m30saky9w2q99wrsf0fggyqgmr3jd7ba-coreutils-8.32.drv
  /nix/store/f0cb4h9gslj6k88lyc84hxjr72zpd982-openssl-1.1.1l.drv
  /nix/store/f450ks5xaq790h43nc5r78x69cr4721q-Make-build-reproducible.patch.drv
  /nix/store/lkkzb8ybhp5jjgvb04b13n68i51lxwd9-keyutils-1.6.3.tar.gz.drv
  /nix/store/q7fxyld3klakjncqjwmmfj89gh7qjazg-keyutils-1.6.3.drv
  /nix/store/sb0c68gmrd26pksk4rz8c81ay27n4q05-krb5-1.18.tar.gz.drv
  /nix/store/4975qy0n33k0abs851qzi1vpbc8rpa4v-libkrb5-1.18.drv
  /nix/store/7ky2h80ahnjb83v1cbqha7l4168sc9ck-curl-7.76.1.tar.bz2.drv
  /nix/store/z8wclr7lf6jxxw9909bmsam5pq0ryqpg-libssh2-1.9.0.tar.gz.drv
  /nix/store/9ci5bczigbp89lrm75z708nkdharxibm-libssh2-1.9.0.drv
  /nix/store/a6vp8nwp14wl6vsvlbw7124pba93n58l-c-ares-1.17.2.tar.gz.drv
  /nix/store/gw6593h2gb50sbb5zqfb67iggzq5ci6j-c-ares-1.17.2.drv
  /nix/store/g9m1g9agw4b9minpw647w28xnvnx2n4c-libev-4.33.tar.gz.drv
  /nix/store/x1804ag1mhncf6xgxc3v162dkxr6xsmz-libev-4.33.drv
  /nix/store/zha3nn47i04ls8mc70qcmahxclvyxbkb-nghttp2-1.43.0.tar.bz2.drv
  /nix/store/z7cb81f9nka2s88wrkhrr5x2pz612s0k-nghttp2-1.43.0.drv
  /nix/store/30ymf1w6ayl7q4jph7n5xl3r8b34q6h5-curl-7.76.1.drv
  /nix/store/kqlfs5kfbs8kjfmj6bimg486wvf189gk-hello-2.10.tar.gz.drv
  /nix/store/533q15q67sl6dl0272dyi7m7w5pwkkjh-hello-2.10.drv
building '/nix/store/hd3ajzairvilig9hqgwqsj1s34q01n1w-binutils-2.35.1.tar.bz2.drv'...
unexpected error in download thread: error: unsharing filesystem state in download thread: Operation not permitted
error: cannot enqueue download request because the download thread is shutting down
error: builder for '/nix/store/hd3ajzairvilig9hqgwqsj1s34q01n1w-binutils-2.35.1.tar.bz2.drv' failed with exit code 1
error: 1 dependencies of derivation '/nix/store/kq2paa23msawvr7zkx2k4dbzycycba6l-binutils-2.35.1.drv' failed to build
error: 1 dependencies of derivation '/nix/store/yf5dx1z2vzm76kqsifmj0yx32380bmsx-binutils-2.35.1.drv' failed to build
building '/nix/store/7x9q5qdd27aljvvrnrvabb6h6b0sh082-01-fix-ftbfs-with-glibc-2.28.patch.drv'...
error: 1 dependencies of derivation '/nix/store/27ql8bh9bach8z4ddzplnm4vmnlkavhp-binutils-wrapper-2.35.1.drv' failed to build
error: 1 dependencies of derivation '/nix/store/ikdaqc9ncgbqycvc311jz1wdyg1fww64-binutils-wrapper-2.35.1.drv' failed to build
error: 1 dependencies of derivation '/nix/store/pbr1lfx5w1qm6pyzyqdn4kg6jph9hmaq-glibc-2.32-54.drv' failed to build
error: 1 dependencies of derivation '/nix/store/dbg4ilab4zwa84s8pd9i2lgcay8jr0yh-stdenv-linux.drv' failed to build
error: 1 dependencies of derivation '/nix/store/s4753m2grvl14g0rqh1m0l73khkvcfkv-stdenv-linux.drv' failed to build
error: 1 dependencies of derivation '/nix/store/533q15q67sl6dl0272dyi7m7w5pwkkjh-hello-2.10.drv' failed to build
@expelledboy
Copy link

Issue with latest image, downgrading to last tag works nixos/nix:2.3.12

@Gerschtli
Copy link

Running it with 2.4 should also work because the change mentioned was introduced in 2.5

@garbas garbas transferred this issue from NixOS/docker Dec 15, 2021
@garbas garbas added the docker label Dec 15, 2021
@garbas
Copy link
Member

garbas commented Dec 15, 2021

I can confirm that this also happens with 2.5.0 docker image.

@tristanpemble tristanpemble changed the title nix-env -i fails nix-env -i fails in latest nixos/nix Docker image Dec 15, 2021
@vdovhanych
Copy link

Docker image seems to be completly broken for us. With the latest image I'm unable to build anything as it fails f.e on launching nix-shell

[+] Building 0.3s (10/15)                                                                                                                                                                                         
 => [internal] load build definition from Dockerfile                                                                                                                                                         0.0s
 => => transferring dockerfile: 37B                                                                                                                                                                          0.0s
 => [internal] load .dockerignore                                                                                                                                                                            0.0s
 => => transferring context: 34B                                                                                                                                                                             0.0s
 => [internal] load metadata for docker.io/nixos/nix:latest                                                                                                                                                  0.0s
 => [internal] load build context                                                                                                                                                                            0.1s
 => => transferring context: 116.30kB                                                                                                                                                                        0.0s
 => [ 1/11] FROM docker.io/nixos/nix                                                                                                                                                                         0.0s
 => CACHED [ 2/11] COPY ./ ./trezor-user-env                                                                                                                                                                 0.0s
 => CACHED [ 3/11] WORKDIR ./trezor-user-env                                                                                                                                                                 0.0s
 => CACHED [ 4/11] RUN ls /                                                                                                                                                                                  0.0s
 => CACHED [ 5/11] RUN ls /trezor-user-env                                                                                                                                                                   0.0s
 => ERROR [ 6/11] RUN nix-shell --run "./src/binaries/firmware/bin/download.sh"                                                                                                                              0.1s
------                                                                                                                                                                                                            
 > [ 6/11] RUN nix-shell --run "./src/binaries/firmware/bin/download.sh":
#10 0.138 unexpected error in download thread: error: unsharing filesystem state in download thread: Operation not permitted
#10 0.139 error: download of 'https://github.com/NixOS/nixpkgs/archive/7fad01d9d5a3f82081c00fb57918d64145dc904c.tar.gz' was interrupted
------
executor failed running [/bin/sh -c nix-shell --run "./src/binaries/firmware/bin/download.sh"]: exit code: 1

Going back to the old alpine image fixes it, and I'm able to build it.

@vcunat
Copy link
Member

vcunat commented Dec 16, 2021

Perhaps the default tag in the docker registry could be rolled back?

@Valodim
Copy link

Valodim commented Dec 16, 2021

It seems this issue affects any kind of download, not just nix-env -i. I agree the docker tag should be rolled back as a quick fix since this is likely currently breaking a lot of pipelines.

@vcunat vcunat added bug regression Something doesn't work anymore labels Dec 16, 2021
@vcunat vcunat added this to the nix-2.6 milestone Dec 16, 2021
@vcunat
Copy link
Member

vcunat commented Dec 16, 2021

(Just copying GitHub metadata from the closed duplicate issue.)

@vcunat

This comment has been minimized.

edolstra added a commit to edolstra/nix that referenced this issue Dec 16, 2021
edolstra added a commit to edolstra/nix that referenced this issue Dec 16, 2021
On Docker (but not podman), unshare(CLONE_FS) fails with EPERM. So
let's ignore it and hope nothing bad happens.

Attempted fix for NixOS#5777.
@garbas
Copy link
Member

garbas commented Dec 16, 2021

@garbas: I see it was you who pushed the last DockerHub tag. (Meaning mainly that you're able to fix it, and also as feedback.)

EDIT: my bad... I "forgot" that you were on the thread already, meaning this ping doesn't really bring anything new.

I've rollback the latest tag for now. Thank you for the ping.

The fix for this just landed few minutes ago (thank you @edolstra) and docker image should be working with 2.5.1 bugfix releast which should happen in next days.

edolstra added a commit that referenced this issue Dec 17, 2021
On Docker (but not podman), unshare(CLONE_FS) fails with EPERM. So
let's ignore it and hope nothing bad happens.

Attempted fix for #5777.

(cherry picked from commit ec8f24e)
@garbas
Copy link
Member

garbas commented Dec 17, 2021

@Valodim @vcunat @vdovhanych Nix 2.5.1 was just released with fixes for docker image. Could you confirm that it works for you now?

@Gerschtli
Copy link

I confirm that it is working now again, thank you!

@vcunat
Copy link
Member

vcunat commented Dec 17, 2021

@garbas: 2.5.1 tag is there, but I see 2.5.0 pushed later under the latest tag. That's a mistake, right?

@vdovhanych
Copy link

I'm still seeing some issues with this change. Not sure if that is related to this or some changes in nix, but the script that worked before is not working now and fails on this error: getting status of '/var': No such file or directory if I run exactly the same setup on the older alpine image it's working fine. The same is happening with nix-shell --run "poetry install" where I have this error Poetry could not find a pyproject.toml file in / or its parents even though the file is present in the directory where I launch nix-shell. Does this mean that when you now launch nix-shell, it launches in the system root / ?

@garbas
Copy link
Member

garbas commented Dec 17, 2021

@garbas: 2.5.1 tag is there, but I see 2.5.0 pushed later under the latest tag. That's a mistake, right?

That was my mistake. Should be fixed now.

I'm still seeing some issues with this change. Not sure if that is related to this or some changes in nix, but the script that worked before is not working now and fails on this error: getting status of '/var': No such file or directory if I run exactly the same setup on the older alpine image it's working fine.

This was a major change how we build docker image since we build the image from scratch. I don't expect everything would work as with alpine. I would suggest to ensure in downstream that /var folder exist (or create it otherwise).

The same is happening with nix-shell --run "poetry install" where I have this error Poetry could not find a pyproject.toml file in / or its parents even though the file is present in the directory where I launch nix-shell. Does this mean that when you now launch nix-shell, it launches in the system root / ?

We are not setting WorkingDir. You should probably set it with -w/--workdir option for docker run. Or set it in the Dockerfile which is extending nixos/nix image with WORKDIR.

@vcunat
Copy link
Member

vcunat commented Dec 20, 2021

Has anyone experienced issues with allocating temporary files? Permissions? (when updating the docker image from 2.3.latest to 2.5.1)

So far I don't have really useful pointers, but e.g. lua(jit)'s os.tmpname() inside a nix-build started throwing

unable to generate a unique filename

I also see similarly looking non-lua regressions.

@nixos-discourse
Copy link

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/tweag-nix-dev-update-24/17230/1

b12f pushed a commit to pub-solar/os that referenced this issue May 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug docker regression Something doesn't work anymore
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants