Source: initramfs-tools Version: 0.139 Severity: normal Tags: patch User: de...@kali.org Usertags: origin-kali
Here's the trace for the failing function build_fs_ext2, with AUTOPKGTEST_TMP set to /srv/debci/tmp (a tmpfs with 1G of space): + local dir=/srv/debci/tmp/autopkgtest-lxc.nn7bbe1e/downtmp/autopkgtest_tmp/tmp.HkBCFUgax2 + local disk=/tmp/tmp.1nt6IKxArY ++ cut -f 1 ++ du --summarize /srv/debci/tmp/autopkgtest-lxc.nn7bbe1e/downtmp/autopkgtest_tmp/tmp.HkBCFUgax2 + local blocks=0 ++ du --summarize --inodes /srv/debci/tmp/autopkgtest-lxc.nn7bbe1e/downtmp/autopkgtest_tmp/tmp.HkBCFUgax2 ++ cut -f 1 + local inodes=2 + blocks=20 + inodes=12 + genext2fs -b 20 -N 12 -U -d /srv/debci/tmp/autopkgtest-lxc.nn7bbe1e/downtmp/autopkgtest_tmp/tmp.HkBCFUgax2 /tmp/tmp.1nt6IKxArY genext2fs: couldn't allocate a block (no free space) With AUTOPKGTEST_TMP unset, and mktemp therefore defaulting to a regular ext4 /tmp, build_fs_ext2 succeeds: + local dir=/tmp/tmp.gs4fkyf68p + local disk=/tmp/tmp.NGXxR76wmo ++ cut -f 1 ++ du --summarize /tmp/tmp.gs4fkyf68p + local blocks=8 ++ cut -f 1 ++ du --summarize --inodes /tmp/tmp.gs4fkyf68p + local inodes=2 + blocks=30 + inodes=12 + genext2fs -b 30 -N 12 -U -d /tmp/tmp.gs4fkyf68p /tmp/tmp.NGXxR76wmo copying from directory /tmp/tmp.gs4fkyf68p + grep -q '^/dev/vda: clean,' /tmp/tmp.RB4hnjbtNn `du --summarize` is clearly having issues calculating the number of blocks in the tmpfs case, so this could possibly instead be a du problem, but since build_fs_ext2 is adding a bit of fudge factor to that result later down the line, my current patch is as follows: --- debian/tests/test-common.bak 2021-03-05 12:55:18.734702358 +0000 +++ debian/tests/test-common 2021-03-05 13:06:49.340274568 +0000 @@ -72,7 +72,7 @@ local inodes="$(du --summarize --inodes "${dir}" | cut -f 1)" # Add fudge factor - blocks="$((blocks + 20 + blocks / 4))" + blocks="$((blocks + 28 + blocks / 4))" inodes="$((inodes + 10))" # genext2fs writes status messages to stderr; hide that from With this patch in place, the amd64-separate-usr test then succeeds for both tmpfs and ext4. -- System Information: Debian Release: bullseye/sid APT prefers unstable APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 5.10.0-3-amd64 (SMP w/36 CPU threads) Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled