GNU bug report logs - #74203
Coreutils test failure on Btrfs

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix; Reported by: "Collin J. Doering" <collin@HIDDEN>; dated Mon, 4 Nov 2024 15:39:01 UTC; Maintainer for guix is bug-guix@HIDDEN.
Changed bug title to 'Coreutils test failure on Btrfs' from 'coreutils fails to build' Request was from Ludovic Courtès <ludo@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 74203 <at> debbugs.gnu.org:


Received: (at 74203) by debbugs.gnu.org; 14 Nov 2024 02:51:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Nov 13 21:51:08 2024
Received: from localhost ([127.0.0.1]:44403 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tBPwq-0001PT-D9
	for submit <at> debbugs.gnu.org; Wed, 13 Nov 2024 21:51:08 -0500
Received: from out-175.mta0.migadu.com ([91.218.175.175]:54956)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <collin@HIDDEN>) id 1tBPwl-0001Ou-UV
 for 74203 <at> debbugs.gnu.org; Wed, 13 Nov 2024 21:51:06 -0500
X-Report-Abuse: Please report any abuse attempt to abuse@HIDDEN and
 include these headers.
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rekahsoft.ca;
 s=key1; t=1731552655;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:mime-version:mime-version:content-type:content-type;
 bh=TU+ccBCmYPJ+LqSpxFujaZJnlqk38SKd6kmtKmY8Ct8=;
 b=fEPJuNcn8HdM2XOS3UEPtVZT/XnAafNKrKDsiteVEKwRSEgQTbURS6Xi664rxnp4eBbcMd
 mdNnuzuOV0ktpFKm68fBkvGS4BXGb0L1d2jfqn6jMdBf9buBJzW21/6UUYVpswBhu++rK1
 e6hWsef3TdRqQHeG8nryuZWmvGYEpq4=
From: "Collin J. Doering" <collin@HIDDEN>
To: 74203 <at> debbugs.gnu.org
Subject: Further investigation and workaround
Date: Wed, 13 Nov 2024 21:50:47 -0500
Message-ID: <87ldxmsf3s.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha512; protocol="application/pgp-signature"
X-Migadu-Flow: FLOW_OUT
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 74203
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--=-=-=
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

Hi again,

I wanted to follow up on my previous report and patch. I still think its us=
eful to consider disabling the coreutils test I previously suggested, howev=
er I found a way to work around the issue and wanted to make note of it, as=
 well as provide some details of my investigation.

To work around the coreutils test `tests/cp/reflink-auto.sh` failing on gui=
x commit `66611696975409a52478b95a862a464daeaefe2a`, I temporarily mounted =
a tmpfs to replace /tmp (which was on btrfs).

=2D-8<---------------cut here---------------start------------->8---
mv /tmp /tmp.old
mkdir /tmp
mount -t tmpfs tmpfs /tmp
chmod 1777 /tmp
mv /tmp.old/{.*,*} /tmp/
=2D-8<---------------cut here---------------end--------------->8---

Now, what made me do this? Well let me explain!

In `tests/cp/reflink-auto.sh` (https://github.com/coreutils/coreutils/blob/=
v9.1/tests/cp/reflink-auto.sh), the failing part of the test:

=2D-8<---------------cut here---------------start------------->8---
# we shouldn't be able to reflink() files on separate partitions
. "$abs_srcdir/tests/other-fs-tmpdir"
a_other=3D"$other_partition_tmpdir/a"
<..>
returns_ 1 cp --reflink "$a_other" b || fail=3D1
=2D-8<---------------cut here---------------end--------------->8---

'$other_partition_tmpdir' is defined in 'tests/other-fs-tmpdir' (https://gi=
thub.com/coreutils/coreutils/blob/v9.1/tests/other-fs-tmpdir) by looking th=
rough a list of candidate directories, comparing the current working direct=
ory to each candidate to see if they have different device ids (as given by=
 'stat -c %d <path>') and that the current user can create directories ther=
e. Once it finds a candidate, it sets '$other_partition_tmpdir' to the temp=
orary directory it created. The candidate directories that are considered a=
re as follows:

=2D-8<---------------cut here---------------start------------->8---
test "${CANDIDATE_TMP_DIRS+set}" =3D set \
  || CANDIDATE_TMP_DIRS=3D"$TMPDIR /tmp /dev/shm /var/tmp /usr/tmp $HOME"
=2D-8<---------------cut here---------------end--------------->8---

Looking at a remaining failed build of coreutils (left over by building wit=
h `--keep-failed`), I see that in 'top/environment-variables', 'TMPDIR' is =
set to '/tmp/guix-build-guix-1.4.0-26.5ab3c4c.drv-0'. This directory is the=
 same place the build is taking place, so I would expect it to 'be on the s=
ame partition'. So, next would be /tmp, where the same premise applies; nex=
t is /dev/shm. From my tests simulating the coreutils guix shell build envi=
ronment, this would meet the conditions and be selected. However, if this w=
ere the case, I wouldn't expect the coreutils reflink test to fail.

