NetBSD Problem Report #60123
From martin@gethsemane.aprisoft.de Tue Mar 24 10:50:31 2026
Return-Path: <martin@gethsemane.aprisoft.de>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (2048 bits)
client-signature RSA-PSS (2048 bits))
(Client CN "mail.netbsd.org", Issuer "R12" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id 6B1E91A9239
for <gnats-bugs@gnats.NetBSD.org>; Tue, 24 Mar 2026 10:50:31 +0000 (UTC)
Message-Id: <20260324105027.7FF19E1FE01@mail.duskware.de>
Date: Tue, 24 Mar 2026 11:50:22 +0100 (CET)
From: martin@NetBSD.org
Reply-To: martin@NetBSD.org
To: gnats-bugs@NetBSD.org
Subject: KASSERT when openeing a fss(4) device
X-Send-Pr-Version: 3.95
X-From4GNATS: "martin@NetBSD.org via gnats" <gnats-admin@NetBSD.org>
>Number: 60123
>Category: kern
>Synopsis: KASSERT when openeing a fss(4) device
>Confidential: no
>Severity: critical
>Priority: high
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Mar 24 10:55:00 +0000 2026
>Last-Modified: Tue Mar 24 13:30:01 +0000 2026
>Originator: Martin Husemann
>Release: NetBSD 11.99.5
>Organization:
The NetBSD Foundation, Inc.
>Environment:
System: NetBSD gethsemane.aprisoft.de 11.99.5 NetBSD 11.99.5 (GETHSEMANE) #456: Tue Mar 24 10:07:39 CET 2026 martin@seven-days-to-the-wolves.aprisoft.de:/work/src/sys/arch/macppc/compile/GETHSEMANE macppc
Architecture: powerpc
Machine: macppc
>Description:
Early during a run of the ATF tests the kernel KASSERTs:
[ 2231.5664015] panic: kernel diagnostic assertion "KERNEL_LOCKED_P()" failed: f
ile "../../../../kern/subr_autoconf.c", line 2102
[ 2231.5864123] cpu1: Begin traceback...
[ 2231.5964165] 0x0e7acb60: at vpanic+0x154
[ 2231.6064211] 0x0e7acb90: at kern_assert+0x60
[ 2231.6164260] 0x0e7acbd0: at config_attach_pseudo+0x84
[ 2231.6264307] 0x0e7acbe0: at fss_open+0xec
[ 2231.6364359] 0x0e7acc00: at bdev_open+0x138
[ 2231.6464415] 0x0e7acc40: at spec_open+0x37c
[ 2231.6564459] 0x0e7accc0: at VOP_OPEN+0x4c
[ 2231.6664509] 0x0e7acce0: at vn_open+0x248
[ 2231.6764617] 0x0e7ace00: at do_open+0xac
[ 2231.6764617] 0x0e7ace50: at do_sys_openat+0x9c
[ 2231.6864641] 0x0e7ace90: at sys_open+0x2c
[ 2231.7064842] 0x0e7aceb0: at syscall+0x110
>How-To-Repeat:
run atf tests.
>Fix:
n/a
>Audit-Trail:
From: Takashi YAMAMOTO <yamt9999@gmail.com>
To: gnats-bugs@netbsd.org
Cc: kern-bug-people@netbsd.org, gnats-admin@netbsd.org, netbsd-bugs@netbsd.org
Subject: Re: kern/60123: KASSERT when openeing a fss(4) device
Date: Tue, 24 Mar 2026 22:16:37 +0900
i guess fss should use config_attach_pseudo_acquire family of the functions.
fss_device_lock seems insufficient as it doesn't exclude things like
DRVDETACHDEV. (does it?)
having said that, it seems we have too many drivers which would
trigger these assertions.
i will revert the assertion.
From: "YAMAMOTO Takashi" <yamt@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/60123 CVS commit: src/sys/kern
Date: Tue, 24 Mar 2026 13:28:06 +0000
Module Name: src
Committed By: yamt
Date: Tue Mar 24 13:28:06 UTC 2026
Modified Files:
src/sys/kern: subr_autoconf.c
Log Message:
Revert "config_attach_pseudo/config_attach_pseudo: assert kernel lock"
it turned out that we have too many drivers which would trigger
these assertions. although my impression is that they are actually
not mpsafe, let's revert the assertions for now.
PR/60123
https://gnats.netbsd.org/60123
To generate a diff of this commit:
cvs rdiff -u -r1.319 -r1.320 src/sys/kern/subr_autoconf.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.