From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id cK1MBG+LRGP6mwAAbAwnHQ (envelope-from ) for ; Mon, 10 Oct 2022 23:15:27 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id YLptBG+LRGMuVAAAauVa8A (envelope-from ) for ; Mon, 10 Oct 2022 23:15:27 +0200 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 73A009029 for ; Mon, 10 Oct 2022 23:15:26 +0200 (CEST) Received: from localhost ([::1]:60190 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oi07R-000062-8i for larch@yhetil.org; Mon, 10 Oct 2022 17:15:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45406) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oi07A-00005N-Lc for bug-guix@gnu.org; Mon, 10 Oct 2022 17:15:08 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:51048) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oi074-0000cE-Uu for bug-guix@gnu.org; Mon, 10 Oct 2022 17:15:08 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oi074-0006nA-Gz for bug-guix@gnu.org; Mon, 10 Oct 2022 17:15:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#58320: Hurd VM fails to boot on AMD EPYC (kvm-amd) Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Mon, 10 Oct 2022 21:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58320 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 58320@debbugs.gnu.org Cc: bug-hurd@gnu.org Received: via spool by 58320-submit@debbugs.gnu.org id=B58320.166543646726044 (code B ref 58320); Mon, 10 Oct 2022 21:15:02 +0000 Received: (at 58320) by debbugs.gnu.org; 10 Oct 2022 21:14:27 +0000 Received: from localhost ([127.0.0.1]:50124 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oi06U-0006lz-H7 for submit@debbugs.gnu.org; Mon, 10 Oct 2022 17:14:26 -0400 Received: from eggs.gnu.org ([209.51.188.92]:45612) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oi06S-0006lm-QI for 58320@debbugs.gnu.org; Mon, 10 Oct 2022 17:14:25 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:43266) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oi06N-0000RG-HT; Mon, 10 Oct 2022 17:14:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=BkYhZQYMG80R3XesyeEkyfxrXVlwtgAJxA3JKxo3QN0=; b=jXYaBKeZxzuS59A2mlRQ JjFo7WA8QjpRVax+fcTfoVzYRRrrp+7lRNzqVteT2iVjV5AE0qF8BJ/i4BFLu5r3XAzq3mPSQyLhk ctmnMcQ+J1WRrpKzD6wV61XdVKRXFNK+fFY9lBGRFMRSbg97c/F1unrUdinlC+TBYsThLX40SkMJ6 r0UvJRCoH7leE4Jq/pjfcikb7NI9IpD7rViEIEim+6mNr98iCSeWrbQjEbr5SQ1451g+kUFnF0MfA i3bChG93oiei8nX2z36lsgeoR28dS2nwFPtGEVRM3fcwYDvT0SP4oPENNw5Ub38vfZNT4IjAXNvoM W1HRHx3lvJwcqw==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:53666 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oi06L-000460-VE; Mon, 10 Oct 2022 17:14:18 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <87k05eouh8.fsf@inria.fr> <8735c1nlga.fsf@gnu.org> <20221006135316.ijevz5ddnet4aqkr@begin> <87r0zkfvso.fsf@gnu.org> <20221006224219.mn7zp7lhzxwlyrpx@begin> <8735c0f3d5.fsf@gnu.org> <20221007211643.bma6b5yfaj7a2d4i@begin> <87zge671p0.fsf@gnu.org> <8735bx6kt8.fsf@gnu.org> Date: Mon, 10 Oct 2022 23:14:15 +0200 In-Reply-To: <8735bx6kt8.fsf@gnu.org> ("Ludovic =?UTF-8?Q?Court=C3=A8s?="'s message of "Sun, 09 Oct 2022 18:09:07 +0200") Message-ID: <87pmezxty0.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1665436526; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=BkYhZQYMG80R3XesyeEkyfxrXVlwtgAJxA3JKxo3QN0=; b=e0wdkG0GCeJLFO4DakljQLFc/KosuGdp230fKa5OMYNxFah/b8VtbedNQUlhyBfUlloE/g TkhRCUNJon0PyW3bfdYZXRo6pivAQNuYWva2krn2N7o/61E8RpmfDQHoChHtqnf76qmY3H F4Me6Sq3oxOx5de+/mOO0UlRgmEB0+Sw10q1tXF+80yEZOi0aFl2ZaiyyHmCbzZb0yFloG 4OB1zncorn0Mtc6zjCG739wCA1tFl1RdcXILjcq6OvQQL+TICjnnUpvm3/Tr4Ki0q739pS DjUK76mz+8+NUbpRKQY2KyhFLrfXtEwLNulxAMqHtPzVGaItMFt5Lepf1tWHzw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1665436526; a=rsa-sha256; cv=none; b=nC8shfee+NNCr9lbs9ObX18cmqmMNWBNgr1gW09FXTE4gzeJSB29OI1ckuz2TnU+4ydgt5 fVSiY1Y1H0fT0y8u/063Jmpb/D9LkTJnObIW97X9xTMHtX7S4SC/Np9Dpn2xNqC/71aFvz 3QiPCD4AqlWDBN1QgBwJsCTuVNvgmuS2S3CryhQLAfCUaJos6+/EH7om6afpGWYGFYl4/2 WdumqzaiADqDOmdyUNz9z3NxfToyVwLCogkfYk+zcZPCPKkKu9n5RDcD05hj8d+9OUvG9O N3Ebjnss3KNnsWjxCz26rjULlNsMFqyasAXMDn0M7FqMXwOlNC+t+lJHjdROdA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=jXYaBKeZ; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -4.09 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=jXYaBKeZ; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 73A009029 X-Spam-Score: -4.09 X-Migadu-Scanner: scn0.migadu.com X-TUID: NdiK62cJ2TOp Ludovic Court=C3=A8s skribis: > Through a dichotomy I tried to see how far it goes. The info I have so > far is that ld.so errors out from elf/rtld.c:563 (line 565 is not > reached): > > 558: if (bootstrap_map.l_addr || ! bootstrap_map.l_info[VALIDX(DT_GNU_PR= ELINKED)]) > 559: { > 560: /* Relocate ourselves so we can do normal function calls and > 561: data access using the global offset table. */ > 562: > 563: ELF_DYNAMIC_RELOCATE (&bootstrap_map, 0, 0, 0); > 564: } > 565: bootstrap_map.l_relocated =3D 1; > ... > 578: __rtld_malloc_init_stubs (); Via brute force=C2=B9, I found that =E2=80=98__assert_fail=E2=80=99 is hit,= with its first argument in $eax being: --8<---------------cut here---------------start------------->8--- db> x/c 0x28604,80=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20 ELF32_R_TYPE (reloc->r_info) =3D=3D R_386_RELATIVE\000\000m= ap->l_in=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 fo[VERSYMIDX (DT_VERSYM)] !=3D NULL\000\000Fatal glibc erro= r: Too=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 many audit mo=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20 --8<---------------cut here---------------end--------------->8--- This comes from i386/dl-machine.h: --8<---------------cut here---------------start------------->8--- auto inline void __attribute ((always_inline)) elf_machine_rel_relative (Elf32_Addr l_addr, const Elf32_Rel *reloc, void *const reloc_addr_arg) { Elf32_Addr *const reloc_addr =3D reloc_addr_arg; assert (ELF32_R_TYPE (reloc->r_info) =3D=3D R_386_RELATIVE); *reloc_addr +=3D l_addr; } --8<---------------cut here---------------end--------------->8--- How can we get there? Looking at =E2=80=98_dl_start=E2=80=99, it could be = that =E2=80=98elf_machine_load_address=E2=80=99 returns a bogus value and we end= up reading wrong ELF data? Or it could be memory corruption somewhere. Or=E2=80=A6? Thing is, it=E2=80=99s not fully deterministic (happens 9 times out of 10 w= ith KVM, never happens without KVM). Ideas? :-) Ludo=E2=80=99. =C2=B9 Building with =E2=80=98-fno-optimize-sibling-calls=E2=80=99 didn=E2= =80=99t help get nicer backtraces, but that=E2=80=99s prolly because all that early relocation c= ode is inlined.