From nobody Sat Jul 20 08:57:26 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 4WR0mb2D3Xz5RHFd; Sat, 20 Jul 2024 08:57:35 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 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 4WR0mZ3QGvz4gMv; Sat, 20 Jul 2024 08:57:34 +0000 (UTC) (envelope-from kostikbel@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: from tom.home (kib@localhost [127.0.0.1] (may be forged)) by kib.kiev.ua (8.18.1/8.18.1) with ESMTP id 46K8vQvo061574; Sat, 20 Jul 2024 11:57:29 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 46K8vQvo061574 Received: (from kostik@localhost) by tom.home (8.18.1/8.18.1/Submit) id 46K8vQKv061573; Sat, 20 Jul 2024 11:57:26 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 20 Jul 2024 11:57:26 +0300 From: Konstantin Belousov To: Mark Millard Cc: arm@freebsd.org, current@freebsd.org Subject: Re: armv7-on-aarch64 stuck at urdlck: I got a replication of the "ampere2" bulk build hangup problem on a Windows DevKit 2023 Message-ID: References: <8214703E-AB28-4FB3-A3DD-03C87363D8C6@yahoo.com> 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 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on tom.home X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:6939, ipnet:2001:470::/32, country:US] X-Rspamd-Queue-Id: 4WR0mZ3QGvz4gMv [Everything and everybody in Cc: are stripped for good]. On Fri, Jul 19, 2024 at 10:38:36PM -0700, Mark Millard wrote: > 0x201375c0 - 0x2014092c is .bss in /lib/libthr.so.3 > > (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: > => 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. > 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. 2. Reproduce the issue under gdb, and backtrace all threads from userspace. I only need userspace backtrace, not either kernel-side stacks nor the syscall history. Are you sure that the issue is specific to armv7, might be it takes more efforts to reproduce on host native?