NetBSD Problem Report #60703

From Manuel.Bouyer@lip6.fr  Wed Sep  9 13:20:35 2026
Return-Path: <Manuel.Bouyer@lip6.fr>
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 "YR1" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id B7AA61A923B
	for <gnats-bugs@gnats.NetBSD.org>; Wed,  9 Sep 2026 13:20:35 +0000 (UTC)
Message-Id: <20260909131413.A610710E33@armandeche.soc.lip6.fr>
Date: Wed, 09 Sep 2026 15:14:13 +0200 (CEST)
From: Manuel.Bouyer@lip6.fr
Reply-To: Manuel.Bouyer@lip6.fr
To: gnats-bugs@NetBSD.org
Subject: panic: LOCKDEBUG: Mutex error: kmem_intr_free,397: allocation contains active lock
X-Send-Pr-Version: 3.95
X-From4GNATS: "Manuel.Bouyer@lip6.fr via gnats" <gnats-admin@NetBSD.org>

>Number:         60703
>Category:       kern
>Synopsis:       panic: LOCKDEBUG: Mutex error: kmem_intr_free,397: allocation contains active lock
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Sep 09 13:25:00 +0000 2026
>Last-Modified:  Thu Sep 10 14:15:00 +0000 2026
>Originator:     Manuel Bouyer
>Release:        NetBSD 11.0_STABLE
>Organization:
>Environment:
System: NetBSD armandeche.soc.lip6.fr 11.0_STABLE NetBSD 11.0_STABLE (GENERIC_CAN) #1: Thu Sep 3 12:51:47 CEST 2026 bouyer@armandeche.soc.lip6.fr:/local/armandeche1/tmp/build/amd64/obj/local/armandeche2/netbsd-11/src/sys/arch/amd64/compile/GENERIC_CAN amd64
Architecture: x86_64
Machine: amd64
>Description:
	This is a desktop workstation. At the time of the panic I had one
	application running, reading data from a USB device and printing
	line of text in its xterm, in a tight loop (top did show high CPU 
	usage for X, xterm, system and interrupts.
	At some point the system paniced, crash on the core dump shows:
armandeche# crash -M netbsd.3.core -N netbsd.3
Crash version 11.0_STABLE, image version 11.0_STABLE.
System panicked: LOCKDEBUG: Mutex error: kmem_intr_free,397: allocation contains active lock
Backtrace from time of crash is available.
crash> tr
usb_findvendor_real() at 0
kern_reboot() at kern_reboot+0x93
vpanic() at vpanic+0x17b
panic() at printf_nostamp
lockdebug_abort1() at lockdebug_more.part.0
kmem_intr_free() at kmem_intr_free+0xb4
gen8_ppgtt_create() at gen8_ppgtt_create+0x277
i915_ppgtt_create() at i915_ppgtt_create+0x2b
i915_gem_create_context() at i915_gem_create_context+0x34f
i915_gem_context_open() at i915_gem_context_open+0x5d
i915_gem_open() at i915_gem_open+0x9e
drm_file_alloc() at drm_file_alloc+0x16c
drm_open() at drm_open+0x157
cdev_open() at cdev_open+0x135
spec_open() at spec_open+0x23d
VOP_OPEN() at VOP_OPEN+0x3e
vn_open() at vn_open+0x33c
do_open() at do_open+0xb3
do_sys_openat() at do_sys_openat+0x72
sys_open() at sys_open+0x24
syscall() at syscall+0x9d
--- syscall (number 5) ---
syscall+0x9d:

The CPU with integrated graphic is:
cpu0: highest basic info 00000016
cpu0: highest extended info 80000008
cpu0: "Intel(R) Core(TM) i5-8400 CPU @ 2.80GHz"
cpu0: Intel 7th or 8th gen Core (Kaby Lake, Coffee Lake) or Xeon E (Coffee Lake) (686-class), 2808.00 MHz
cpu0: CPU base freq 2800000000 Hz
cpu0: CPU max freq 4000000000 Hz
cpu0: TSC freq CPUID 2808000000 Hz
cpu0: family 0x6 model 0x9e stepping 0xa (id 0x906ea)

fgrep drm /var/run/dmesg.boot:
i915drmkms0 at pci0 dev 2 function 0: Intel UHD Graphics 630 (rev. 0x00)
[drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[drm] Driver supports precise vblank timestamp query.
i915drmkms0: interrupting at msi5 vec 0 (i915drmkms0)
i915drmkms0: notice: Failed to load DMC firmware i915/kbl_dmc_ver1_04.bin. Disabling runtime power management.
[drm] failed to retrieve link info, disabling eDP
[drm] Initialized i915 1.6.0 20200114 for i915drmkms0 on minor 0
intelfb0 at i915drmkms0
[drm] DRM_I915_DEBUG enabled
[drm] DRM_I915_DEBUG_GEM enabled


>How-To-Repeat:
	occured only once at this time
>Fix:

>Audit-Trail:
From: Manuel Bouyer <bouyer@antioche.eu.org>
To: gnats-bugs@netbsd.org
Cc: kern-bug-people@netbsd.org, gnats-admin@netbsd.org, netbsd-bugs@netbsd.org
Subject: Re: kern/60703: panic: LOCKDEBUG: Mutex error: kmem_intr_free,397:
 allocation contains active lock
Date: Thu, 10 Sep 2026 16:14:06 +0200

 On Wed, Sep 09, 2026 at 01:25:00PM +0000, Manuel.Bouyer@lip6.fr via gnats wrote:
 > 	This is a desktop workstation. At the time of the panic I had one
 > 	application running, reading data from a USB device and printing
 > 	line of text in its xterm, in a tight loop (top did show high CPU 
 > 	usage for X, xterm, system and interrupts.
 > 	At some point the system paniced, crash on the core dump shows:
 > armandeche# crash -M netbsd.3.core -N netbsd.3
 > Crash version 11.0_STABLE, image version 11.0_STABLE.
 > System panicked: LOCKDEBUG: Mutex error: kmem_intr_free,397: allocation contains active lock

 I got a similar panic on my laptop:
 System panicked: LOCKDEBUG: Mutex error: kmem_intr_free,397: allocation contains active lock
 Backtrace from time of crash is available.
 crash> tr
 __kernel_end() at 0
 kern_reboot() at kern_reboot+0x93
 vpanic() at vpanic+0x17b
 panic() at printf_nostamp
 lockdebug_abort1() at lockdebug_more.part.0
 kmem_intr_free() at kmem_intr_free+0xb4
 gen8_ppgtt_create() at gen8_ppgtt_create+0x277
 i915_ppgtt_create() at i915_ppgtt_create+0x2b
 i915_gem_create_context() at i915_gem_create_context+0x34f
 i915_gem_context_create_ioctl() at i915_gem_context_create_ioctl+0x6d
 drm_ioctl() at drm_ioctl+0x23d
 drm_ioctl_shim() at drm_ioctl_shim+0x32
 sys_ioctl() at sys_ioctl+0x4ca
 syscall() at syscall+0x9d
 --- syscall (number 54) ---

 very light load, only a few xterm, firefox was starting (crashed before it
 could open a window).
 The hardware is:
 cpu0: "Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz"
 cpu0: Intel 7th or 8th gen Core (Kaby Lake, Coffee Lake) or Xeon E (Coffee Lake) (686-class), 2712.00 MHz
 cpu0: CPU base freq 2700000000 Hz
 cpu0: CPU max freq 3100000000 Hz
 cpu0: TSC freq CPUID 2712000000 Hz
 cpu0: family 0x6 model 0x8e stepping 0x9 (id 0x806e9)


 i915drmkms0 at pci0 dev 2 function 0: Intel HD Graphics 620 (GT2) (rev. 0x02)
 [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
 [drm] Driver supports precise vblank timestamp query.
 i915drmkms0: interrupting at msi7 vec 0 (i915drmkms0)
 i915drmkms0: notice: Failed to load DMC firmware i915/kbl_dmc_ver1_04.bin. Disabling runtime power management.
 [drm] Initialized i915 1.6.0 20200114 for i915drmkms0 on minor 0
 intelfb0 at i915drmkms0
 [drm] DRM_I915_DEBUG enabled
 [drm] DRM_I915_DEBUG_GEM enabled

 -- 
 Manuel Bouyer <bouyer@antioche.eu.org>
      NetBSD: 26 ans d'experience feront toujours la difference
 --

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.