My suspicion is that for some reason, 'stat -c %d <path>' to check whether =
two files, a and b are on the same partition doesn't play well with btrfs s=
ubvolumes in some instances with guix-daemon sandboxed builds. However, whe=
n trying to test this in a simulated coreutils guix shell build environment=
, I found that paths outside of the environment on different subvolumes (th=
at do indeed show different device ids (as per 'stat -c %d <path>' outside =
of the guix shell container)), show the same id's within it. I suspect this=
 is related to why the coreutils test fails, but does not when I use a tmpf=
s for /tmp. Its worth noting that on the system impacted, /gnu/store is a b=
trfs subvolume.

I am not yet satisfied with my with my partial explanation, and am very cur=
ious if anyone spots something I'm missing (eg. has a better understanding =
of the guix build environment and why the reflink coreutils test could be f=
ailing like this).

Thanks for your time and attention.

=2D-=20
Collin J. Doering

http://rekahsoft.ca
http://blog.rekahsoft.ca
http://git.rekahsoft.ca

--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iIoEARYKADIWIQSg4F3ACfM0j/GRGeP3fjGTl82nFgUCZzVlhxQcY29sbGluQHJl
a2Foc29mdC5jYQAKCRD3fjGTl82nFgzbAQD2b+IJGAyaN0KjUxKIJ47eZD+nWgMu
VsLKjo6ZosMcTgEApfsAskaxs/lfHil7AalJdkFNiR32ZoBmiRvMyqYFGgo=
=ofWN
-----END PGP SIGNATURE-----
--=-=-=--




Information forwarded to bug-guix@HIDDEN:
bug#74203; Package guix. Full text available.

Message received at 74203 <at> debbugs.gnu.org:


Received: (at 74203) by debbugs.gnu.org; 4 Nov 2024 15:43:12 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 04 10:43:12 2024
Received: from localhost ([127.0.0.1]:40662 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1t7zEW-0007NF-1p
	for submit <at> debbugs.gnu.org; Mon, 04 Nov 2024 10:43:12 -0500
Received: from out-182.mta1.migadu.com ([95.215.58.182]:56475)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <collin@HIDDEN>) id 1t7zET-0007N3-1O
 for 74203 <at> debbugs.gnu.org; Mon, 04 Nov 2024 10:43:10 -0500
X-Report-Abuse: Please report any abuse attempt to abuse@HIDDEN and
 include these headers.
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rekahsoft.ca;
 s=key1; t=1730734952;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:
 content-transfer-encoding:content-transfer-encoding;
 bh=Xrgndk5rEqaXjKXAWoUW1qfkN+ATKQhirFWzRyNFsLk=;
 b=kKea5BlOx1BkMi4rXp4pjSlq+uuAYzJU7YAWLLP6Tyu4x9xj1XHHsXnGTsCiy8uqCOdyVr
 dIptbnRD84mH89qXIrTs+jehHETaYiyDv5l2UD4LO4AGt408LCiJ5jkoODj+oGGcbd5Rwf
 8e5s24d+TPEkGdTw8DdVoOG4G40JhAI=
From: "Collin J. Doering" <collin@HIDDEN>
To: 74203 <at> debbugs.gnu.org
Subject: [PATCH] gnu: coreutils: Disable cp/reflink-auto.sh as it can fail on
 btrfs
Date: Mon,  4 Nov 2024 10:42:21 -0500
Message-ID: <3f7ec312925bdf1b89b0fc4630b4c73f820f4af7.1730734380.git.collin@HIDDEN>
MIME-Version: 1.0
X-Debbugs-Cc: Andreas Enge <andreas@HIDDEN>, Ludovic Courtès <ludo@HIDDEN>
Content-Transfer-Encoding: 8bit
X-Migadu-Flow: FLOW_OUT
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 74203
Cc: "Collin J. Doering" <collin@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

