From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 08 11:52:37 2022 Received: (at 58320) by debbugs.gnu.org; 8 Oct 2022 15:52:37 +0000 Received: from localhost ([127.0.0.1]:41270 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ohC7w-0007D4-TW for submit@debbugs.gnu.org; Sat, 08 Oct 2022 11:52:37 -0400 Received: from eggs.gnu.org ([209.51.188.92]:39206) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ohC7r-0007Cl-HE for 58320@debbugs.gnu.org; Sat, 08 Oct 2022 11:52:35 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:40606) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ohC7l-0003Ir-1E; Sat, 08 Oct 2022 11:52:25 -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=Vp2GNwOYDnO5eFTZ2XE3gNJBN/1ijJydv6WLLwy5oJg=; b=dynwnBLjvJBW5xaNUE3l e+4KKtw2zXk+PPdB3oqUfiDBtvpuvg8QacA8zBSKdLgEqOOEi1s8dqpkiwF3yPm4SR0C7QPl7ep/4 JMFx5IT1oE3XkgiMCFMr3l+QN8apvejV1+4BiywIXEKyEYEW1G56uphHuX6yir4gWwANb6QVhT1Y1 +UAgFWbH4kY1C/0pZtikNxWXjBrLnwBqoknN8wlpy7L95QFuHV/KZ1h5D1JUTzH9F3YlTOkasvji+ 6RZ4KEncf6MVheKrqaXRXAUfBkjy4QXMkv2uoNsmvn5MI3jjM3q5wd8XBLSh6tb56XXHa6RyrrMM8 TvII8euL+Cye0w==; Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=38276 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ohC7Z-0003Lp-Go; Sat, 08 Oct 2022 11:52:24 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: 58320@debbugs.gnu.org Subject: Re: bug#58320: Hurd VM fails to boot on AMD EPYC (kvm-amd) 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> Date: Sat, 08 Oct 2022 17:52:11 +0200 In-Reply-To: <20221007211643.bma6b5yfaj7a2d4i@begin> (Samuel Thibault's message of "Fri, 7 Oct 2022 23:16:43 +0200") Message-ID: <87zge671p0.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-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 58320 Cc: bug-hurd@gnu.org 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: -3.3 (---) Hi Samuel, Samuel Thibault skribis: > About the backtrace: > >>>>>> user space <<<<< > 0x1000(bfffff24,0,0,1160b,0) > 0x11627(bfffff9c,0,0,0,2) > 0x11bb() > > That is quite surprising actually: in my ld.so there is nothing useful > at 0x1000. Perhaps you can check what 0x11627 is all about? Sure: --8<---------------cut here---------------start------------->8--- $ addr2line -e /gnu/store/m8afvcgwmrfhvjpd7b0xllk8vv5isd6j-glibc-cross-i58= 6-pc-gnu-2.33/lib/ld.so.1 0x1000 0x11627 0x11bb ??:0 /tmp/guix-build-glibc-cross-i586-pc-gnu-2.33.drv-0/glibc-2.33/elf/dl-misc.c= :333 :? --8<---------------cut here---------------end--------------->8--- That=E2=80=99s =E2=80=98_dl_fatal_printf=E2=80=99 calling =E2=80=98_exit=E2= =80=99; it=E2=80=99s trying to tell us something. I=E2=80=99ll try and rebuild the system with the debugging patches at , to get early ld.so output, for lack of a better solution=E2=80=A6 >> Program Header: >> LOAD off 0x00000000 vaddr 0x00000000 paddr 0x00000000 align 2**12 >> filesz 0x00000dd8 memsz 0x00000dd8 flags r-- > > We don't have this section in the Debian glibc. It'd probably be useful > to know what this is about. Address 0 is for the =E2=80=98_begin=E2=80=99 symbol, passed by -Wl,-defsym: --8<---------------cut here---------------start------------->8--- i586-pc-gnu-gcc -nostdlib -nostartfiles -r -o /tmp/guix-build-glibc-cross= -i586-pc-gnu-2.33.drv-0/build/elf/librtld.os '-Wl,-(' /tmp/guix-build-glibc= -cross-i586-pc-gnu-2.33.drv-0/build/elf/dl-allobjs.os /tmp/guix-build-glibc= -cross-i586-pc-gnu-2.33.drv-0/build/elf/rtld-libc.a -lgcc '-Wl,-)' \ -Wl,-Map,/tmp/guix-build-glibc-cross-i586-pc-gnu-2.33.drv-0/build/elf/li= brtld.os.map i586-pc-gnu-gcc -nostdlib -nostartfiles -shared -o /tmp/guix-build-glibc-= cross-i586-pc-gnu-2.33.drv-0/build/elf/ld.so.new \ -Wl,-z,combreloc -Wl,-z,relro -Wl,--hash-style=3Dboth -Wl,-z,defs \ /tmp/guix-build-glibc-cross-i586-pc-gnu-2.33.drv-0/build/elf/librtld.os = -Wl,--version-script=3D/tmp/guix-build-glibc-cross-i586-pc-gnu-2.33.drv-0/b= uild/ld.map \ -Wl,-soname=3Dld.so.1 \ -Wl,-defsym=3D_begin=3D0 i586-pc-gnu-readelf -s /tmp/guix-build-glibc-cross-i586-pc-gnu-2.33.drv-0/b= uild/elf/ld.so.new \ | gawk '($7 ~ /^UND(|EF)$/ && $1 !=3D "0:" && $4 !=3D "REGISTER") { print= ; p=3D1 } END { exit p !=3D 0 }' mv -f /tmp/guix-build-glibc-cross-i586-pc-gnu-2.33.drv-0/build/elf/ld.so.ne= w /tmp/guix-build-glibc-cross-i586-pc-gnu-2.33.drv-0/build/elf/ld.so --8<---------------cut here---------------end--------------->8--- And indeed: --8<---------------cut here---------------start------------->8--- $ objdump -t /gnu/store/m8afvcgwmrfhvjpd7b0xllk8vv5isd6j-glibc-cross-i586-= pc-gnu-2.33/lib/ld.so.1|grep _begin 00000000 l *ABS* 00000000 _begin --8<---------------cut here---------------end--------------->8--- That =E2=80=98-Wl,-defsym=3D_begin=3D0=E2=80=99 flag was removed in glibc c= ommit 6f043e0ee7e477f50a44024ed0cb579d5e3f511d (April 2022). On darnassus it=E2=80=99s different but then it=E2=80=99s Debian=E2=80=99s = glibc 2.35, natively built, so I don=E2=80=99t what conclusions can be drawn: --8<---------------cut here---------------start------------->8--- ludo@darnassus:~$ /lib/ld.so.1 --version ld.so (Debian GLIBC 2.35-1) stable release version 2.35. Copyright (C) 2022 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ludo@darnassus:~$ objdump -x /lib/ld.so.1 |head -40 /lib/ld.so.1: file format elf32-i386 /lib/ld.so.1 architecture: i386, flags 0x00000150: HAS_SYMS, DYNAMIC, D_PAGED start address 0x0001cc40 Program Header: LOAD off 0x00000000 vaddr 0x00000000 paddr 0x00000000 align 2**12 filesz 0x00038494 memsz 0x00038494 flags r-x LOAD off 0x00038c00 vaddr 0x00039c00 paddr 0x00039c00 align 2**12 filesz 0x00001ca8 memsz 0x00001e34 flags rw- DYNAMIC off 0x00039f24 vaddr 0x0003af24 paddr 0x0003af24 align 2**2 filesz 0x000000b8 memsz 0x000000b8 flags rw- NOTE off 0x00000114 vaddr 0x00000114 paddr 0x00000114 align 2**2 filesz 0x00000024 memsz 0x00000024 flags r-- --8<---------------cut here---------------end--------------->8--- Thanks for your feedback! Ludo=E2=80=99.