🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: muc.lists.freebsd.bugs
Article #480

[Bug 300807] if_vtnet: lock order reversal and non-sleepable lock violation during vtnet_init due to bounce zone / sysctl alloca...

#480
From: bugzilla-noreply
Date: Sun, 15 Nov 2026 23:08
107 lines
6309 bytes
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=300807

            Bug ID: 300807
           Summary: if_vtnet: lock order reversal and non-sleepable lock
                    violation during vtnet_init due to bounce zone /
                    sysctl allocation
           Product: Base System
           Version: CURRENT
          Hardware: amd64
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: kern
          Assignee: bugs@FreeBSD.org
          Reporter: mack@macktronics.com

When re-initializing a vtnet interface on FreeBSD 16-CURRENT (observed on
commit 5e809bf1c93fdc4c52fa46a7eb0e6f881b6c6140 running inside a Bhyve virtual
machine), witness reports a non-sleepable lock violation and lock order
reversal.

My host system is:

CPU: Intel(R) Xeon(R) CPU E3-1231 v3 @ 3.40GHz (3399.78-MHz K8-class CPU)
  Origin="GenuineIntel"  Id=0x306c3  Family=0x6  Model=0x3c  Stepping=3
 
Features=0x9f83fbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR,SSE,SSE2,SS,HTT,PBE>
 
Features2=0xfeda7a17<SSE3,PCLMULQDQ,DTES64,DS_CPL,SSSE3,SDBG,FMA,CX16,xTPR,PCID,SSE4.1,SSE4.2,MOVBE,POPCNT,AESNI,XSAVE,OSXSAVE,AVX,F16C,RDRAND,HV>
  AMD Features=0x24100800<SYSCALL,NX,Page1GB,LM>
  AMD Features2=0x21<LAHF,ABM>
  Structured Extended Features=0x3a9<FSGSBASE,BMI1,AVX2,SMEP,BMI2,ERMS>
  Structured Extended Features3=0x400<MD_CLEAR>
  XSAVE Features=0x1<XSAVEOPT>
  TSC: P-state invariant
Hypervisor: Origin = "bhyve bhyve "
real memory  = 8589934592 (8192 MB)
avail memory = 8306806784 (7921 MB)
Event timer "LAPIC" quality 600
ACPI APIC Table: <BHYVE  BVMADT  >
FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs
FreeBSD/SMP: 4 package(s) x 1 core(s)

Console output/dmesg:

uma_zalloc_debug: zone "malloc-16" with the following non-sleepable locks held:
exclusive sleep mutex vtnet0 (VTNET Core Lock) r = 0 (0xfffff800014bddc8)
locked @ /usr/src16/sys/dev/virtio/network/if_vtnet.c:3583
stack backtrace:
#0 0xffffffff80cd2b1c at witness_debugger+0x6c
#1 0xffffffff80cd441c at witness_warn+0x4bc
#2 0xffffffff8105ec6f at uma_zalloc_debug+0x3f
#3 0xffffffff8105e7b7 at uma_zalloc_arg+0x27
#4 0xffffffff80c299bf at malloc+0x8f
#5 0xffffffff80c6b17b at sysctl_add_oid+0x6b
#6 0xffffffff811b446f at alloc_bounce_zone+0x19f
#7 0xffffffff811b33d0 at bounce_bus_dmamap_create+0x180
#8 0xffffffff80a5f989 at vtnet_init_locked+0x189
#9 0xffffffff80a5eab1 at vtnet_init+0x31
#10 0xffffffff80db539e at ether_ioctl+0x1ae
#11 0xffffffff80a5ebc5 at vtnet_ioctl+0xf5
#12 0xffffffff80e50930 at in_control_ioctl+0xa80
#13 0xffffffff80f0ad8d at rtnl_handle_addr+0x41d
#14 0xffffffff80f06bf0 at rtnl_handle_message+0x1a0
#15 0xffffffff80f053ba at nl_receive_message+0x12a
#16 0xffffffff80f04cf5 at nl_taskqueue_handler+0x3f5
#17 0xffffffff80cc421b at taskqueue_run_locked+0x1bb

lock order reversal: (sleepable after non-sleepable)
 1st 0xfffff800014bddc8 vtnet0 (VTNET Core Lock, sleep mutex) @