* gnu/packages/base.scm: Similarly to
nix (https://github.com/NixOS/nixpkgs/pull/190211), disable
tests/cp/reflink-auto.sh test as it can fail on btrfs. This was discovered by
the cuirass.genenetwork.org build farm.

Change-Id: If1cc3d516c5807e580ec64ab93670e30090581a7
---
 gnu/packages/base.scm | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index 4e8121ae2c..bed708fc27 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -506,6 +506,8 @@ (define-public coreutils
                                    "tests/split/fail.sh"
                                    ;; These tests error
                                    "tests/dd/nocache.sh"
+                                   ;; These tests can intermitently fail on btrfs
+                                   "tests/cp/reflink-auto.sh"
                                    ;; These tests fail
                                    "tests/cp/sparse.sh"
                                    "tests/cp/special-f.sh"

base-commit: 915f807ce61c48c34141f0300ea7623170f4148a
-- 
2.46.0





Information forwarded to andreas@HIDDEN, ludo@HIDDEN, bug-guix@HIDDEN:
bug#74203; Package guix. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 4 Nov 2024 15:38:12 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 04 10:38:12 2024
Received: from localhost ([127.0.0.1]:40632 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1t7z9f-0007Cr-OJ
	for submit <at> debbugs.gnu.org; Mon, 04 Nov 2024 10:38:12 -0500
Received: from lists.gnu.org ([209.51.188.17]:48634)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <collin@HIDDEN>) id 1t7z9c-0007Cj-81
 for submit <at> debbugs.gnu.org; Mon, 04 Nov 2024 10:38:10 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <collin@HIDDEN>)
 id 1t7z9b-0006xk-OP
 for bug-guix@HIDDEN; Mon, 04 Nov 2024 10:38:07 -0500
Received: from out-188.mta1.migadu.com ([95.215.58.188])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <collin@HIDDEN>)
 id 1t7z9X-0003xJ-O5
 for bug-guix@HIDDEN; Mon, 04 Nov 2024 10:38:07 -0500
X-Report-Abuse: Please report any abuse attempt to abuse@HIDDEN and
 include these headers.
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rekahsoft.ca;
 s=key1; t=1730734679;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:mime-version:mime-version:content-type:content-type;
 bh=LDsg8tjauj+ly/32RPZ3rff7f2U+WZvRdwe25wT89+U=;
 b=o33se61U0H/o/YBHa0zrhvDi8905HTa3HeUzQCW5Vv93LhN5m6hoF+MFqu4TMtOpszRoaB
 M4jnAPH+Ab1XtAzPn2GBP/Ua1ebvv8BjkNwnOwdj8tcsThcAdYgYp8+j0gVwyDHHqX5Z4s
 FAGiiH6Q7wboSDVmmpWG/sQFurejap4=
From: "Collin J. Doering" <collin@HIDDEN>
To: bug-guix@HIDDEN
Subject: coreutils fails to build
Date: Mon, 04 Nov 2024 10:37:53 -0500
Message-ID: <874j4nt3fy.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha512; protocol="application/pgp-signature"
X-Migadu-Flow: FLOW_OUT
Received-SPF: pass client-ip=95.215.58.188; envelope-from=collin@HIDDEN;
 helo=out-188.mta1.migadu.com
X-Spam_score_int: -27
X-Spam_score: -2.8
X-Spam_bar: --
X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001,
 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001,
 SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.4 (-)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.4 (--)

--=-=-=
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

Hi lovely maintainers of Guix!

Some time ago I announced the availability of a guix build farm running out=
 of the University of Tennessee[1]. Some time ago, builds started failing d=
ue to a failure to build coreutils[2]; investigation showed a unexpected fa=
iling test:

=2D-8<---------------cut here---------------start------------->8---
FAIL tests/cp/reflink-auto.sh (exit status: 1)
=2D-8<---------------cut here---------------end--------------->8---

I found that on other guix systems, this is not occurring. After some onlin=
e sleuthing, it appears that the nix folks have seen this before[3]. They o=
pted to disable the test 'tests/cp/reflink-auto.sh' as it can fail when usi=
ng btrfs. On the guix system impacted, disabling coreutils tests makes the =
package build.

For reference, coreutils was building on cuirass.genenetwork.org on guix co=
mmit `0c908518375aea50be6dec703367c01944c8c721` and stopped building on `66=
611696975409a52478b95a862a464daeaefe2a`.

I suggest we follow what the nix folks did (disable `tests/cp/reflink-auto.=
sh`). In a following email you will find a patch that does so, however, bec=
ause it changes coreutils, this will cause many packages to be rebuilt, so =
I'm unsure whats the best way to correct this without having to wait for co=
re-updates to be merged.

Any advise or insight appreciated.

[1]: https://lists.gnu.org/archive/html/guix-devel/2024-07/msg00033.html
[2]: https://cuirass.genenetwork.org/eval/157119/log/raw
[3]: https://github.com/NixOS/nixpkgs/pull/190211

=2D-=20
Collin J. Doering

http://rekahsoft.ca
http://blog.rekahsoft.ca
http://git.rekahsoft.ca

--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iIoEARYKADIWIQSg4F3ACfM0j/GRGeP3fjGTl82nFgUCZyjqURQcY29sbGluQHJl
a2Foc29mdC5jYQAKCRD3fjGTl82nFvPBAQC3DfQP5Dp4VH+4J7MXVjU3l2VPG9bd
9tAe7TWGfOXiNAEAjNk8MWoEhTqDvNlfHIRV6X5z3eef1LzQFIJkVxp3GAQ=
=N/kV
-----END PGP SIGNATURE-----
--=-=-=--




Acknowledgement sent to "Collin J. Doering" <collin@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-guix@HIDDEN. Full text available.
Report forwarded to bug-guix@HIDDEN:
bug#74203; Package guix. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sun, 12 Jan 2025 05:45:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.