From nobody Fri Jul 17 13:02:36 2026 X-Original-To: dev-commits-src-all@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 4h1qnq142Mz6lsQ8; Fri, 17 Jul 2026 13:02:39 +0000 (UTC) (envelope-from markj@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (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-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4h1qnp5bW4z3W8t; Fri, 17 Jul 2026 13:02:38 +0000 (UTC) (envelope-from markj@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1784293358; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=lIbaK6eCYjLtha5XzuSy14OXyp3QToU3CUDPGkU3rh4=; b=WiiXUkb5O8g3kQCkAXmaTGq5z2EpXESHD9nNC+ixDM5pE/h6u3+DD1D7YfSsPbRitHVu/4 j9867LhqWhTRk6FLSmOJ99CyCS4eyZwX0gkELKGnaFBvVtKNPBIvbHlyOGamFIhrKtPdgo 7ZjKl95j62ZoQTSTXtXvXH4pxmhM59qSPtNXvcvbFmEHzpDbH+O9k2o3RgjyzXKKbsdTqv MHJuJAa/yqww6UsWTBdhZDGmFyc9esyytz6FycXcndaf6dDg2bEL0dbfdOIdT6ytI88Pjl 7n00zuPut/ULQHqheXFs1ETMfxgfQRfJwHF5ge5uLiY0kAyBM9QpxQUSPtJX7A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1784293358; a=rsa-sha256; cv=none; b=CrjV+VsSDKFsDFBHSZmTSHUGV2NBA/yz3D82jV4/Ux7BVnvIF+eD/UjWZJWnFUSLTw+TC9 kl6I+EFoPBWNYAQ51lsU11S6krU9iJEtGWzpAtzx85Jp3XQ2zz4sVNfcwEjM6dx6xlo0To qRJ89xqUX8YiFHPRzww+MWUmmyR1I6HWkY0xiaoinDFHko2lYIX0EOBLNJFcYAFzTm1iLk B/KadW4qKyRCuawpbQoWWSQDRZ6l6MUNDNC/dbHUlM3CamljveGBlcxLLO/AV25yX2vVwv X9+MJNVWcYGC5SgffEhQfZoJqHCaJrCQ6Pn3F4cshEqMkjxPaJZwDHpZ5ysuVg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1784293358; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=lIbaK6eCYjLtha5XzuSy14OXyp3QToU3CUDPGkU3rh4=; b=NcHfQkae/bGiYwcr8QPbTywmkG9aig0yTWegnvvZT/m1oxUWG9Jjp2gYS0oVKcEV1txRhC Wt2FXehJx0Ww+hRSYsuengF1LyZ+04oGOCgAy42juRy21jPsUWwlz2wyYAx9W4vjlI7lnJ FPgZiK6kx/zAKeW+dHkgeJIAM6qHh8hwN9LlXt1+BM34esuRNTKQfgLdzPYILogclwYGlw IaqbnglDBe23+NkaxUIVvvSm5uMlNxLBMz3EgTaf5APgwdHFo0jq0KCA5FYOS9oNc6thqE UZEzwrv6dXsGzqUIuCaGIFTlXGgc1DAZ4wufRms4yGBxgtYYVS3UmrQTe2630A== Received: from nuc (192-0-220-237.cpe.teksavvy.com [192.0.220.237]) (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) (Authenticated sender: markj) by smtp.freebsd.org (Postfix) with ESMTPSA id 4h1qnp2k4NzKNw; Fri, 17 Jul 2026 13:02:38 +0000 (UTC) (envelope-from markj@freebsd.org) Date: Fri, 17 Jul 2026 09:02:36 -0400 From: Mark Johnston To: Gleb Smirnoff , Jonathan Looney Cc: 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: References: <6a5987fd.3e063.69a4cc59@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6a5987fd.3e063.69a4cc59@gitrepo.freebsd.org> On Fri, Jul 17, 2026 at 01:40:13AM +0000, Gleb Smirnoff wrote: > The branch main has been updated by glebius: > > URL: https://cgit.FreeBSD.org/src/commit/?id=56ac3351c61f285ee5b8c9bd4411eeaeb20efe26 > > commit 56ac3351c61f285ee5b8c9bd4411eeaeb20efe26 > Author: Gleb Smirnoff > AuthorDate: 2026-07-17 01:37:03 +0000 > Commit: Gleb Smirnoff > CommitDate: 2026-07-17 01:37:03 +0000 > > witness: fix operation without WITNESS_SKIPSPIN > > Since malloc(9) even with M_NOWAIT is forbidden when we hold a spinlock, > we can't print detailed lock tree as the operation tries to allocate > memory. I think malloc() actually can't be used at all here. It's possible to recurse into the vmem boundary tag allocator; syzkaller triggered the panic below once for me. Can we preallocate a single tracker at boot time, protected by w_mtx? panic: _mtx_lock_sleep: recursed on non-recursive mutex btag lock @ /home/markj/sb/main/src/sys/kern/subr_vmem.c:758 cpuid = 0 time = 1784121321 KDB: stack backtrace: db_trace_self_wrapper() at db_trace_self_wrapper+0xc6/frame 0xfffffe007c0ca450 kdb_backtrace() at kdb_backtrace+0xd0/frame 0xfffffe007c0ca5b0 vpanic() at vpanic+0x257/frame 0xfffffe007c0ca770 panic() at panic+0xb5/frame 0xfffffe007c0ca830 __mtx_lock_sleep() at __mtx_lock_sleep+0xa20/frame 0xfffffe007c0ca970 __mtx_lock_flags() at __mtx_lock_flags+0x1fe/frame 0xfffffe007c0caa50 vmem_bt_alloc() at vmem_bt_alloc+0x9f/frame 0xfffffe007c0cab10 keg_alloc_slab() at keg_alloc_slab+0x1f1/frame 0xfffffe007c0cac30 zone_import() at zone_import+0x2f4/frame 0xfffffe007c0cae30 zone_alloc_item() at zone_alloc_item+0x16a/frame 0xfffffe007c0caf20 _bt_fill() at _bt_fill+0x11b/frame 0xfffffe007c0caf70 vmem_xalloc() at vmem_xalloc+0x475/frame 0xfffffe007c0cb010 vmem_alloc() at vmem_alloc+0x170/frame 0xfffffe007c0cb070 kmem_malloc_domainset() at kmem_malloc_domainset+0x1a1/frame 0xfffffe007c0cb1b0 keg_alloc_slab() at keg_alloc_slab+0x1f1/frame 0xfffffe007c0cb2d0 zone_import() at zone_import+0x2f4/frame 0xfffffe007c0cb4e0 cache_alloc() at cache_alloc+0x7ea/frame 0xfffffe007c0cb5b0 cache_alloc_retry() at cache_alloc_retry+0x35/frame 0xfffffe007c0cb5f0 malloc() at malloc+0x192/frame 0xfffffe007c0cb6b0 witness_checkorder() at witness_checkorder+0x16dc/frame 0xfffffe007c0cb9b0 __mtx_lock_flags() at __mtx_lock_flags+0x187/frame 0xfffffe007c0cbaa0 vm_map_find() at vm_map_find+0x8a/frame 0xfffffe007c0cbaf0 kva_import() at kva_import+0xd4/frame 0xfffffe007c0cbbd0 vmem_try_fetch() at vmem_try_fetch+0x21e/frame 0xfffffe007c0cbcc0 vmem_xalloc() at vmem_xalloc+0x539/frame 0xfffffe007c0cbd60 kva_import_domain() at kva_import_domain+0x5f/frame 0xfffffe007c0cbdb0 vmem_try_fetch() at vmem_try_fetch+0x21e/frame 0xfffffe007c0cbe90 vmem_xalloc() at vmem_xalloc+0x539/frame 0xfffffe007c0cbf30 vmem_bt_alloc() at vmem_bt_alloc+0xec/frame 0xfffffe007c0cc010 keg_alloc_slab() at keg_alloc_slab+0x1f1/frame 0xfffffe007c0cc130 zone_import() at zone_import+0x2f4/frame 0xfffffe007c0cc330 zone_alloc_item() at zone_alloc_item+0x16a/frame 0xfffffe007c0cc420 _bt_fill() at _bt_fill+0x11b/frame 0xfffffe007c0cc470 vmem_xalloc() at vmem_xalloc+0x475/frame 0xfffffe007c0cc510 vmem_alloc() at vmem_alloc+0x170/frame 0xfffffe007c0cc570 kmem_malloc_domainset() at kmem_malloc_domainset+0x1a1/frame 0xfffffe007c0cc6b0 keg_alloc_slab() at keg_alloc_slab+0x1f1/frame 0xfffffe007c0cc7d0 zone_import() at zone_import+0x2f4/frame 0xfffffe007c0cc9e0 cache_alloc() at cache_alloc+0x7ea/frame 0xfffffe007c0ccab0 cache_alloc_retry() at cache_alloc_retry+0x35/frame 0xfffffe007c0ccaf0 fork1() at fork1+0xad4/frame 0xfffffe007c0ccc10 sys_fork() at sys_fork+0xe3/frame 0xfffffe007c0ccd10 amd64_syscall() at amd64_syscall+0x4e1/frame 0xfffffe007c0ccf30 fast_syscall_common() at fast_syscall_common+0xf8/frame 0xfffffe007c0ccf30 --- syscall (198, FreeBSD ELF64, __syscall), rip = 0x3857ea, rsp = 0x8262dcf08, rbp = 0x8262dcf80 ---