NetBSD Problem Report #60129

From yamt@netbsd.org  Wed Mar 25 12:49:19 2026
Return-Path: <yamt@netbsd.org>
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 7AA991A9239
	for <gnats-bugs@gnats.NetBSD.org>; Wed, 25 Mar 2026 12:49:19 +0000 (UTC)
Message-Id: <20260325124918.610B41A923D@mollari.NetBSD.org>
Date: Wed, 25 Mar 2026 12:49:18 +0000 (UTC)
From: yamt@netbsd.org
Reply-To: yamt@netbsd.org
To: gnats-bugs@NetBSD.org
Subject: config_detach assertion failure "!dv->dv_detach_done"
X-Send-Pr-Version: 3.95
X-From4GNATS: "yamt@netbsd.org via gnats" <gnats-admin@NetBSD.org>

>Number:         60129
>Category:       kern
>Synopsis:       config_detach assertion failure "!dv->dv_detach_done"
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Mar 25 12:50:00 +0000 2026
>Originator:     YAMAMOTO Takashi
>Release:        -current
>Organization:

>Environment:

>Description:

	you can easily trigger "!dv->dv_detach_done" assertion failure
	with drvctl.

[  83.8186908] panic: kernel diagnostic assertion "!dv->dv_detach_done" failed: file "/root/git/netbsd-src/sys/kern/subr_autoconf.c", line 3021 fss0
[  83.8186908] cpu1: Begin traceback...
[  83.8186908] vpanic() at netbsd:vpanic+0x189
[  83.8186908] kern_assert() at netbsd:kern_assert+0x4b
[  83.8186908] config_detach() at netbsd:config_detach+0x67
[  83.8186908] drvctl_ioctl() at netbsd:drvctl_ioctl+0x28a
[  83.8186908] sys_ioctl() at netbsd:sys_ioctl+0x1fa
[  83.8186908] syscall() at netbsd:syscall+0x9d
[  83.8186908] --- syscall (number 54) ---
[  83.8186908] netbsd:syscall+0x9d:
[  83.8186908] cpu1: End traceback...

>How-To-Repeat:
	on a qemu/nvmm vm with 2 vcpus:

	while :;do < /dev/vnd0;done & while :;do drvctl -d vnd0;done

	the same symptom with at least fss and cgd.
>Fix:
	eg. stop detaching on close

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(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.