Thread View: muc.lists.freebsd.bugs
5 messages
5 total messages
Started by bugzilla-noreply
Thu, 12 Nov 2026 14:11
[Bug 300717] Lock order reversal when unloading epair(4) while destroying vnet jails in FreeBSD >= 15.1
Author: bugzilla-noreply
Date: Thu, 12 Nov 2026 14:11
Date: Thu, 12 Nov 2026 14:11
50 lines
3684 bytes
3684 bytes
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=300717
Bug ID: 300717
Summary: Lock order reversal when unloading epair(4) while
destroying vnet jails in FreeBSD >= 15.1
Product: Base System
Version: 15.1-RELEASE
Hardware: Any
OS: Any
Status: New
Severity: Affects Some People
Priority: ---
Component: kern
Assignee: bugs@FreeBSD.org
Reporter: crest@rlwinm.de
While running the regression tests for my under development if_pair(4) (not
epair) driver I found a deadlock that also exists in the base system. I'm
pretty sure this bug was introduced while fixing an other bug around vnet
destruction between 15.0 and 15.1.
The problem are the following code paths:
- `vnet_destroy()` (sys/net/vnet.c:300) takes `ifnet_detach_sxlock`
exclusively first, then `vnet_sysuninit()` takes `vnet_sysinit_sxlock` shared
(sys/net/vnet.c:644)
- `vnet_deregister_sysuninit()` (sys/net/vnet.c:602) takes
`vnet_sysinit_sxlock` exclusively then calls the kernel module's destructor for
every vnet which end up in `if_clone_detach()` (sys/net/if_clone.c:685) where
it deadlocks attempting to take `ifnet_detach_sxlock` exclusively.
Since it's a race condition it takes a few attempts to hang the system.
I've attached a reproducer using only epair(4) to rule out a bug in my own
experimental code.
Disclosure: I've used AI to extract a minimal reproducer out of my test harness
that doesn't rely on own experimental code.
--
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
[Bug 300717] Lock order reversal when unloading epair(4) while destroying vnet jails in FreeBSD >= 15.1
Author: bugzilla-noreply
Date: Thu, 12 Nov 2026 14:12
Date: Thu, 12 Nov 2026 14:12
16 lines
2552 bytes
2552 bytes
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=300717
crest@rlwinm.de changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |vimage
--
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
[Bug 300717] Lock order reversal when unloading epair(4) while destroying vnet jails in FreeBSD >= 15.1
Author: bugzilla-noreply
Date: Thu, 12 Nov 2026 15:09
Date: Thu, 12 Nov 2026 15:09
16 lines
2492 bytes
2492 bytes
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=300717 --- Comment #1 from crest@rlwinm.de --- Created attachment 277226 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=277226&action=edit epair-reproducer.sh -- 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
[Bug 300717] Lock order reversal when unloading epair(4) while destroying vnet jails in FreeBSD >= 15.1
Author: bugzilla-noreply
Date: Thu, 12 Nov 2026 15:54
Date: Thu, 12 Nov 2026 15:54
31 lines
3145 bytes
3145 bytes
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=300717 --- Comment #2 from crest@rlwinm.de --- panic: deadlres_td_sleep_q: possible deadlock detected for 0xfffff80100b93780 (jail), blocked for 180188 ticks cpuid = 3 time = 1794498863 KDB: stack backtrace: db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe00681b8d20 vpanic() at vpanic+0x136/frame 0xfffffe00681b8e50 panic() at panic+0x43/frame 0xfffffe00681b8eb0 deadlkres() at deadlkres+0x32a/frame 0xfffffe00681b8ef0 fork_exit() at fork_exit+0x82/frame 0xfffffe00681b8f30 fork_trampoline() at fork_trampoline+0xe/frame 0xfffffe00681b8f30 --- trap 0, rip = 0, rsp = 0, rbp = 0 --- Uptime: 8d19h7m56s Dumping 372 out of 4055 MB:..5%..13%..22%..31%..43%..52%..61%..74%..82%..91% Dump complete Automatic reboot in 15 seconds - press a key on the console to abort -- 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
[Bug 300717] Lock order reversal when unloading epair(4) while destroying vnet jails in FreeBSD >= 15.1
Author: bugzilla-noreply
Date: Thu, 12 Nov 2026 18:16
Date: Thu, 12 Nov 2026 18:16
16 lines
2566 bytes
2566 bytes
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=300717
Mark Linimon <linimon@FreeBSD.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|bugs@FreeBSD.org |net@FreeBSD.org
--
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
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads