NetBSD Problem Report #60448

From www@netbsd.org  Wed Jul 15 15:32:19 2026
Return-Path: <www@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) server-digest SHA256
	 client-signature RSA-PSS (2048 bits) client-digest SHA256)
	(Client CN "mail.netbsd.org", Issuer "YR2" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 2B6D51A923B
	for <gnats-bugs@gnats.NetBSD.org>; Wed, 15 Jul 2026 15:32:19 +0000 (UTC)
Message-Id: <20260715153217.B54641A923C@mollari.NetBSD.org>
Date: Wed, 15 Jul 2026 15:32:17 +0000 (UTC)
From: campbell+netbsd@mumble.net
Reply-To: campbell+netbsd@mumble.net
To: gnats-bugs@NetBSD.org
Subject: xl suspend: panic: kernel diagnostic assertion "incnt == __arraycount(sc->sc_indirect)" failed
X-Send-Pr-Version: www-1.0
X-From4GNATS: "campbell+netbsd@mumble.net via gnats" <gnats-admin@NetBSD.org>

>Number:         60448
>Category:       port-xen
>Synopsis:       xl suspend: panic: kernel diagnostic assertion "incnt == __arraycount(sc->sc_indirect)" failed
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    port-xen-maintainer
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jul 15 15:35:00 +0000 2026
>Closed-Date:    Sun Jul 19 17:18:27 +0000 2026
>Last-Modified:  Sun Jul 19 17:18:27 +0000 2026
>Originator:     Taylor R Campbell
>Release:        current, 11, 10, ...
>Organization:
Xen IndirectBSD Suspension, Inc.
>Environment:
>Description:
Xen guest panics on attempt to suspend:

[  66.6800723] panic: kernel diagnostic assertion "incnt == __arraycount(sc->sc_indirect)" failed: file "/home/riastradh/netbsd/current/src/sys/arch/xen/xen/xbd_xenbus.c", line 510 incnt=0 __arraycount(sc->sc_indirect)=32
[  66.6800723] cpu0: Begin traceback...
[  66.6800723] vpanic() at netbsd:vpanic+0x164
[  66.6800723] kern_assert() at netbsd:kern_assert+0x4b
[  66.6800723] xbd_xenbus_suspend() at netbsd:xbd_xenbus_suspend+0x194
[  66.6800723] device_pmf_driver_suspend() at netbsd:device_pmf_driver_suspend+0x3a
[  66.6800723] pmf_device_suspend() at netbsd:pmf_device_suspend+0x168
[  66.6800723] pmf_system_suspend() at netbsd:pmf_system_suspend+0xb9
[  66.6800723] sysctl_xen_suspend() at netbsd:sysctl_xen_suspend+0xe4
[  66.6800723] sysctl_dispatch() at netbsd:sysctl_dispatch+0xb3
[  66.6800723] sys___sysctl() at netbsd:sys___sysctl+0xca
[  66.6800723] syscall() at netbsd:syscall+0x98
[  66.6800723] --- syscall (number 202) ---
[  66.6800723] netbsd:syscall+0x98:
[  66.6800723] cpu0: End traceback...

[  66.6800723] dumping to dev 142,1 (offset=0, size=0): not possible
[  66.6800723] rebooting...

>How-To-Repeat:
On the host, with a domU called test20260715:

# xl save -p -D test20260715 test20260715.xenckpt

In the guest, probably:

# drvctl -S xbd0
>Fix:
	if (sc->sc_features & BLKIF_FEATURE_INDIRECT) ...

>Release-Note:

>Audit-Trail:

From: "Taylor R Campbell" <riastradh@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/60448 CVS commit: src/sys/arch/xen/xen
Date: Wed, 15 Jul 2026 15:38:21 +0000

 Module Name:	src
 Committed By:	riastradh
 Date:		Wed Jul 15 15:38:21 UTC 2026

 Modified Files:
 	src/sys/arch/xen/xen: xbd_xenbus.c

 Log Message:
 xbd(4): Don't assert about indirect blocks if not supported.

 PR port-xen/60448: xl suspend: panic: kernel diagnostic assertion
 "incnt == __arraycount(sc->sc_indirect)" failed


 To generate a diff of this commit:
 cvs rdiff -u -r1.135 -r1.136 src/sys/arch/xen/xen/xbd_xenbus.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->pending-pullups
State-Changed-By: riastradh@NetBSD.org
State-Changed-When: Wed, 15 Jul 2026 15:54:16 +0000
State-Changed-Why:
fixed in HEAD
pullup-11 #383 https://releng.netbsd.org/cgi-bin/req-11.cgi?show=383
pullup-10 #1313 https://releng.netbsd.org/cgi-bin/req-10.cgi?show=1313
inapplicable <10, assertion is new in 10


From: "Martin Husemann" <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/60448 CVS commit: [netbsd-11] src/sys/arch/xen/xen
Date: Sun, 19 Jul 2026 15:59:35 +0000

 Module Name:	src
 Committed By:	martin
 Date:		Sun Jul 19 15:59:35 UTC 2026

 Modified Files:
 	src/sys/arch/xen/xen [netbsd-11]: xbd_xenbus.c

 Log Message:
 Pull up following revision(s) (requested by riastradh in ticket #383):

 	sys/arch/xen/xen/xbd_xenbus.c: revision 1.136

 xbd(4): Don't assert about indirect blocks if not supported.

 PR port-xen/60448: xl suspend: panic: kernel diagnostic assertion
 "incnt == __arraycount(sc->sc_indirect)" failed


 To generate a diff of this commit:
 cvs rdiff -u -r1.135 -r1.135.2.1 src/sys/arch/xen/xen/xbd_xenbus.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: "Martin Husemann" <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/60448 CVS commit: [netbsd-10] src/sys/arch/xen/xen
Date: Sun, 19 Jul 2026 16:01:00 +0000

 Module Name:	src
 Committed By:	martin
 Date:		Sun Jul 19 16:01:00 UTC 2026

 Modified Files:
 	src/sys/arch/xen/xen [netbsd-10]: xbd_xenbus.c

 Log Message:
 Pull up following revision(s) (requested by riastradh in ticket #1313):

 	sys/arch/xen/xen/xbd_xenbus.c: revision 1.136

 xbd(4): Don't assert about indirect blocks if not supported.

 PR port-xen/60448: xl suspend: panic: kernel diagnostic assertion
 "incnt == __arraycount(sc->sc_indirect)" failed


 To generate a diff of this commit:
 cvs rdiff -u -r1.129.20.3 -r1.129.20.4 src/sys/arch/xen/xen/xbd_xenbus.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: pending-pullups->closed
State-Changed-By: riastradh@NetBSD.org
State-Changed-When: Sun, 19 Jul 2026 17:18:27 +0000
State-Changed-Why:
fixed in HEAD, pulled up to 11 and 10, inapplicable <10


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