From nobody Mon Jul 22 11:38:00 2024 X-Original-To: current@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 4WSJF76Y2Wz5QV7k for ; Mon, 22 Jul 2024 11:38:19 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic314-19.consmr.mail.gq1.yahoo.com (sonic314-19.consmr.mail.gq1.yahoo.com [98.137.69.82]) (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 4WSJF63scQz4mvn for ; Mon, 22 Jul 2024 11:38:18 +0000 (UTC) (envelope-from marklmi@yahoo.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yahoo.com header.s=s2048 header.b=hqf1n+Lc; dmarc=pass (policy=reject) header.from=yahoo.com; spf=pass (mx1.freebsd.org: domain of marklmi@yahoo.com designates 98.137.69.82 as permitted sender) smtp.mailfrom=marklmi@yahoo.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1721648295; bh=CQeUZ4xi/FWw/93HGvtiTYggIUVU0XgGM+meSdtv/gQ=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From:Subject:Reply-To; b=hqf1n+LcSaQuA2PMF2OcwlNGdH+fNad1VbQ6/OV30wQ8RZABNtIugV+4fbo2BfCPYbnHFkxeLCUSmeJ/+r0EEGmKqnjvfLiKkLt56LM3Oj15EDIdbC22/U/bV8Wa9Gas9o/PGk3u5PYN1FTYCMJSyYXM6BS/EJmeHpWpd1fdFyphN02sgwAZPSDuAzjStviLk34eIwiMCKSXX6v/oqPRz43P9spKVdWW0t0PLMFXE+qHZI4xrXoPU0Wuur86UyPrNrU2mjV37jHh6zEUgdHuaTNjOZIQYEdqcDkttRo/Tv6CuqnXfVmweMW/SWpszaRRW6RaBPWVRihVLU9d2Z035g== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1721648295; bh=NOyyRKeOGj7Ll7W5X5wIWIUT39PbPnSVDtYBgG0mYKp=; h=X-Sonic-MF:Subject:From:Date:To:From:Subject; b=Mflp7WmYsKozJOy6+GkE31xPRRQXIK7hQHw4nDdKIdC+/3HO7qKx0TMQeK9yWusa3/t93INliivQBizxwEqwZpy4qdXH8LQWfMzTluDrYJ/oNaQF416L6MpcvWs1aYcFZVfri3L6VRoQFCXjcO3Yyd9/cXZQIamB2W1j/FX76LtUeA3EStRbr/WsU7VnwtMtNC/oWGsWHHWjtT6HZm6sgYzp6ybQgimsnPNZzgnWT+MHJBVomDGzbUusyOYDFnOJAUYO2qVLWFcjLdC48a214WHtu8i4mOrfMUxZ9R333yVXYDqnjvoocXdHT4vfTPn9A1AnOTl9FyTgTV4ct3flvw== X-YMail-OSG: lkm_.GoVM1m7hE_EvdrrIvRccCLlXl5dj0hfbv6jgLrfOUldmlS1TIuyg9miVOB CgdhPB8Lu.J.rrCTg3e4OzfOuse5x_NqDqM2RIlbGdTWfhIB.cnOvo5Dm2OAMro6F97WlSyaw0jP osVi5cR9xA1AtO2da.O39wa9BFnsYeVO5u6Gw5cFYQxYM6EgaGiDSxmQJjbkp7zfQer9FCnXjXnf AExdbrgZZb01_V74SJjCxcyiLMlx3ULQ3w8wB2bMa.U01PFKY_K5viw9DWXycrHFsmsekt.AL6uc oIdI2qbIzm2uWejmrfoXhiaqUk852HsKCvBDWrxcoeZZvaVLdl_fxU_Y0K_eEGfF2O7Wu4WXIEy2 oNCaMb9u6M2M1ee98Nu7ilnX5CCjxgfQkfTdA4io1vtLRkpF4m31GtX9VueQFY1Y5tuEme03Q23X MvrasPXAWvX7.e21XM9bvecOyUM._7qutTd7KFxhVcbm28my2UYgtZBWsEFSO9QTnsxnIsJ2OntU LHy8cJd.bMItOUogywxOMmbh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.OWQw3HWxnRYKb__h2Txxn2WEtHoyGWGnyclouV2LBCb5Focbog5SAXoT4itey4wY E43m0tZFnbrFIJsIe9dMn5sfIfizLkJSBTUS_S1KVDpkVCAAUh0PhIzPQwsrt1qlzOECzv5DKydn 09aTOopCino02DqsBkSPbt9ueFa.FNTPLksKbiRxTicGpoEd897ciG_JuSaHXjwQKGkmQ8C6BE11 Zwz955Bh9HCdDmUYFq3GzXv1mDgzcVsU7JKVy0JCWSxRJqOhAL1Tw5u7QaHtmykRM4CD8W1MjzA0 fadzd1HIV_1FXLkvY0FRoBIzJUpok9bC5f.PIfYSasLL8hQfSyWVYd2iXNolcgm5x.EhxT6XaN82 ViTXKt_e_T2ujYHORw4VXK8uLbF2ihaNIv18PAKrdbIXReRlfwyVihTs1Xw1PhMZhcrVvrsmrWB6 aghPZBR59f.tEOJWRg9IJsz_YaQscQarwqJDz1c48iq2ooSUnSi4wxhqmnyAhkV3Y85mAN9gwvue L0cQ1voQIcRURebYzewi_MxTR8JOekEpm7kcuoY0Z25umrWhXZLZjTljggFA6AfXTUt70LAwWYe4 drjxdI6398ubXbvyso6refeE5RVVsj4eEy_xA5BvOMGPF460PHl.KmFWQxbPAQi60YV42KvfoIY6 o292JdSNEMjPkkNtsM2LMZXw6jsTBd.TnEnaPzxyQSKjw.TraTqU47qIjLEQdiXw.IE5Ou.HHX.n oLSbyT5EfBsNvFQ-- X-Sonic-MF: X-Sonic-ID: a575e83c-d104-4b6c-ad10-b834aa0fc90f Received: from sonic.gate.mail.ne1.yahoo.com by sonic314.consmr.mail.gq1.yahoo.com with HTTP; Mon, 22 Jul 2024 11:38:15 +0000 Received: by hermes--production-gq1-799bb7c8cf-t9jf4 (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID ea6df577ae12922c19a61e70302569e0; Mon, 22 Jul 2024 11:38:11 +0000 (UTC) Content-Type: text/plain; charset=us-ascii List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@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: <3D644314-7F84-4AA8-81A5-DCD29D4ABBC1@yahoo.com> Date: Mon, 22 Jul 2024 04:38:00 -0700 Cc: arm@freebsd.org, current@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <0FD31A4D-DE2C-400A-B6DB-FA3EAB94E374@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> <3D644314-7F84-4AA8-81A5-DCD29D4ABBC1@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 [-3.69 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.69)[-0.686]; 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.69.82: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)[current@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.69.82:from]; RCPT_COUNT_FIVE(0.00)[5] X-Rspamd-Queue-Id: 4WSJF63scQz4mvn On Jul 21, 2024, at 21:08, Mark Millard wrote: > On Jul 21, 2024, at 20:58, Mark Millard wrote: >=20 >> 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. >=20 > Not "ABOVE": BELOW! Sorry. >=20 >> _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. I know why. My personal FreeBSD builds have long had my equivalents of src.conf (under normal naming) contain: # # Avoid stripping but do not control host -g status as well: DEBUG_FLAGS+=3D This likely replaces my earlier -mcpu=3Dcortex-a7 hypothesis for what a systematic difference might be that could contribute to the personal builds not having the problem. =3D=3D=3D Mark Millard marklmi at yahoo.com