From nobody Mon Jul 22 04:08:04 2024 X-Original-To: arm@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WS6Fv6zQdz5RFY2 for ; Mon, 22 Jul 2024 04:08:19 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic307-8.consmr.mail.gq1.yahoo.com (sonic307-8.consmr.mail.gq1.yahoo.com [98.137.64.32]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4WS6Fv1D9Qz44MG for ; Mon, 22 Jul 2024 04:08:19 +0000 (UTC) (envelope-from marklmi@yahoo.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yahoo.com header.s=s2048 header.b=An6V9Fm5; dmarc=pass (policy=reject) header.from=yahoo.com; spf=pass (mx1.freebsd.org: domain of marklmi@yahoo.com designates 98.137.64.32 as permitted sender) smtp.mailfrom=marklmi@yahoo.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1721621297; bh=Z3TaY0LOICU38oaFqGxmBTMbV7g3JLFOELFQXfpVtAc=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From:Subject:Reply-To; b=An6V9Fm5phhHR4vsL62WcVh8LRRzsRD9rO/UXq/5v5vdkeN2/DGmCcjWHNgVGDSrsex6B79JPQW1xCR5pUsjyvJiICmIaS14PnTDAteByj4mKjqi9NRndM9Rind8mpTJ71CdMjcpmwgFsIZNdflsK1K73BBfimY0x1z2XCh5NH1FoXNsg038v1v/eaK8YKGHedyTsO6qTJ6Q6wQ7KLD3hiX0RruJTbwFmIZSRHQOd1b3B8DRoplALGH4xusCHIxRLuCzbHS6P7VyH6mX3aKUVxPDxmPAq8eGqC7+iYmShg1/de3by0xrHNor7Cc//8oxzp72ddLztB/C9otD+pWNKw== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1721621297; bh=IKCS0kIZPbD1ywsYE0v92+aG9Rui3vvLweQOP/bE6Nu=; h=X-Sonic-MF:Subject:From:Date:To:From:Subject; b=oa51B7FRIIt3fIRGdl0eh4oLl0XsIms2f+vJQrrHdG1mOID0rJymdGsaREjZ66MJn2VFg4uzpV1Plorc92hSkFYayNtkkKrv88xIH/4TrA1iNvzPZ7EOfCZ6mN33aOQYFlXdfoOnqSzDW4tldPps9b0s9jpkpY2kJwSGZCA2lZks1rr2MWSbxu8PkSvBTOxL/1b5o4i59RG5bYbWLcu+XMT95xptkBBHH1E0ANZz1B6GPfQkioPqumgY4WFf+8/MSgV+gl3C3m9OVuf4g43aDX8OFQyZiNyEBPkK7YhKoZvW+teJnKPPT0//WSCA5ZW1cLCFXnfQ4/+hT0ti9UU7rA== X-YMail-OSG: mB85qEQVM1lwZf4x_7QEf580nFlypge.rwRKXfmHV8SZYItiXrqi2..QRBfH1YD hzq9ZemvxhC7HhlM2zFmRXOq2hRaEpcmEioY7iMJn5q.1HI6y.3UDJKlWdigh2ZfEw2SVKwXxIwv b.6Ui.kr6mU.qXWOcfpOhMJbbaaBTIDUKKHX_lYqoBZCYH6viKKjMjUKcqcI_ta2P4SvtTiiC1oE UA_dNcDLODY5ZBjp1yr2GklWQBMN42D5FcIuKTblblk6uaUdGeHmti7MQhYjcKoaFERQ914hWa1R rwJHp.ID29P1E5khY60IKYOzfGRfs9OA0djmSpRcMBo4PXH08MyWpllF1DSP0lVAlJopFi8_TxJF Nrmvri3YThjfNCkxkSqZn1Ue9AH2KAc8OL9ApwSYyaYsw8GvJx4XMzYh_MlwB.6EsizZf4TDZ.Oh 0kxAMnTv1NZa8X5Dl6.WCR.6n9tqBM6iJiwyY17PfLaUa925.d3ji3vJvc5IxLc9FPwbRMMo66jB VUVMQsYVBKG8FfNL4.8IOa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dr4sQSEaMrmOZdNwYV1uwfOnCc0MTQbytwKvbA3Q9YIpzd BvW8C9.VIZ9j1Euz5JkZSx_i3RAv_Ht6.2dL7iLGPUkomKajWK0Rr_DFXUkn.cmzH49OVPd0tuZD Ckkw7p2SFPVuq52PvFdjDFsJjJVenF7.l7Vo4qsx3UtRGPGZie_lqIEFG3iKVreLl43NRwwAjFfP cDllY9A6sUL2wsXdBIkVNa23_7mYi5DD0IIjxrzsvtBLy2GKypzxx77y0uetmp02ihbQyvc.RhFn 89Uo1u8cO96keQFRMm.Z1D3.2eL.uVbl7CakdsBW4gYbI7ZTdgBW073TIYoUcDVXCZ0jfOxedgzJ y.qznbTyUS6qToJjKdcO.gs26Lhm6TU.lliQxgwH7Kkr.HB7Mx2RHfCyzaltQ7ICu.vwf_4EOxkO OiynXypDYUx.WuWICnJalYfsAvXm1xjUmyQizALp9agT2_uyDmtEyKU0zZUd_oUb.ffcoZrymfN3 KitDIlbi8BJ1m70SsnqPc3FcDnjk518CzW_0sfTFK.eeC5AEj6vXXK3mMJcg2wZFxL1I89n2wExm W5RbYDfKDnaaBS.3tE2ogMfb4IJuiz.FrvZfzP9PHpAlB.I45KMV6kWJNvW2GHMLBh_G4YICpsmp pEvnv5gPlEX_RmuAoCwm1lyZeQC26N2URAsZmvYg9ZCAqjfvCNOrrR.yX_ioWVKIFhDIplaE3b1N 1hhmyiwLw X-Sonic-MF: X-Sonic-ID: 8f03e7db-4e36-469c-9a19-dc374cf4e5b8 Received: from sonic.gate.mail.ne1.yahoo.com by sonic307.consmr.mail.gq1.yahoo.com with HTTP; Mon, 22 Jul 2024 04:08:17 +0000 Received: by hermes--production-gq1-799bb7c8cf-l6wmw (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 0eb7cae8457e6c1f76772f17e2954fb2; Mon, 22 Jul 2024 04:08:15 +0000 (UTC) Content-Type: text/plain; charset=us-ascii List-Id: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.600.62\)) Subject: Re: armv7-on-aarch64 stuck at urdlck: I got a replication of the "ampere2" bulk build hangup problem on a Windows DevKit 2023 From: Mark Millard In-Reply-To: <705AE360-C1C3-4B54-B6EE-FC81548D46B8@yahoo.com> Date: Sun, 21 Jul 2024 21:08:04 -0700 Cc: arm@freebsd.org, current@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <3D644314-7F84-4AA8-81A5-DCD29D4ABBC1@yahoo.com> References: <8214703E-AB28-4FB3-A3DD-03C87363D8C6@yahoo.com> <8E9579B7-2ABF-4446-B65E-E993E7B67C5C@yahoo.com> <9E98F6F6-6896-4958-9D88-FF68C4AB57F2@mit.edu> <705AE360-C1C3-4B54-B6EE-FC81548D46B8@yahoo.com> To: John F Carr , Konstantin Belousov , Baptiste Daroussin X-Mailer: Apple Mail (2.3774.600.62) X-Spamd-Bar: --- X-Spamd-Result: default: False [-4.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; FREEMAIL_TO(0.00)[mit.edu,gmail.com,FreeBSD.org]; MIME_TRACE(0.00)[0:+]; TO_DN_SOME(0.00)[]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; ARC_NA(0.00)[]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; FREEMAIL_FROM(0.00)[yahoo.com]; FROM_HAS_DN(0.00)[]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US]; RCVD_IN_DNSWL_NONE(0.00)[98.137.64.32:from]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; DKIM_TRACE(0.00)[yahoo.com:+]; MLMMJ_DEST(0.00)[arm@freebsd.org]; APPLE_MAILER_COMMON(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RWL_MAILSPIKE_POSSIBLE(0.00)[98.137.64.32:from]; RCPT_COUNT_FIVE(0.00)[5] X-Rspamd-Queue-Id: 4WS6Fv1D9Qz44MG On Jul 21, 2024, at 20:58, Mark Millard wrote: > I found a significant difference in my failing vs. working > armv7 contexts as installed: Presence vs. Lack of a .symtab > entry for the symbol _rtld_get_stack_prot in > /libexec/ld-elf.so.1 . >=20 > gdb inspection of operation shows distinctions based on > the difference. >=20 > This is related to the code: >=20 > (gdb) list 140 > 135 void > 136 _thr_stack_fix_protection(struct pthread *thrd) > 137 { > 138=20 > 139 mprotect((char *)thrd->attr.stackaddr_attr + > 140 round_up(thrd->attr.guardsize_attr), > 141 round_up(thrd->attr.stacksize_attr), > 142 _rtld_get_stack_prot()); > 143 } >=20 >=20 > Working context (Personal build): >=20 > NOTE THE .symtab ENTRY BELOW. It allows the gdb run to work: >=20 > # readelf -a /libexec/ld-elf.so.1 | grep -E "(^[^ = 0-9]|.*_rtld_get_stack_prot)" | less > ELF Header: > Elf file type is DYN (Shared object file) > Entry point 0x14548 > There are 10 program headers, starting at offset 52 > Program Headers: > There are 24 section headers, starting at offset 0x1f2b8: > Section Headers: > Key to Flags: > Dynamic section at offset 0x199f8 contains 15 entries: > Relocation section (.rel.dyn): > r_offset r_info r_type st_value st_name > Symbol table '.dynsym' contains 27 entries: > 5: 000000000001b9ac 16 FUNC GLOBAL DEFAULT 11 = _rtld_get_stack_prot@@FBSDprivate_1.0 (11) > Symbol table '.symtab' contains 911 entries: > 903: 000000000001b9ac 16 FUNC GLOBAL DEFAULT 11 = _rtld_get_stack_prot > Notes at offset 0x00000174 with length 0x00000018: > Histogram for bucket list length (total of 6 buckets): > Histogram for bucket list length (total of 27 buckets): > Version symbol section (.gnu.version): > Version definition section (.gnu.version_d): > Attribute Section: aeabi > File Attributes >=20 >=20 > Breakpoint 8.3, _thr_stack_fix_protection (thrd=3D0x2006f000) at = /usr/main-src/lib/libthr/thread/thr_stack.c:139 > 139 mprotect((char *)thrd->attr.stackaddr_attr + > (gdb) si > 141 round_up(thrd->attr.stacksize_attr), > (gdb)=20 > 140 round_up(thrd->attr.guardsize_attr), > (gdb)=20 > round_up (size=3D4096) at = /usr/main-src/lib/libthr/thread/thr_stack.c:129 > 129 if (size % _thr_page_size !=3D 0) > (gdb)=20 > 0x201110b8 129 if (size % _thr_page_size !=3D 0) > 130 size =3D ((size / _thr_page_size) + 1) * > (gdb)=20 > 0x201110c0 130 size =3D ((size / _thr_page_size) + 1) * > (gdb)=20 > 0x201110c4 in round_up (size=3D4096) at = /usr/main-src/lib/libthr/thread/thr_stack.c:130 > 130 size =3D ((size / _thr_page_size) + 1) * > (gdb)=20 > 0x201110c8 130 size =3D ((size / _thr_page_size) + 1) * > (gdb)=20 > round_up (size=3D67108864) at = /usr/main-src/lib/libthr/thread/thr_stack.c:129 > 129 if (size % _thr_page_size !=3D 0) > (gdb)=20 > 0x201110d0 in round_up (size=3D4096) at = /usr/main-src/lib/libthr/thread/thr_stack.c:129 > 129 if (size % _thr_page_size !=3D 0) > (gdb)=20 > 0x201110d4 in round_up (size=3D67108864) at = /usr/main-src/lib/libthr/thread/thr_stack.c:129 > 129 if (size % _thr_page_size !=3D 0) > (gdb)=20 > 0x201110d8 129 if (size % _thr_page_size !=3D 0) > (gdb)=20 > 0x201110dc in round_up (size=3D4096) at = /usr/main-src/lib/libthr/thread/thr_stack.c:129 > 129 if (size % _thr_page_size !=3D 0) > (gdb)=20 > 0x201110e0 129 if (size % _thr_page_size !=3D 0) > (gdb)=20 > _thr_stack_fix_protection (thrd=3D0x2006f000) at = /usr/main-src/lib/libthr/thread/thr_stack.c:139 > 139 mprotect((char *)thrd->attr.stackaddr_attr + > (gdb)=20 > 142 _rtld_get_stack_prot()); > (gdb)=20 > 0x20114880 in ?? () from /lib/libthr.so.3 > (gdb)=20 > 0x20114884 in ?? () from /lib/libthr.so.3 > (gdb)=20 > 0x20114888 in ?? () from /lib/libthr.so.3 > (gdb)=20 >=20 > Breakpoint 9.1, _rtld_get_stack_prot () at = /usr/main-src/libexec/rtld-elf/rtld.c:5884 > 5884 return (stack_prot); > (gdb)=20 > 0x2005b9b0 5884 return (stack_prot); > (gdb)=20 > 0x2005b9b4 5884 return (stack_prot); >=20 >=20 >=20 > Failing context (Official PkgBase build): >=20 > NOTE THE *LACK OF* THE .symtab ENTRY ABOVE. Not "ABOVE": BELOW! Sorry. > _rtld_bind_start ends > up in use instead, which looks to lead to the gdb run not working. >=20 > IN FACT, NOTE THE LACK OF ANY "Symbol table '.symtab' contains" > TEXT AT ALL! >=20 > # readelf -a /libexec/ld-elf.so.1 | grep -E "(^[^ = 0-9]|.*_rtld_get_stack_prot)" | less > ELF Header: > Elf file type is DYN (Shared object file) > Entry point 0x147b0 > There are 10 program headers, starting at offset 52 > Program Headers: > There are 22 section headers, starting at offset 0x1a960: > Section Headers: > Key to Flags: > Dynamic section at offset 0x1a4cc contains 15 entries: > Relocation section (.rel.dyn): > r_offset r_info r_type st_value st_name > Symbol table '.dynsym' contains 27 entries: > 5: 000000000001bcd8 16 FUNC GLOBAL DEFAULT 11 = _rtld_get_stack_prot@@FBSDprivate_1.0 (11) > Notes at offset 0x00000174 with length 0x00000018: > Histogram for bucket list length (total of 6 buckets): > Histogram for bucket list length (total of 27 buckets): > Version symbol section (.gnu.version): > Version definition section (.gnu.version_d): > Attribute Section: aeabi > File Attributes >=20 >=20 > Breakpoint 2.3, _thr_stack_fix_protection (thrd=3D0x20070000) at = /home/pkgbuild/worktrees/main/lib/libthr/thread/thr_stack.c:140 > 140 round_up(thrd->attr.guardsize_attr), > (gdb) si > 139 mprotect((char *)thrd->attr.stackaddr_attr + > (gdb)=20 > 141 round_up(thrd->attr.stacksize_attr), > (gdb)=20 > round_up (size=3D4096) at = /home/pkgbuild/worktrees/main/lib/libthr/thread/thr_stack.c:129 > 129 if (size % _thr_page_size !=3D 0) > (gdb)=20 > 130 size =3D ((size / _thr_page_size) + 1) * > (gdb)=20 > 129 if (size % _thr_page_size !=3D 0) > (gdb)=20 > 130 size =3D ((size / _thr_page_size) + 1) * > (gdb)=20 > 0x20112ef8 130 size =3D ((size / _thr_page_size) + 1) * > (gdb)=20 > 0x20116b60 in ?? () from /lib/libthr.so.3 > (gdb)=20 > 0x20116b64 in ?? () from /lib/libthr.so.3 > (gdb)=20 > 0x20116b68 in ?? () from /lib/libthr.so.3 > (gdb)=20 > 0x20116760 in ?? () from /lib/libthr.so.3 > (gdb)=20 > 0x20116764 in ?? () from /lib/libthr.so.3 > (gdb)=20 > 0x20116768 in ?? () from /lib/libthr.so.3 > (gdb)=20 > 0x2011676c in ?? () from /lib/libthr.so.3 > (gdb)=20 > _rtld_bind_start () at = /home/pkgbuild/worktrees/main/libexec/rtld-elf/arm/rtld_start.S:78 > 78 stmdb sp!,{r0-r5,sl,fp} > (gdb) si > 80 sub r1, ip, lr /* r1 =3D 4 * (n + 1) */ > (gdb)=20 > 81 sub r1, r1, #4 /* r1 =3D 4 * n */ > (gdb)=20 > 82 add r1, r1, r1 /* r1 =3D 8 * n */ > (gdb)=20 > 84 ldr r0, [lr, #-4] /* get obj ptr from GOT[1] */ > (gdb)=20 > 85 mov r4, ip /* save GOT location */ > (gdb)=20 > 87 mov r5, sp /* Save the stack pointer */ > (gdb)=20 > 88 bic sp, sp, #7 /* Align the stack pointer */ > (gdb)=20 > _rtld_bind_start () at = /home/pkgbuild/worktrees/main/libexec/rtld-elf/arm/rtld_start.S:89 > 89 bl _rtld_bind /* Call the binder */ >=20 >=20 > I have not checked for other .symtab entry problems. >=20 > Nor have I figured out why the installed materials are > different for Symbol table '.symtab' . So this is not > yet root-cause information. =3D=3D=3D Mark Millard marklmi at yahoo.com