From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 08 11:43:11 2018 Received: (at submit) by debbugs.gnu.org; 8 Feb 2018 16:43:11 +0000 Received: from localhost ([127.0.0.1]:34246 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ejpHz-0006l5-Bm for submit@debbugs.gnu.org; Thu, 08 Feb 2018 11:43:11 -0500 Received: from eggs.gnu.org ([208.118.235.92]:49443) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ejpHx-0006ks-7m for submit@debbugs.gnu.org; Thu, 08 Feb 2018 11:43:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ejpHq-0007MP-PM for submit@debbugs.gnu.org; Thu, 08 Feb 2018 11:43:03 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:40037) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ejpHq-0007MG-Lw for submit@debbugs.gnu.org; Thu, 08 Feb 2018 11:43:02 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40407) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ejpHp-0003KN-6u for bug-guix@gnu.org; Thu, 08 Feb 2018 11:43:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ejpHl-0007Jw-9X for bug-guix@gnu.org; Thu, 08 Feb 2018 11:43:01 -0500 Received: from dd26836.kasserver.com ([85.13.145.193]:47456) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ejpHl-0007J0-1R; Thu, 08 Feb 2018 11:42:57 -0500 Received: from localhost (77.118.210.201.wireless.dyn.drei.com [77.118.210.201]) by dd26836.kasserver.com (Postfix) with ESMTPSA id ADDC43360375; Thu, 8 Feb 2018 17:42:53 +0100 (CET) Date: Thu, 8 Feb 2018 17:42:38 +0100 From: Danny Milosavljevic To: ng0@n0.is, guix-devel@gnu.org, Subject: ARM compilation via qemu binfmt - Assertion failure Message-ID: <20180208174238.2abc85dc@scratchpost.org> In-Reply-To: <87k1vqv23v.fsf@abyayala.i-did-not-set--mail-host-address--so-tickle-me> References: <87bmh4qrf5.fsf@abyayala.i-did-not-set--mail-host-address--so-tickle-me> <87bmh3kbd9.fsf@gnu.org> <87k1vqv23v.fsf@abyayala.i-did-not-set--mail-host-address--so-tickle-me> X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.31; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Hi ng0, On Tue, 06 Feb 2018 10:33:56 +0000 ng0@n0.is wrote: > recently I've read about slow but native compiling of ARM on qemu. Unfortunately, there's a (pretty reproducible) problem with it. guix-master/guix $ ./pre-inst-env guix system disk-image --system=armhf-linux -e "(@ (gnu system install) installation-os)" [... building grub-2.02 ...] phase `configure' succeeded after 821.8 seconds starting phase `patch-generated-file-shebangs' patch-makefile-SHELL: ./po/Makefile: changing `SHELL' from `/bin/sh' to `/gnu/st[...] phase `patch-generated-file-shebangs' succeeded after 14.6 seconds starting phase `build' bison -d -p grub_script_yy -b grub_script ./grub-core/script/parser.y flex -o grub_script.yy.c --header-file=grub_script.yy.h ./grub-core/script/yylex[...] bison: ../sysdeps/unix/sysv/linux/spawni.c:360: __spawnix: Assertion `ec >= 0' failed This is only fixed in glibc 2.27 (not in core-updates). The fix is: https://sourceware.org/bugzilla/show_bug.cgi?id=22273 diff --git a/sysdeps/unix/sysv/linux/spawni.c b/sysdeps/unix/sysv/linux/spawni.c index dea1650..f02ac19 100644 --- a/sysdeps/unix/sysv/linux/spawni.c +++ b/sysdeps/unix/sysv/linux/spawni.c @@ -365,9 +365,15 @@ __spawnix (pid_t * pid, const char *file, if (new_pid > 0) { ec = args.err; - assert (ec >= 0); if (ec != 0) - __waitpid (new_pid, NULL, 0); + { + /* It handles the unlikely case where the auxiliary vfork process + is killed before calling _exit or execve. */ + int status; + __waitpid (new_pid, &status, 0); + if (WIFSIGNALED (status)) + ec = 0; + } } else ec = -new_pid;