[Bug 289219] lock order reversal between vtnet1-rx0 (if_vtnet.c:2213) and in6_multi_sx (in6_mcast.c:1217)

[email protected]
Newsgroups gmane.os.freebsd.devel.net
Message-ID <[email protected]/bugzilla/>
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=289219

            Bug ID: 289219
           Summary: lock order reversal between vtnet1-rx0
                    (if_vtnet.c:2213) and in6_multi_sx (in6_mcast.c:1217)
           Product: Base System
           Version: 15.0-CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: kern
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]

I see this lock order reversal on 15-PRERELEASE
(778bfd4e1033715de6cf21e2e2454bdea2a0f1ab) as a guest vm inside bhyve.

Here is the log:
```
vtnet0: link state changed to UP
vtnet1: link state changed to UP
Invoking IPv6 network device address event may sleep with the following
non-sleepable locks held:
exclusive sleep mutex vtnet1-rx0 (vtnet1-rx0) r = 0 (0xfffff80003680480) locked
@ /usr/src/sys/dev/virtio/network/if_vtnet.c:2213
stack backtrace:
#0 0xffffffff80bff62c at witness_debugger+0x6c
#1 0xffffffff80c00840 at witness_warn+0x430
#2 0xffffffff80dc7c97 at in6_update_ifa+0xc97
#3 0xffffffff80df45b0 at in6_ifadd+0x1e0
#4 0xffffffff80df0c83 at nd6_ra_input+0x1023
#5 0xffffffff80dc1986 at icmp6_input+0x5b6
#6 0xffffffff80ddb3a8 at ip6_input+0xc98
#7 0xffffffff80cf0ea4 at netisr_dispatch_src+0xb4
#8 0xffffffff80cd319a at ether_demux+0x16a
#9 0xffffffff80cd483e at ether_nh_input+0x3ce
#10 0xffffffff80cf0ea4 at netisr_dispatch_src+0xb4
#11 0xffffffff80cd35f5 at ether_input+0xd5
#12 0xffffffff809a40ca at vtnet_rxq_eof+0x74a
#13 0xffffffff809a38cc at vtnet_rx_vq_process+0x9c
#14 0xffffffff80b3d326 at ithread_loop+0x266
#15 0xffffffff80b39602 at fork_exit+0x82
#16 0xffffffff810abd9e at fork_trampoline+0xe
lock order reversal: (sleepable after non-sleepable)
 1st 0xfffff80003680480 vtnet1-rx0 (vtnet1-rx0, sleep mutex) @
/usr/src/sys/dev/virtio/network/if_vtnet.c:2213
 2nd 0xffffffff81edd170 in6_multi_sx (in6_multi_sx, sx) @
/usr/src/sys/netinet6/in6_mcast.c:1217
lock order vtnet1-rx0 -> in6_multi_sx attempted at:
#0 0xffffffff80bff201 at witness_checkorder+0xbe1
#1 0xffffffff80b925a0 at _sx_xlock+0x60
#2 0xffffffff80dcffe1 at in6_joingroup+0x31
#3 0xffffffff80dc805a at in6_update_ifa+0x105a
#4 0xffffffff80df45b0 at in6_ifadd+0x1e0
#5 0xffffffff80df0c83 at nd6_ra_input+0x1023
#6 0xffffffff80dc1986 at icmp6_input+0x5b6
#7 0xffffffff80ddb3a8 at ip6_input+0xc98
#8 0xffffffff80cf0ea4 at netisr_dispatch_src+0xb4
#9 0xffffffff80cd319a at ether_demux+0x16a
#10 0xffffffff80cd483e at ether_nh_input+0x3ce
#11 0xffffffff80cf0ea4 at netisr_dispatch_src+0xb4
#12 0xffffffff80cd35f5 at ether_input+0xd5
#13 0xffffffff809a40ca at vtnet_rxq_eof+0x74a
#14 0xffffffff809a38cc at vtnet_rx_vq_process+0x9c
#15 0xffffffff80b3d326 at ithread_loop+0x266
#16 0xffffffff80b39602 at fork_exit+0x82
#17 0xffffffff810abd9e at fork_trampoline+0xe
```

With the configuration below (especially accept_rtadv), it happens immediately
after boot:
ipv6_activate_all_interfaces="YES"
ifconfig_DEFAULT="inet6 accept_rtadv"
ifconfig_vtnet0_ipv6="inet6 fdb5:c59b:114e::a"

-- 
You are receiving this mail because:
You are on the CC list for the bug.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.