/usr/src16/sys/dev/virtio/network/if_vtnet.c:3583
 2nd 0xffffffff81debd18 sysctl lock (sysctl lock, sleepable rm) @
/usr/src16/sys/kern/kern_sysctl.c:887
lock order VTNET Core Lock -> sysctl lock attempted at:
#0 0xffffffff80cd26db at witness_checkorder+0xd3b
#1 0xffffffff80c53374 at _rm_wlock_debug+0x64
#2 0xffffffff80c6b1f0 at sysctl_add_oid+0xe0
#3 0xffffffff811b446f at alloc_bounce_zone+0x19f
#4 0xffffffff811b33d0 at bounce_bus_dmamap_create+0x180
#5 0xffffffff80a5f989 at vtnet_init_locked+0x189
#6 0xffffffff80a5eab1 at vtnet_init+0x31
#7 0xffffffff80db539e at ether_ioctl+0x1ae
#8 0xffffffff80a5ebc5 at vtnet_ioctl+0xf5
#9 0xffffffff80e50930 at in_control_ioctl+0xa80
#10 0xffffffff80f0ad8d at rtnl_handle_addr+0x41d
#11 0xffffffff80f06bf0 at rtnl_handle_message+0x1a0
#12 0xffffffff80f053ba at nl_receive_message+0x12a
#13 0xffffffff80f04cf5 at nl_taskqueue_handler+0x3f5
#14 0xffffffff80cc421b at taskqueue_run_locked+0x1bb
#15 0xffffffff80cc5253 at taskqueue_thread_loop+0xd3
#16 0xffffffff80c06824 at fork_exit+0x94
#17 0xffffffff811cdece at fork_trampoline+0xe

-- 
You are receiving this mail because:
You are the assignee for the bug.

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-admin@muc.de
Technical Details
Message-ID: <bug-300807-227@https.bugs.freebsd.org/bugzilla/>
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!usenet.goja.nl.eu.org!3.eu.feeder.erje.net!feeder.erje.net!news2.arglkargh.de!news.karotte.org!news.muc.de!.POSTED.news.muc.de!not-for-mail

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!usenet.goja.nl.eu.org!3.eu.feeder.erje.net!feeder.erje.net!news2.arglkargh.de!news.karotte.org!news.muc.de!.POSTED.news.muc.de!not-for-mail
From: bugzilla-noreply@freebsd.org
Newsgroups: muc.lists.freebsd.bugs
Subject: [Bug 300807] if_vtnet: lock order reversal and non-sleepable lock
 violation during vtnet_init due to bounce zone / sysctl allocation
Date: Sun, 15 Nov 2026 23:08:07 +0000
Organization: Newsgate at muc.de e.V.
Approved: news-admin@muc.de
Distribution: world
Message-ID: <bug-300807-227@https.bugs.freebsd.org/bugzilla/>
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Injection-Info: news.muc.de; posting-host="news.muc.de:193.149.48.2";
	logging-data="47000"; mail-complaints-to="news-admin@muc.de"
X-Original-To: bugs@mlmmj.nyi.freebsd.org
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1794784087;
	h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
	 to:to:cc:mime-version:mime-version:content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding;
	bh=/uksqIvr6HhKxnqAFkgYRTKNnu5Foj8wI7XE0jT+jO8=;
	b=SkYStene0trc+mBWunXLjUBPttX6+Eb9afB9MfL2COmP2fCGChRXn7xy56eDnZ9FyRjfyg
	eQNBtl+5tYPwY4PavhPs7NQalBT3HhplCI3YnPWYm2MxIfax/VUCDE6b0+0Uh4Y9Qjbw7r
	XRIenPnpTBGgw8VXw/x8bzJN2uAL9XXLRVvqq/W5raxZfehNlrzyKFxBDHetZZNkDIQg/y
	ncc7CmE8Oe7OPEbi6PJVOKdMzkQNSmTVYMTROCxmVb53WPGbBW08IRvatw5+01MBGKqti9
	wjjtgQsB0JUawx7JOcN22v1PqWkAhbO4Bfoos48C/PjGmFfBgoRZrcHygI5CAw==
X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f
Auto-Submitted: auto-generated
Precedence: list
X-Newsgate-Id: f02c70b8849f+
X-No-Archive: Yes