Date: Mon, 27 Jul 2026 19:34:50 -0700 From: Gleb Smirnoff <glebius@freebsd.org> To: Mark Johnston <markj@freebsd.org> Cc: Jonathan Looney <jtl@freebsd.org>, src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 56ac3351c61f - main - witness: fix operation without WITNESS_SKIPSPIN Message-ID: <amgVSmnSFWYkDMK3@cell.glebi.us> In-Reply-To: <alon7AzauzN6mIZ2@nuc> References: <6a5987fd.3e063.69a4cc59@gitrepo.freebsd.org> <alon7AzauzN6mIZ2@nuc>
index | next in thread | previous in thread | raw e-mail
On Fri, Jul 17, 2026 at 09:02:36AM -0400, Mark Johnston wrote: M> On Fri, Jul 17, 2026 at 01:40:13AM +0000, Gleb Smirnoff wrote: M> > The branch main has been updated by glebius: M> > M> > URL: https://cgit.FreeBSD.org/src/commit/?id=56ac3351c61f285ee5b8c9bd4411eeaeb20efe26 M> > M> > commit 56ac3351c61f285ee5b8c9bd4411eeaeb20efe26 M> > Author: Gleb Smirnoff <glebius@FreeBSD.org> M> > AuthorDate: 2026-07-17 01:37:03 +0000 M> > Commit: Gleb Smirnoff <glebius@FreeBSD.org> M> > CommitDate: 2026-07-17 01:37:03 +0000 M> > M> > witness: fix operation without WITNESS_SKIPSPIN M> > M> > Since malloc(9) even with M_NOWAIT is forbidden when we hold a spinlock, M> > we can't print detailed lock tree as the operation tries to allocate M> > memory. M> M> I think malloc() actually can't be used at all here. It's possible to M> recurse into the vmem boundary tag allocator; syzkaller triggered the M> panic below once for me. M> M> Can we preallocate a single tracker at boot time, protected by w_mtx? I'd leave this to Jonathan's decision. My personal take is that WITNESS is a helper for developers, not a production feature. If the code gives us a hint on lock order in 99% cases and recurses deep in malloc() in 1% times it is good enough. Of course if recursion can be avioded easily, this should be done. -- Gleb Smirnoffhome | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?amgVSmnSFWYkDMK3>
