From nobody Sun Jul 21 10:36:56 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 4WRfx42yq1z5RFvq for ; Sun, 21 Jul 2024 10:37:12 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic301-21.consmr.mail.gq1.yahoo.com (sonic301-21.consmr.mail.gq1.yahoo.com [98.137.64.147]) (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 4WRfx25jndz49x8 for ; Sun, 21 Jul 2024 10:37:10 +0000 (UTC) (envelope-from marklmi@yahoo.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yahoo.com header.s=s2048 header.b=QnTp6GTl; dmarc=pass (policy=reject) header.from=yahoo.com; spf=pass (mx1.freebsd.org: domain of marklmi@yahoo.com designates 98.137.64.147 as permitted sender) smtp.mailfrom=marklmi@yahoo.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1721558228; bh=M3e/1S6z8Wc/7QF5dmL0HKBS38LJd8l7U+ufbuIrvu4=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From:Subject:Reply-To; b=QnTp6GTl2jkDHMCsS88a192pYAxkzOC0L5gPv5L1MIS4IOWr/iVHCRaMSLv1V229F0RYS1QTb1HkjaAP7N/kWa6NiukJWHJ3YXLQKx5NFD4CCKxzc2JJva8yo7qwOk8AWGGLk5l7AnUNLdnVE0nJFkPl7DshQiZY/SwESoB/yhsV16aAMn2fSsw+uEAiX7/093mgTk1mS2wJ8ienSwoic4VE2aUa1JPDuzO/WNq6zOgDKEuEwTMbb2t0ARbkv8X4eIyk7+fciYLu6vZnwNpvfB1TJK98cIMTy6BOulnG5Z5LH2WzHPShqXZ4wpXpYd2LBQZAjZKuWwKuDYusnutqqw== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1721558228; bh=+wzY4/SQm4WUjbu8fQ2Pi+Bf6ip3yETzsPjYplBsBii=; h=X-Sonic-MF:Subject:From:Date:To:From:Subject; b=fY5oddxQtZLzQe3Tj/Pfmk3eo+tQ5VOjRKDXsCKLomaUY/Clo9rFGsMv5K0NtRvp2ZZ6x1a3xnqxqxL4VJq2tBs+sVruJrgg7jK7tPOTQqaWkG9ldc6E3bNwVbFFF0VKdNXyxZMNGvfkPxAHIbO5O7fEcBvLeGVS6h23CWra1TmFK01LnwGGhqDy7OYHRpJ+q5QlkEwUWzDwkAPpMOGTm8U85DaNe8osaFz3pKzQoe21TgKqMBJpqqJF+WLmfANRPgDK2lriIBIXsyej1m6yRdc895vKcd5GtRu121OFrTrF5KEC4CfZT85bq7x88LyRARynZX2brw/0c5aK2Joqhg== X-YMail-OSG: aaTQcYMVM1lS1OxqAr.uFTJSslnTy.jdUabfRnMKmufUB5qYEODLd9zvvNK47BX 7_6WdLkExeK6WsnoGM1L7.zDtGwluiO5RLfs4Q3GcTfonEeh5.1lJSRvDEYZNSfOVvRCpbCQGbOk 8LmqiYHOrqi4Q1QYy4A4xD1KezrzMF6W8LmV22_pZzQDZkOboK3NieHDmzTEWzRtO.mZSpT7tZ9K 7_mou23ITsgyEqEg7PMmZPF7vlDVw2HHcnhyAEw_C_BpqIcTGhUzKNbue0muxApimAgTyWjs6PM1 ApvnQqFL3de3aty.Syc_jIiwbYs88BsRb7rad6KJGRRQauNkQ5rILubSd2aszB56HDQJAIXlZrR2 KU2VuIW0SK5JUtTnfRmftL_rkXzVzuSv.zoLzQeTxm76cabBAULezQVznlmVpye1oXTeYMrPkVgP RfmQZXjO06AugiKUjZL4WODNtDEdUAfU1w.cmX.LsdjhUk19WDOHcoEgZnqoII4vt1xXA598sWcW jS31i1wP2nJQUmYqi_NkEqF9BXb7gmwDOpNNTmiukKlmdsLfPaa6wCdfCq29GUY5MFKspZhLkw9M J8HuIpY_vhZnDf1h46R2prMTE4hx5ACiPlXYQn2f1LATWEbXWqUe602o9PIhTHrzgk63.hhpwC40 uAgyDLjTyrS3.vBUKPi0OtAp3EunCgAQpQ8DM9WJDbsZrAL7TjgbNNO3lBmqXXAtSI.DSB3uXmJa im5uM.37siNKoa5Jn9qIED4ZdbOnJnmP9NfWJ677nnKbNbnHnWjNR1tI6v3hmM848dgJHBv23vfY M6bLxEEaWIejMKM5MEZWkCmxqZbc10TpAiXDUcFnOp9w3HBoV_mkpItIdsWJeZ6DQRaYfb8ILWaB VOWaaYW9bW4aZ86bTgAeMhiFb6Q1nsr7OImseVQa0zQ2NFsBk15uDZiUemdk3OV9vWBpFRP2WNPP 846AmMxC_l8x_Kk8qK0D5Xyv3DY9UVubyq1tgCtvLI_ZuOXDNLVT6.uB8PxUXRPL44wpHybhRJ6X yJp4yxo.XjpF3zY89TiUzpUF.lspKgBGoGSZBqG0bhbXDuMGyHQRTiSp3qO694FZoeb2ecIDwAMo iEhtrfqY4zjabRY4LfcDcmTb0.iBrPZT_Np_7jCO2I7Lm0aPN68LuoBMj9tZ8uC4GARb1Z5.2m92 ziRxErxRu8cdcUYUTuHvQK.w9F0Fx1gGDG5G4PWZKiqPZbrK.YKT1pUtjeu5X7C0JQkLFtDQrABp 27LY94lOR8oRMdDF4ag8EtJZEE7mU2dY.V.GQUC3shZxIxkBg9acaimUufpkHB49tYn90Xkas43j ZwcgblfUlxdE7JX7LWuX9_E54urcw3dEKvxQIZPf9rQDI1bdNcxkmwOLVuadGecfbM.m6TMBl.7x CiaGa9euEX8oJ3_6EG9toqKB6m2kL6Uf6.KZcesyZvyIuvrhO6_pdpk7fp7hu2z4QXswsysyoN8_ ivwpwPSqZGHv_wIEAH3VSBMS9krVNFWmQGZMCF9Q2m.0PNqUzgPFOi8SoJd1c0.7NKE6j3LlEfUm vzxRrnnKZ84YDzw5CvX2..Yx7oyGmKuhUROMQK6a6TOmGUCj0.Ny047dwSnz88os4JJDWGP7gvZp 9rp9qSNm3Mj2m3MpxX0ZggcZlSGs1VqBna7FjDHIH0N4Ixy2vclwhq0NIi14R7hY05enqyb_tYBG eu2tiuU98R4PFXF7UFESD8lYICaMSi51LQYPDNtnIQcMlm9UvMJ4aQ2jDu2FJcgh3xvYy9uXdicZ r0Nbkp_GWF7z_gWrpNI0jPfMlCUVoRQiUddxpZB2u264uz064UtkgxH21JChQI6NhD9.20pEVwNc fCvHKdoECGGFuuFIAEnMnRI21DP2_x3ZL_27jV7A0.2X2DRQfCHQWdKhmXJGE5Qv0ueV3HMkVSnj ICfAEb0Hdy2uQIfivSWKNcS_37WKf381ucsSc606QW_7ghYYwkHwln_jd9scZTltf0C83XBu2bCd esTfkM_9Op6NYa0iNHqccBiCbnH4lC04vPIayYejRLYsB8ljPQT6dKjATx1eRxlCBLV9iizxhAxI QDA5el32I4J4dhsA1jq5dF012j1CuUw11fE9pNFIbzKeILdtfSBgxt2gLucQSK.UdRnvY0In3xyN dONHnWkylcWFHwMska3FHwhwSTKzwbgeu7Xra3Xs0kOhpY0IzrH5qD1uP0PWyKx.cfphH0DANVPZ wgQoZAn_rfnWqHh_zBXzqSmUkkUdGZkyxkVahcgyyJmOslycyZBckcdkqs4qT.78uWGgJjvF9P.O xr.o- X-Sonic-MF: X-Sonic-ID: 2cbca218-c36d-4f45-9ef0-4e2f2dc5f3eb Received: from sonic.gate.mail.ne1.yahoo.com by sonic301.consmr.mail.gq1.yahoo.com with HTTP; Sun, 21 Jul 2024 10:37:08 +0000 Received: by hermes--production-gq1-799bb7c8cf-b6h6x (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 905ed81921bd3de58b8aa68efb769745; Sun, 21 Jul 2024 10:37:06 +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: <8E9579B7-2ABF-4446-B65E-E993E7B67C5C@yahoo.com> Date: Sun, 21 Jul 2024 03:36:56 -0700 Cc: arm@freebsd.org, current@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <8214703E-AB28-4FB3-A3DD-03C87363D8C6@yahoo.com> <8E9579B7-2ABF-4446-B65E-E993E7B67C5C@yahoo.com> To: Konstantin Belousov X-Mailer: Apple Mail (2.3774.600.62) X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.72 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.72)[-0.722]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; FROM_HAS_DN(0.00)[]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; FREEMAIL_TO(0.00)[gmail.com]; FREEMAIL_FROM(0.00)[yahoo.com]; TO_DN_SOME(0.00)[]; DKIM_TRACE(0.00)[yahoo.com:+]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; 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.147:from]; RCVD_IN_DNSWL_NONE(0.00)[98.137.64.147:from] X-Rspamd-Queue-Id: 4WRfx25jndz49x8 On Jul 20, 2024, at 16:42, Mark Millard wrote: > On Jul 20, 2024, at 01:57, Konstantin Belousov = wrote: >=20 >> [Everything and everybody in Cc: are stripped for good]. >>=20 >> On Fri, Jul 19, 2024 at 10:38:36PM -0700, Mark Millard wrote: >>> 0x201375c0 - 0x2014092c is .bss in /lib/libthr.so.3 >>>=20 >>> (gdb) bt >>> #0 0x201aeec0 in __pthread_map_stacks_exec () from /lib/libc.so.7 >>> #1 0x2005d1e4 in ?? () from /libexec/ld-elf.so.1 >>> Backtrace stopped: previous frame identical to this frame (corrupt = stack?) >>> (gdb) disass >>> Dump of assembler code for function __pthread_map_stacks_exec: >>> =3D> 0x201aeec0 <+0>: ldr r0, [pc, #8] @ 0x201aeed0 = <__pthread_map_stacks_exec+16> >>> 0x201aeec4 <+4>: add r0, pc, r0 >>> 0x201aeec8 <+8>: ldr r0, [r0, #156] @ 0x9c >>> 0x201aeecc <+12>: bx r0 >>> 0x201aeed0 <+16>: andseq r6, r7, r4, lsr #12 >>> End of assembler dump. >>>=20 >>=20 >> Do the following: >> 1. Rebuild rtld/libc/libthr with the debugging info and no = optimization, >> i.e. ensure that flags are "-O0 -g" or "-Og -g" and not -O2. See >> the first comment in libexec/rtld-elf/Makefile for the hint how to >> do it. >=20 > I did a full buildworld with "-Og -g" via temporary > use of: >=20 > diff --git a/share/mk/sys.mk b/share/mk/sys.mk > index 44db9266784f..9c6c7ce575a4 100644 > --- a/share/mk/sys.mk > +++ b/share/mk/sys.mk > @@ -145,7 +145,8 @@ CC ?=3D c89 > CFLAGS ?=3D -O > .else > CC ?=3D cc > -CFLAGS ?=3D -O2 -pipe > +#CFLAGS ?=3D -O2 -pipe > +CFLAGS ?=3D -Og -g -pipe > .if defined(NO_STRICT_ALIASING) > CFLAGS +=3D -fno-strict-aliasing > .endif >=20 > I installed the result armv7 world into a > directory tree and installed pkg and cairo. >=20 >> 2. Reproduce the issue >=20 > The dlopen_test.c based case does not fail under the world > built with "-Og -g": >=20 > # cc -g -std=3Dc11 -pedantic -Wall -pthread dlopen_test.c ; ./a.out > #=20 >=20 >> under gdb >=20 > (gdb) run > Starting program: /root/a.out [Inferior 1 (process 36680) exited = normally] > (gdb)=20 >=20 > So it does not reproduce in gdb when buildworld was based > on "-Og -g". I found another context that has useful debugger information and also fails. It avoids graphviz being involved: ) a pkgbase install that I had around (pkgbase has debug information) ) also set up /home/pkgbuild/worktrees/main/ to refer to the /usr/src/ = that pkgbase put in place ) pkg install cairo ) use of my simple dlopen program (gdb) run Starting program: /root/a.out =20 Catchpoint 7 Inferior loaded /lib/libgcc_s.so.1 /lib/libthr.so.3 /lib/libc.so.7 /lib/libsys.so.7 r_debug_state (rd=3D, m=3D) at = /home/pkgbuild/worktrees/main/libexec/rtld-elf/rtld.c:4485 4485 } (gdb) c Continuing. Breakpoint 3, get_program_var_addr (name=3D0x20042f2a "__progname", = lockstate=3D0x0) at = /home/pkgbuild/worktrees/main/libexec/rtld-elf/rtld.c:4523 4523 symlook_init(&req, name); (gdb) c Continuing. Breakpoint 3, get_program_var_addr (name=3D0x20043c97 "environ", = lockstate=3D0x0) at = /home/pkgbuild/worktrees/main/libexec/rtld-elf/rtld.c:4523 4523 symlook_init(&req, name); (gdb) c Continuing. Breakpoint 3, get_program_var_addr (name=3D0x20043c9f = "__elf_aux_vector", lockstate=3D0x0) at = /home/pkgbuild/worktrees/main/libexec/rtld-elf/rtld.c:4523 4523 symlook_init(&req, name); (gdb) c Continuing. Breakpoint 3, get_program_var_addr (name=3D0x200442e8 "__libc_atexit", = lockstate=3Dlockstate@entry=3D0xffffd668) at = /home/pkgbuild/worktrees/main/libexec/rtld-elf/rtld.c:4523 4523 symlook_init(&req, name); (gdb) c Continuing. Catchpoint 7 Inferior loaded /usr/local/lib/libcairo.so.2 /usr/local/lib/libpixman-1.so.0 /usr/local/lib/libfontconfig.so.1 /usr/local/lib/libfreetype.so.6 /usr/local/lib/libEGL.so.1 /usr/lib/libdl.so.1 /usr/local/lib/libpng16.so.16 /usr/local/lib/libxcb-shm.so.0 /usr/local/lib/libxcb.so.1 /usr/local/lib/libxcb-render.so.0 /usr/local/lib/libXrender.so.1 /usr/local/lib/libX11.so.6 /usr/local/lib/libXext.so.6 /lib/libz.so.6 /usr/local/lib/libGL.so.1 /lib/libm.so.5 /usr/local/lib/libexpat.so.1 /usr/lib/libbz2.so.4 /usr/local/lib/libbrotlidec.so.1 /usr/local/lib/libGLdispatch.so.0 /usr/local/lib/libXau.so.6 /usr/local/lib/libXdmcp.so.6 /usr/local/lib/libGLX.so.0 /usr/local/lib/libbrotlicommon.so.1 r_debug_state (rd=3D, m=3D) at = /home/pkgbuild/worktrees/main/libexec/rtld-elf/rtld.c:4485 4485 } (gdb) c Continuing. Breakpoint 3, get_program_var_addr (name=3D0x200435bf = "__pthread_map_stacks_exec", lockstate=3D0xffffd290) at = /home/pkgbuild/worktrees/main/libexec/rtld-elf/rtld.c:4523 4523 symlook_init(&req, name); (gdb) c Continuing. Breakpoint 8.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) bt #0 _thr_stack_fix_protection (thrd=3D0x20070000) at = /home/pkgbuild/worktrees/main/lib/libthr/thread/thr_stack.c:140 #1 __thr_map_stacks_exec () at = /home/pkgbuild/worktrees/main/lib/libthr/thread/thr_stack.c:178 #2 0x2005d1e4 in map_stacks_exec (lockstate=3D0xffffd290) at = /home/pkgbuild/worktrees/main/libexec/rtld-elf/rtld.c:5946 #3 dlopen_object (name=3Dname@entry=3D0x1042d = "/usr/local/lib/libcairo.so.2", fd=3D, fd@entry=3D-1, = refobj=3D, lo_flags=3D, mode=3D1, = lockstate=3D0xffffd290) at /home/pkgbuild/worktrees/main/libexec/rtld-elf/rtld.c:3872 #4 0x20059e4c in rtld_dlopen (name=3D0x1042d = "/usr/local/lib/libcairo.so.2", fd=3D-1, mode=3D1) at = /home/pkgbuild/worktrees/main/libexec/rtld-elf/rtld.c:3751 #5 0x00020510 in main () at dlopen_test.c:14 (gdb) s 139 mprotect((char *)thrd->attr.stackaddr_attr + (gdb) s 141 round_up(thrd->attr.stacksize_attr), (gdb) s 140 round_up(thrd->attr.guardsize_attr), (gdb) s 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) s 130 size =3D ((size / _thr_page_size) + 1) * (gdb) bt #0 round_up (size=3D4096) at = /home/pkgbuild/worktrees/main/lib/libthr/thread/thr_stack.c:130 #1 _thr_stack_fix_protection (thrd=3D0x20070000) at = /home/pkgbuild/worktrees/main/lib/libthr/thread/thr_stack.c:140 #2 __thr_map_stacks_exec () at = /home/pkgbuild/worktrees/main/lib/libthr/thread/thr_stack.c:178 #3 0x2005d1e4 in map_stacks_exec (lockstate=3D0xffffd290) at = /home/pkgbuild/worktrees/main/libexec/rtld-elf/rtld.c:5946 #4 dlopen_object (name=3Dname@entry=3D0x1042d = "/usr/local/lib/libcairo.so.2", fd=3D, fd@entry=3D-1, = refobj=3D, lo_flags=3D, mode=3D1, = lockstate=3D0xffffd290) at /home/pkgbuild/worktrees/main/libexec/rtld-elf/rtld.c:3872 #5 0x20059e4c in rtld_dlopen (name=3D0x1042d = "/usr/local/lib/libcairo.so.2", fd=3D-1, mode=3D1) at = /home/pkgbuild/worktrees/main/libexec/rtld-elf/rtld.c:3751 #6 0x00020510 in main () at dlopen_test.c:14 (gdb) si 129 if (size % _thr_page_size !=3D 0) (gdb) 130 size =3D ((size / _thr_page_size) + 1) * (gdb) bt #0 round_up (size=3D4096) at = /home/pkgbuild/worktrees/main/lib/libthr/thread/thr_stack.c:130 #1 _thr_stack_fix_protection (thrd=3D0x20070000) at = /home/pkgbuild/worktrees/main/lib/libthr/thread/thr_stack.c:140 #2 __thr_map_stacks_exec () at = /home/pkgbuild/worktrees/main/lib/libthr/thread/thr_stack.c:178 #3 0x2005d1e4 in map_stacks_exec (lockstate=3D0xffffd290) at = /home/pkgbuild/worktrees/main/libexec/rtld-elf/rtld.c:5946 #4 dlopen_object (name=3Dname@entry=3D0x1042d = "/usr/local/lib/libcairo.so.2", fd=3D, fd@entry=3D-1, = refobj=3D, lo_flags=3D, mode=3D1, = lockstate=3D0xffffd290) at /home/pkgbuild/worktrees/main/libexec/rtld-elf/rtld.c:3872 #5 0x20059e4c in rtld_dlopen (name=3D0x1042d = "/usr/local/lib/libcairo.so.2", fd=3D-1, mode=3D1) at = /home/pkgbuild/worktrees/main/libexec/rtld-elf/rtld.c:3751 #6 0x00020510 in main () at dlopen_test.c:14 (gdb) disass /s Dump of assembler code for function __thr_map_stacks_exec: . . . 130 size =3D ((size / _thr_page_size) + 1) * 0x20112eec <+340>: mov r0, r6 129 if (size % _thr_page_size !=3D 0) 0x20112ef0 <+344>: ldr r4, [pc, r4] 130 size =3D ((size / _thr_page_size) + 1) * =3D> 0x20112ef4 <+348>: mov r1, r4 0x20112ef8 <+352>: bl 0x20116b60 NOTE: 0x20116760 - 0x20116f30 is .plt in /lib/libthr.so.3 --Type for more, q to quit, c to continue without paging-- 0x20112efc <+356>: mov r9, r0 0x20112f00 <+360>: mov r0, r5 0x20112f04 <+364>: mov r1, r4 0x20112f08 <+368>: bl 0x20116b60 NOTE: 0x20116760 - 0x20116f30 is .plt in /lib/libthr.so.3 0x20112f0c <+372>: mls r1, r0, r4, r5 . . . (gdb) si 0x20112ef8 130 size =3D ((size / _thr_page_size) + 1) * (gdb) 0x20116b60 in ?? () from /lib/libthr.so.3 (gdb) bt #0 0x20116b60 in ?? () from /lib/libthr.so.3 #1 0x20112efc in round_up (size=3D4096) at = /home/pkgbuild/worktrees/main/lib/libthr/thread/thr_stack.c:130 #2 _thr_stack_fix_protection (thrd=3D0x20070000) at = /home/pkgbuild/worktrees/main/lib/libthr/thread/thr_stack.c:140 #3 __thr_map_stacks_exec () at = /home/pkgbuild/worktrees/main/lib/libthr/thread/thr_stack.c:178 #4 0x2005d1e4 in map_stacks_exec (lockstate=3D0xffffd290) at = /home/pkgbuild/worktrees/main/libexec/rtld-elf/rtld.c:5946 #5 dlopen_object (name=3Dname@entry=3D0x1042d = "/usr/local/lib/libcairo.so.2", fd=3D, fd@entry=3D-1, = refobj=3D, lo_flags=3D, mode=3D1, = lockstate=3D0xffffd290) at /home/pkgbuild/worktrees/main/libexec/rtld-elf/rtld.c:3872 #6 0x20059e4c in rtld_dlopen (name=3D0x1042d = "/usr/local/lib/libcairo.so.2", fd=3D-1, mode=3D1) at = /home/pkgbuild/worktrees/main/libexec/rtld-elf/rtld.c:3751 #7 0x00020510 in main () at dlopen_test.c:14 (gdb) si 0x20116b64 in ?? () from /lib/libthr.so.3 (gdb) si 0x20116b68 in ?? () from /lib/libthr.so.3 (gdb) si 0x20116760 in ?? () from /lib/libthr.so.3 (gdb) si 0x20116764 in ?? () from /lib/libthr.so.3 (gdb) si 0x20116768 in ?? () from /lib/libthr.so.3 (gdb) si 0x2011676c in ?? () from /lib/libthr.so.3 (gdb) si _rtld_bind_start () at = /home/pkgbuild/worktrees/main/libexec/rtld-elf/arm/rtld_start.S:78 78 stmdb sp!,{r0-r5,sl,fp} (gdb) bt #0 _rtld_bind_start () at = /home/pkgbuild/worktrees/main/libexec/rtld-elf/arm/rtld_start.S:78 #1 0x201373b0 in ?? () from /lib/libthr.so.3 NOTE: 0x201373a8 - 0x201375a0 is .got.plt in /lib/libthr.so.3 Backtrace stopped: previous frame identical to this frame (corrupt = stack?) Turns out that _thr_rtld_rlock_acquire is looping when the process is stuck: . . . (gdb) bt #0 _thr_rtld_rlock_acquire (lock=3D0x20137c40) at = /home/pkgbuild/worktrees/main/lib/libthr/thread/thr_rtld.c:121 #1 0x20060788 in rlock_acquire (lock=3D0x2008af10 , = lockstate=3Dlockstate@entry=3D0xffffd0ec) at = /home/pkgbuild/worktrees/main/libexec/rtld-elf/rtld_lock.c:259 #2 0x20059098 in _rtld_bind (obj=3D0x2008f404, reloff=3D496) at = /home/pkgbuild/worktrees/main/libexec/rtld-elf/rtld.c:1035 #3 0x2005483c in _rtld_bind_start () at = /home/pkgbuild/worktrees/main/libexec/rtld-elf/arm/rtld_start.S:89 #4 0x2005483c in _rtld_bind_start () at = /home/pkgbuild/worktrees/main/libexec/rtld-elf/arm/rtld_start.S:89 #5 0x2005483c in _rtld_bind_start () at = /home/pkgbuild/worktrees/main/libexec/rtld-elf/arm/rtld_start.S:89 . . . (gdb) info threads Id Target Id Frame * 1 LWP 100174 of process = 97711 _thr_rtld_rlock_acquire (lock=3D0x20137c40) at = /home/pkgbuild/worktrees/main/lib/libthr/thread/thr_rtld.c:121 So: Only the one main thread. It is repeating the _thr_rwlock_rdlock loop (lines 121/122): (gdb) list 115 110 _thr_rtld_rlock_acquire(void *lock) 111 { 112 struct pthread *curthread; 113 struct rtld_lock *l; 114 int errsave; 115=09 116 curthread =3D _get_curthread(); 117 SAVE_ERRNO(); 118 l =3D (struct rtld_lock *)lock; 119=09 (gdb)=20 120 THR_CRITICAL_ENTER(curthread); 121 while (_thr_rwlock_rdlock(&l->lock, 0, NULL) !=3D 0) 122 ; 123 curthread->rdlock_count++; 124 RESTORE_ERRNO(); 125 } >> , and backtrace all threads from userspace. >> I only need userspace backtrace, not either kernel-side stacks nor >> the syscall history. >>=20 >> Are you sure that the issue is specific to armv7, might be it takes = more >> efforts to reproduce on host native? =3D=3D=3D Mark Millard marklmi at yahoo.com