!LemuOOvbWqRXodtSsw:nixos.org

NixOS Reproducible Builds

528 Members
Report: https://reproducible.nixos.org Project progress: https://github.com/orgs/NixOS/projects/30120 Servers

Load older messages


SenderMessageTime
28 Aug 2021
@mjolnir:nixos.orgmjolnir joined the room.02:32:39
@mjolnir:nixos.orgmjolnir banned @matthewcroughan:defenestrate.itmatthewcroughan - nix.zone (<no reason supplied>).02:35:47
@hexagonk:halogen.cityhexagonk joined the room.12:19:23
30 Aug 2021
@baloo_:matrix.orgbaloo nrdxp: https://blog.superbaloo.net/posts/emmett-vdso/ got some more details here 02:06:26
@cleverca22:matrix.orgcleverca22

while building some rpi disk images, i discovered ext4 images generated by nixos/lib/make-ext4-fs.nix not being reproducible

using debugfs on the images, and running show_super_stats, i found the following difference:

Directory Hash Seed:      153a13f8-fd63-4dec-9295-e702caea9421
Directory Hash Seed:      7ab5f8a0-ae47-4beb-a549-b32270a9ee1d

2021-08-30 11:15:54 < slyfox> e2fsprogs' tests force UUID to a constant to get stable output: tests/t_change_uuid_mcsum/script:$MKE2FS -O metadata_csum,^metadata_csum_seed -U 6b33f586-a183-4383-921d-30da3fef2e5c -F $TMPFILE > /dev/null 2>&1

but when applying that to nixpkgs:

