GNU bug report logs - #53194
System test partition.img differs in size across hosts(?)

Previous Next

Package: guix;

Reported by: Tobias Geerinckx-Rice <me <at> tobias.gr>

Date: Tue, 11 Jan 2022 19:42:02 UTC

Severity: normal

Done: Mathieu Othacehe <othacehe <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Mathieu Othacehe <othacehe <at> gnu.org>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#53194: closed (System test partition.img differs in size
 across hosts(?))
Date: Mon, 31 Oct 2022 08:57:01 +0000
[Message part 1 (text/plain, inline)]
Your message dated Mon, 31 Oct 2022 09:56:02 +0100
with message-id <87leowgyn1.fsf <at> gnu.org>
and subject line Re: bug#53194: System test partition.img differs in size across hosts(?)
has caused the debbugs.gnu.org bug report #53194,
regarding System test partition.img differs in size across hosts(?)
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
53194: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=53194
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Tobias Geerinckx-Rice <me <at> tobias.gr>
To: Bug reports for GNU Guix <bug-guix <at> gnu.org>
Subject: System test partition.img differs in size across hosts(?)
Date: Tue, 11 Jan 2022 20:31:27 +0100
[Message part 3 (text/plain, inline)]
Guix,

This is weird.  On berlin:

--8<---------------cut here---------------start------------->8---
$ guix build 
/gnu/store/91wjmydy556ibl38xydpb8yisp3gvx8w-partition.img.drv
[…]
Creating filesystem with 351 1k blocks and 40 inodes
[…]
/gnu/store/q18ca3ilma0h5hpn4s39xhzn0kc7jm5x-partition.img
--8<---------------cut here---------------end--------------->8---

On my laptop:

--8<---------------cut here---------------start------------->8---
$ guix build 
/gnu/store/91wjmydy556ibl38xydpb8yisp3gvx8w-partition.img.drv
[…]
Creating filesystem with 242 1k blocks and 32 inodes
[…]
Copying files into the device: ext2fs_symlink: Could not allocate 
inode in ext2 filesystem while creating symlink "system"
__populate_fs: Could not allocate inode in ext2 filesystem while 
writing symlink"system"
mke2fs: Could not allocate inode in ext2 filesystem while 
populating file system
--8<---------------cut here---------------end--------------->8---

This happens with both a tmpfs and a bcachefs /tmp.

The same make check-system TESTS="openvswitch" fails for Marius as 
well, although I don't know the exact output.  They tested btrfs 
and tmpfs, and suggested a kernel regression.

I don't understand how that would cause this, but I'm forced to 
agree: something spooky is going on in the chroot and the kernel 
is a big variable.

The attached patch was written before I was aware of above 
weirdness and only works around the issue.

Kind regards,

T G-R

[0001-build-image-Account-for-fixed-size-file-system-struc.patch (text/x-patch, inline)]
From 18f288d4b69faa73ffb75488dbc924640441d7ee Mon Sep 17 00:00:00 2001
From: Tobias Geerinckx-Rice <me <at> tobias.gr>
Date: Tue, 11 Jan 2022 19:56:53 +0100
Subject: [PATCH] build: image: Account for fixed-size file system structures.

* gnu/build/image.scm (estimate-partition-size): Enforce a 1-MiB minimum.
---
 gnu/build/image.scm | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/gnu/build/image.scm b/gnu/build/image.scm
index bdd5ec25a9..81caa424f8 100644
--- a/gnu/build/image.scm
+++ b/gnu/build/image.scm
@@ -3,7 +3,7 @@
 ;;; Copyright © 2016 Christine Lemmer-Webber <cwebber <at> dustycloud.org>
 ;;; Copyright © 2016, 2017 Leo Famulari <leo <at> famulari.name>
 ;;; Copyright © 2017 Marius Bakke <mbakke <at> fastmail.com>
-;;; Copyright © 2020 Tobias Geerinckx-Rice <me <at> tobias.gr>
+;;; Copyright © 2020, 2022 Tobias Geerinckx-Rice <me <at> tobias.gr>
 ;;; Copyright © 2020 Mathieu Othacehe <m.othacehe <at> gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
@@ -62,8 +62,10 @@ (define (size-in-kib size)
 
 (define (estimate-partition-size root)
   "Given the ROOT directory, evaluate and return its size.  As this doesn't
-take the partition metadata size into account, take a 25% margin."
-  (* 1.25 (file-size root)))
+take the partition metadata size into account, take a 25% margin.  As this in
+turn doesn't take any constant overhead into account, force a 1-MiB minimum."
+  (max (ash 1 20)
+       (* 1.25 (file-size root))))
 
 (define* (make-ext-image partition target root
                          #:key
-- 
2.34.0

[signature.asc (application/pgp-signature, inline)]
[Message part 6 (message/rfc822, inline)]
From: Mathieu Othacehe <othacehe <at> gnu.org>
To: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Cc: Tobias Geerinckx-Rice <me <at> tobias.gr>, 53194-done <at> debbugs.gnu.org
Subject: Re: bug#53194: System test partition.img differs in size across
 hosts(?)
Date: Mon, 31 Oct 2022 09:56:02 +0100
Hello,

> FYI, I pushed this workaround in
> 3c3c9d259f87fbc8c1d9551af32e79f9f168f596.

I'm not able to reproduce this issue with or without the workaround, by
running the openvswitch test on Berlin and on my laptop. I think we can
close it for now and re-open it if someone finds a more reliable
reproducer.

Thanks,

Mathieu


This bug report was last modified 2 years and 206 days ago.

Previous Next


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