From nobody Wed Oct 09 08:50:50 2024 X-Original-To: freebsd-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 4XNmnk50V6z5Z1cD for ; Wed, 09 Oct 2024 08:51:06 +0000 (UTC) (envelope-from kib@freebsd.org) 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 4XNmnj69Xnz4Cjv for ; Wed, 9 Oct 2024 08:51:04 +0000 (UTC) (envelope-from kib@freebsd.org) 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 4998ooZS000293; Wed, 9 Oct 2024 11:50:53 +0300 (EEST) (envelope-from kib@freebsd.org) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 4998ooZS000293 Received: (from kostik@localhost) by tom.home (8.18.1/8.18.1/Submit) id 4998ooho000292; Wed, 9 Oct 2024 11:50:50 +0300 (EEST) (envelope-from kib@freebsd.org) X-Authentication-Warning: tom.home: kostik set sender to kib@freebsd.org using -f Date: Wed, 9 Oct 2024 11:50:50 +0300 From: Konstantin Belousov To: Paul Floyd Cc: freebsd-current@freebsd.org Subject: Re: Problems with FreeBSD-15.0-CURRENT-amd64-20241003 Message-ID: References: <7bdb3c71-8a36-444e-8b1d-9c4f789fe638@gmail.com> 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 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on tom.home 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: 4XNmnj69Xnz4Cjv X-Spamd-Bar: ---- On Wed, Oct 09, 2024 at 10:27:22AM +0200, Paul Floyd wrote: > > > > On Wed, 9 Oct 2024 at 09:08, Konstantin Belousov > > wrote: > > > On Wed, Oct 09, 2024 at 06:35:08AM +0000, Paul Floyd wrote: > > > The biggest problem is with Helgrind. All apps now generate an extra > > error > > > > > > ==68593== Thread #1: Exiting thread still holds 1 lock > > > ==68593== at 0x4BBB5DA: _exit (in /lib/libsys.so.7) > > > ==68593== by 0x49FC1C0: exit (in /lib/libc.so.7) > > > ==68593== by 0x491CA10: __libc_start1 (in /lib/libc.so.7) > > > ==68593== by 0x20182F: (below main) (crt1_s.S:83) > > > > > > This is intended, see 3f3ec4b99f79d32a0bf15495559ca9883bd751f2. > > > > > Reply to list is better, > > Ug. I need to test but I don't think that I can simply add a default > suppression for this as that would also mask any leaked user locks. > > I can probably check whether it's the main thread (I assume that this code > doesn't run on subsidiary threads) and then only warn if there are 2 or > more locks held. The next problem is that I don't see any way to tell > whether I need to allow one lock or not. This is all userland so so > __FreeBSD_version change. Also I don't see any public symbols. That just > leaves me with configure time 'uname' checks. No, this is not limited to the main thread. Whatever thread called exit() and won the race to get the lock, would keep it owned till the process exit. Perhaps you can check for the presence of the symbol exit@FBSD_1.0 in the backtrace to determine the situation.