diff --git a/nixos/lib/make-ext4-fs.nix b/nixos/lib/make-ext4-fs.nix
index 416beeb32f2..179ab5998e3 100644
--- a/nixos/lib/make-ext4-fs.nix
+++ b/nixos/lib/make-ext4-fs.nix
@@ -64,7 +64,7 @@ pkgs.stdenv.mkDerivation {

       truncate -s $bytes $img

-      faketime -f "1970-01-01 00:00:01" fakeroot mkfs.ext4 -L ${volumeLabel} -U ${uuid} -d ./rootImage $img
+      faketime -f "1970-01-01 00:00:01" fakeroot mkfs.ext4 -O metadata_csum,^metadata_csum_seed -L ${volumeLabel} -U ${uuid} -d ./rootImage $img

       export EXT2FS_NO_MTAB_OK=yes
       # I have ended up with corrupted images sometimes, I suspect that happens when the build machine's disk gets full during the build.

the build fails with:

ext4-fs.img> Creating journal (8192 blocks): done
ext4-fs.img> Copying files into the device: ext2fs_mkdir: Directory block checksum does not match directory block while creating directory "lib"
ext4-fs.img> __populate_fs: Directory block checksum does not match directory block while making dir "lib"
ext4-fs.img> mkfs.ext4: Directory block checksum does not match directory block while populating file system
ext4-fs.img> builder for '/nix/store/i6y239h646p67l6pa9qyzw2v50cyf432-ext4-fs.img.drv' failed with exit code 1
14:37:56
@baloo_:matrix.orgbaloothe alternative could be to use tune2fs -O '^metadata_csum_seed' to disable it afterwards16:45:06
1 Sep 2021
@orpheus1:matrix.orgOrpheus joined the room.18:09:40
@orpheus1:matrix.orgOrpheus left the room.20:10:22
3 Sep 2021
@zhaofeng:zhaofeng.liZhaofeng Li joined the room.05:54:31
5 Sep 2021
@tomberek:matrix.orgtomberekDid we ever figure out the "unchecked paths" issue at r13y? I'm seeing the same issues with my own build.17:56:10
@rick:matrix.ciphernetics.nlRick (Mindavi)I tried building one of the derivations, but the mirror seems down: nix-build --check /nix/store/c99ihlhb2lh875spzsl6rnc4058grxvn-autoconf-2.71.tar.xz.drv checking outputs of '/nix/store/c99ihlhb2lh875spzsl6rnc4058grxvn-autoconf-2.71.tar.xz.drv'... warning: error: unable to download 'https://ftpmirror.gnu.org/autoconf/autoconf-2.71.tar.xz': Couldn't resolve host name (6); retrying in 266 ms warning: error: unable to download 'https://ftpmirror.gnu.org/autoconf/autoconf-2.71.tar.xz': Couldn't resolve host name (6); retrying in 553 ms warning: error: unable to download 'https://ftpmirror.gnu.org/autoconf/autoconf-2.71.tar.xz': Couldn't resolve host name (6); retrying in 1344 ms warning: error: unable to download 'https://ftpmirror.gnu.org/autoconf/autoconf-2.71.tar.xz': Couldn't resolve host name (6); retrying in 2563 ms 19:02:30
@rick:matrix.ciphernetics.nlRick (Mindavi)Seems to be the case for multiple of them (maybe all of them even)19:02:52
@rick:matrix.ciphernetics.nlRick (Mindavi)I don't know why though, via the browser they work...19:05:45
@zhaofeng:zhaofeng.liZhaofeng Li Yeah, only seems to happen with the <nix/fetchurl.nix> (what's used by stdenv.fetchurlBoot): nix-instantiate -E 'with import ./. {}; autoconf.override { fetchurl = stdenv.fetchurlBoot; }' 19:29:27
@zhaofeng:zhaofeng.liZhaofeng Li It uses the internal builtin:fetchurl builder to fetch. Maybe something about the sandbox setup is wrong so it doesn't have internet 19:30:42
@zhaofeng:zhaofeng.liZhaofeng Li (more direct repro: nix-build -E 'import <nix/fetchurl.nix> { url = "http://example.com"; sha256 = ""; }') 19:37:52
@baloo_:matrix.orgbaloothat works here19:40:58
@baloo_:matrix.orgbalooso it's not just that :/19:41:07
@rick:matrix.ciphernetics.nlRick (Mindavi)Hmm, for me it does not: nix-build -E 'import <nix/fetchurl.nix> { url = "http://example.com"; sha256 = ""; }' warning: found empty hash, assuming 'sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=' this derivation will be built: /nix/store/r4rn52pvm83frvq2q4a2zb3vdq73l5x2-example.com.drv building '/nix/store/r4rn52pvm83frvq2q4a2zb3vdq73l5x2-example.com.drv'... warning: error: unable to download 'http://example.com': Couldn't resolve host name (6); retrying in 297 ms warning: error: unable to download 'http://example.com': Couldn't resolve host name (6); retrying in 502 ms warning: error: unable to download 'http://example.com': Couldn't resolve host name (6); retrying in 1083 ms warning: error: unable to download 'http://example.com': Couldn't resolve host name (6); retrying in 2086 ms error: unable to download 'http://example.com': Couldn't resolve host name (6) 19:41:30
@baloo_:matrix.orgbaloo any chance you could strace -Ff -s 1500 -p $(pidof nix-daemon) 2> log and upload that somewhere? 19:41:49
@zhaofeng:zhaofeng.liZhaofeng LiIs it Nix 2.4 regression?19:42:07
@baloo_:matrix.orgbaloohttps://github.com/NixOS/nix/issues/5089#issuecomment-91317491619:42:20
@baloo_:matrix.orgbaloothere is the bug in the nix's bugtracker19:42:36
@baloo_:matrix.orgbaloo
In reply to @baloo_:matrix.org
any chance you could strace -Ff -s 1500 -p $(pidof nix-daemon) 2> log and upload that somewhere?
(and re-trigger the bug in another terminal)
19:43:15
@zhaofeng:zhaofeng.liZhaofeng Li * <s>Is it Nix 2.4 regression?</s> No, also happens on 2.3 with or without daemon19:43:22
@zhaofeng:zhaofeng.liZhaofeng Lihttps://gist.github.com/zhaofengli/e3c51186768971bb40495c83c383f2e019:46:09
@baloo_:matrix.orgbalooit ... should be invoking curl19:46:43
@baloo_:matrix.orgbalooand it does not19:46:45
@rick:matrix.ciphernetics.nlRick (Mindavi)Doesn't it first try to resolve the hostname?19:47:30
@baloo_:matrix.orgbaloo

This is /run/systemd/resolve/stub-resolv.conf managed by man:systemd-resolved(8).\n# Do not edit.\n#\n# This file might be symlinked as /etc/resolv.conf. If you're looking at\n# /etc/resolv.conf and seeing this text, you have followed the symlink.\n#\n# This is a dynamic resolv.conf file for connecting local clients to the\n# internal DNS stub resolver of systemd-resolved. This file lists all\n# configured search domains.\n#\n# Run "resolvectl status" to see details about the uplink DNS servers\n# currently in use.\n#\n# Third party programs should typically not access this file directly, but only\n# through the symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a\n# different way, replace this symlink by a static file or a different symlink.\n#\n# See man:systemd-resolved.service(8) for details about the supported modes of\n# operation for /etc/resolv.conf.\n\nnameserver 127.0.0.53\noptions edns0 trust-ad\nsearch naive.network\n

19:47:47

There are no newer messages yet.


Back to Room ListRoom Version: 6