[Bug 274588] lock order reversal updating vtnet IPv6 state

From: <bugzilla-noreply_at_freebsd.org>
Date: Thu, 19 Oct 2023 10:27:03 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=274588

            Bug ID: 274588
           Summary: lock order reversal updating vtnet IPv6 state
           Product: Base System
           Version: 15.0-CURRENT
          Hardware: amd64
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: kern
          Assignee: bugs@FreeBSD.org
          Reporter: jfc@mit.edu

Running CURRENT (c989957f28ef5b03f594265612e3437c1e826ed4) in bhyve on a
13.2-STABLE host I see the warnings below.  It only happened once so far.

My rc.conf contains

ifconfig_vtnet0="DHCP"
ifconfig_vtnet0_ipv6="inet6 accept_rtadv"


vtnet0: link state changed to UP
Invoking IPv6 network device address event may sleep with the following
non-sleepable locks held:
exclusive sleep mutex vtnet0-rx0 (vtnet0-rx0) r = 0 (0xfffff80005057480) locked
@ /usr/src/sys/dev/virtio/network/if_vtnet.c:2181
stack backtrace:
#0 0xffffffff80b9ce65 at witness_debugger+0x65
#1 0xffffffff80b9dfa9 at witness_warn+0x3e9
#2 0xffffffff80d43d06 at in6_update_ifa+0xcb6
#3 0xffffffff80d6f7af at in6_ifadd+0x1ef
#4 0xffffffff80d6beff at nd6_ra_input+0x100f
#5 0xffffffff80d3e746 at icmp6_input+0x856
#6 0xffffffff80d56d85 at ip6_input+0xc95
#7 0xffffffff80c7b8cd at netisr_dispatch_src+0xad
#8 0xffffffff80c5e48a at ether_demux+0x17a
#9 0xffffffff80c5fa9a at ether_nh_input+0x39a
#10 0xffffffff80c7b8cd at netisr_dispatch_src+0xad
#11 0xffffffff80c5e8e9 at ether_input+0xd9
#12 0xffffffff80959b6e at vtnet_rxq_eof+0x73e
#13 0xffffffff8095937c at vtnet_rx_vq_process+0x9c
#14 0xffffffff80ae4416 at ithread_loop+0x266
#15 0xffffffff80ae0832 at fork_exit+0x82
#16 0xffffffff80fec85e at fork_trampoline+0xe
lock order reversal: (sleepable after non-sleepable)
 1st 0xfffff80005057480 vtnet0-rx0 (vtnet0-rx0, sleep mutex) @
/usr/src/sys/dev/virtio/network/if_vtnet.c:2181
 2nd 0xffffffff81aaabb0 in6_multi_sx (in6_multi_sx, sx) @
/usr/src/sys/netinet6/in6_mcast.c:1217
lock order vtnet0-rx0 -> in6_multi_sx attempted at:
#0 0xffffffff80b9ca2c at witness_checkorder+0xbac
#1 0xffffffff80b358b0 at _sx_xlock+0x60
#2 0xffffffff80d4c411 at in6_joingroup+0x31
#3 0xffffffff80d440bf at in6_update_ifa+0x106f
#4 0xffffffff80d6f7af at in6_ifadd+0x1ef
#5 0xffffffff80d6beff at nd6_ra_input+0x100f
#6 0xffffffff80d3e746 at icmp6_input+0x856
#7 0xffffffff80d56d85 at ip6_input+0xc95
#8 0xffffffff80c7b8cd at netisr_dispatch_src+0xad
#9 0xffffffff80c5e48a at ether_demux+0x17a
#10 0xffffffff80c5fa9a at ether_nh_input+0x39a
#11 0xffffffff80c7b8cd at netisr_dispatch_src+0xad
#12 0xffffffff80c5e8e9 at ether_input+0xd9
#13 0xffffffff80959b6e at vtnet_rxq_eof+0x73e
#14 0xffffffff8095937c at vtnet_rx_vq_process+0x9c
#15 0xffffffff80ae4416 at ithread_loop+0x266
#16 0xffffffff80ae0832 at fork_exit+0x82
#17 0xffffffff80fec85e at fork_trampoline+0xe

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