From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id +Eb6G2phvV7KFgAA0tVLHw (envelope-from ) for ; Thu, 14 May 2020 15:19:06 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id 0M5AFmphvV4PXAAA1q6Kng (envelope-from ) for ; Thu, 14 May 2020 15:19:06 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id AD203940058 for ; Thu, 14 May 2020 15:19:05 +0000 (UTC) Received: from localhost ([::1]:40502 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jZFdW-0000Mt-IZ for larch@yhetil.org; Thu, 14 May 2020 11:19:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47918) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jZFcZ-0006E3-5P for bug-guix@gnu.org; Thu, 14 May 2020 11:18:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:51154) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jZFcY-0002p0-Os for bug-guix@gnu.org; Thu, 14 May 2020 11:18:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jZFcY-0004ne-Jg for bug-guix@gnu.org; Thu, 14 May 2020 11:18:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#41264: Bootstrap packages fail to build. Resent-From: Mathieu Othacehe Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Thu, 14 May 2020 15:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 41264 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 41264@debbugs.gnu.org X-Debbugs-Original-To: bug-guix@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.158946947218429 (code B ref -1); Thu, 14 May 2020 15:18:02 +0000 Received: (at submit) by debbugs.gnu.org; 14 May 2020 15:17:52 +0000 Received: from localhost ([127.0.0.1]:34467 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jZFcN-0004nA-U2 for submit@debbugs.gnu.org; Thu, 14 May 2020 11:17:52 -0400 Received: from lists.gnu.org ([209.51.188.17]:35718) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jZFcM-0004n3-F5 for submit@debbugs.gnu.org; Thu, 14 May 2020 11:17:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47864) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jZFcM-0005dk-9J for bug-guix@gnu.org; Thu, 14 May 2020 11:17:50 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:35166) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jZFcL-0002m5-Ul; Thu, 14 May 2020 11:17:49 -0400 Received: from [2a01:cb18:832e:5f00:5cdd:cc67:a2e1:e2f0] (port=53470 helo=meru) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jZFcL-0003Vu-Dr; Thu, 14 May 2020 11:17:49 -0400 From: Mathieu Othacehe Date: Thu, 14 May 2020 17:17:47 +0200 Message-ID: <87h7wik0kk.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.91 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -3.3 (---) X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Spam-Score: 2.09 X-TUID: YB+cvxVvqLUm --=-=-= Content-Type: text/plain Hello, This command fails on one of my systems: --8<---------------cut here---------------start------------->8--- guix build -e "(@@ (gnu packages commencement) glibc-mesboot0)" --8<---------------cut here---------------end--------------->8--- with the following error: --8<---------------cut here---------------start------------->8--- phase `unpack' succeeded after 11.8 seconds starting phase `apply-boot-patch' patch: **** fstatsterror: unknown error: command "patch" "--force" "-p1" "-i" "/gnu/store/pfz4y5i7krlvam2m8lpddmg9vi44rpqh-glibc-boot-2.2.5.patch" failed with status 2 note: keeping build directory `/tmp/guix-build-glibc-mesboot0-2.2.5.drv-1' builder for `/gnu/store/jcqggqckhiq43y2ivlfhpkbfbp2vyjlc-glibc-mesboot0-2.2.5.drv' failed with exit code 1 build of /gnu/store/jcqggqckhiq43y2ivlfhpkbfbp2vyjlc-glibc-mesboot0-2.2.5.drv failed View build log at '/var/log/guix/drvs/jc/qggqckhiq43y2ivlfhpkbfbp2vyjlc-glibc-mesboot0-2.2.5.drv.bz2'. guix build: error: build of `/gnu/store/jcqggqckhiq43y2ivlfhpkbfbp2vyjlc-glibc-mesboot0-2.2.5.drv' failed --8<---------------cut here---------------end--------------->8--- Here's a stracing of the failing "patch" command: --8<---------------cut here---------------start------------->8--- open("/gnu/store/pfz4y5i7krlvam2m8lpddmg9vi44rpqh-glibc-boot-2.2.5.patch", O_RDONLY) = 3 brk(0x9377913) = 0x9377913 fstat(3, 0xffb29328) = -1 EOVERFLOW (Value too large for defined data type) --8<---------------cut here---------------end--------------->8--- "patch-mesboot" is built for 32 bits. Hence, it can be using "__ia32_sys_fstat", "__ia32_compat_sys_newfstat" or "__ia32_compat_sys_x86_fstat64" syscall for "fstat". Here, according to perf, it's using __ia32_compat_sys_newfstat which is overflowing on my file system (inode count to high or so). There's a little demonstration program attached. When built with `gcc -m32 test.c', I have: --8<---------------cut here---------------start------------->8--- fstat(3, 0xffad5874) = -1 EOVERFLOW (Value too large for defined data type) fstat64(3, {st_mode=S_IFDIR|0555, st_size=4096, ...}) = 0 fstat64(3, {st_mode=S_IFDIR|0555, st_size=4096, ...}) = 0 --8<---------------cut here---------------end--------------->8--- So I think somehow, bootstrap packages use the legacy "fstat" syscall, which may overflow on a 64 bits system. WDYT, Thanks, Mathieu --=-=-= Content-Type: text/x-csrc Content-Disposition: inline; filename=t.c #define _GNU_SOURCE #include #include #include #include #include #include #include #include #include int main(int argc, char *argv[]) { struct stat sb; if (argc != 2) { fprintf(stderr, "Usage: %s \n", argv[0]); exit(EXIT_FAILURE); } int fd = open(argv[1], O_RDONLY); syscall(__NR_fstat, fd, &sb); syscall(__NR_fstat64, fd, &sb); fstat(fd, &sb); exit(EXIT_SUCCESS); } --=-=-=--