Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Mar 2021 04:42:48 +0000
From:      bugzilla-noreply@freebsd.org
To:        net@FreeBSD.org
Subject:   [Bug 254015] [if_bridge] Panic when using bridge interface on 13.0-BETA4
Message-ID:  <bug-254015-7501-2vzPqCKo5j@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-254015-7501@https.bugs.freebsd.org/bugzilla/>
References:  <bug-254015-7501@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D254015

--- Comment #1 from shamaz.mazum@gmail.com ---
Here is another backtrace from 13.0-RC3:

(kgdb) bt
#0  __curthread () at /usr/src/sys/amd64/include/pcpu_aux.h:55
#1  doadump (textdump=3D<optimized out>) at /usr/src/sys/kern/kern_shutdown=
.c:399
#2  0xffffffff80bfd076 in kern_reboot (howto=3D260) at
/usr/src/sys/kern/kern_shutdown.c:486
#3  0xffffffff80bfd4f0 in vpanic (fmt=3D<optimized out>, ap=3D<optimized ou=
t>) at
/usr/src/sys/kern/kern_shutdown.c:919
#4  0xffffffff80bfd2f3 in panic (fmt=3D<unavailable>) at
/usr/src/sys/kern/kern_shutdown.c:843
#5  0xffffffff810b2187 in trap_fatal (frame=3D0xfffffe00d70282a0, eva=3D28)=
 at
/usr/src/sys/amd64/amd64/trap.c:915
#6  0xffffffff810b21df in trap_pfault (frame=3Dframe@entry=3D0xfffffe00d702=
82a0,
usermode=3Dfalse, signo=3D<optimized out>, signo@entry=3D0x0, ucode=3D<opti=
mized out>,
ucode@entry=3D0x0) at /usr/src/sys/amd64/amd64/trap.c:732
#7  0xffffffff810b183d in trap (frame=3D0xfffffe00d70282a0) at
/usr/src/sys/amd64/amd64/trap.c:398
#8  <signal handler called>
#9  tcp_m_copym (m=3Dm@entry=3D0x0, off0=3D0, plen=3Dplen@entry=3D0xfffffe0=
0d702854c,
seglimit=3Dseglimit@entry=3D0, segsize=3Dsegsize@entry=3D0, sb=3D0xfffff802=
06e9a9c0,
hw_tls=3D<optimized out>)
    at /usr/src/sys/netinet/tcp_output.c:1930
#10 0xffffffff80dbced1 in tcp_output (tp=3D0xfffffe0121146478) at
/usr/src/sys/netinet/tcp_output.c:1078
#11 0xffffffff80db44db in tcp_do_segment (m=3D0xfffff80029176d00, th=3D<opt=
imized
out>, so=3D<optimized out>, tp=3D0xfffffe0121146478, drop_hdrlen=3D52,
tlen=3D<optimized out>, iptos=3D0 '\000')
    at /usr/src/sys/netinet/tcp_input.c:3270
#12 0xffffffff80db15ce in tcp_input (mp=3D<optimized out>, offp=3D<optimize=
d out>,
proto=3D<optimized out>) at /usr/src/sys/netinet/tcp_input.c:1382
#13 0xffffffff80da3f85 in ip_input (m=3D0x0) at
/usr/src/sys/netinet/ip_input.c:833
#14 0xffffffff80d327ca in netisr_dispatch_src (proto=3D1, source=3D<optimiz=
ed out>,
source@entry=3D0, m=3D0x0) at /usr/src/sys/net/netisr.c:1143
#15 0xffffffff80d32abf in netisr_dispatch (proto=3D0, m=3D0xfffffe00d702854=
c) at
/usr/src/sys/net/netisr.c:1234
#16 0xffffffff80d16f58 in ether_demux (ifp=3Difp@entry=3D0xfffff80003b51800=
, m=3D0x0)
at /usr/src/sys/net/if_ethersubr.c:923
#17 0xffffffff80d182dc in ether_input_internal (ifp=3D0xfffff80003b51800, m=
=3D0x0)
at /usr/src/sys/net/if_ethersubr.c:709
#18 ether_nh_input (m=3D<optimized out>) at /usr/src/sys/net/if_ethersubr.c=
:739
#19 0xffffffff80d327ca in netisr_dispatch_src (proto=3Dproto@entry=3D5,
source=3D<optimized out>, source@entry=3D0, m=3D0x0, m@entry=3D0xfffff80029=
176d00) at
/usr/src/sys/net/netisr.c:1143
#20 0xffffffff80d32abf in netisr_dispatch (proto=3D0, proto@entry=3D5,
m=3D0xfffffe00d702854c, m@entry=3D0xfffff80029176d00) at
/usr/src/sys/net/netisr.c:1234
#21 0xffffffff80d173a9 in ether_input (ifp=3D<optimized out>,
m=3D0xfffff80029176d00) at /usr/src/sys/net/if_ethersubr.c:830
#22 0xffffffff809175ed in re_rxeof (sc=3D<optimized out>,
sc@entry=3D0xfffffe00c5444000, rx_npktsp=3D0x0) at /usr/src/sys/dev/re/if_r=
e.c:2388
#23 0xffffffff80914e40 in re_intr_msi (xsc=3D0xfffffe00c5444000) at
/usr/src/sys/dev/re/if_re.c:2684
#24 0xffffffff80bbe5bd in intr_event_execute_handlers (p=3D<optimized out>,
ie=3D0xfffff80003b4a600) at /usr/src/sys/kern/kern_intr.c:1168
#25 ithread_execute_handlers (p=3D<optimized out>, ie=3D0xfffff80003b4a600)=
 at
/usr/src/sys/kern/kern_intr.c:1181
#26 ithread_loop (arg=3Darg@entry=3D0xfffff80003b12e40) at
/usr/src/sys/kern/kern_intr.c:1269
#27 0xffffffff80bbb3be in fork_exit (callout=3D0xffffffff80bbe370 <ithread_=
loop>,
arg=3D0xfffff80003b12e40, frame=3D0xfffffe00d7028b80) at
/usr/src/sys/kern/kern_fork.c:1069
#28 <signal handler called>

It seems the problem is not in if_bridge, but in some thing called mbuf)

Here is my network interfaces in FreeBSD 12.2:

ifconfig
re0: flags=3D8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 =
mtu
1500
=20=20=20=20=20=20=20
options=3D82099<RXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_MAGIC,LINKST=
ATE>
        ether ac:9e:17:4e:9f:04
        media: Ethernet autoselect (1000baseT <full-duplex>)
        status: active
        nd6 options=3D29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
re1: flags=3D8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
=20=20=20=20=20=20=20
options=3D8209b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_MAGIC=
,LINKSTATE>
        ether 10:fe:ed:02:b9:18
        inet 176.193.192.183 netmask 0xffffe000 broadcast 176.193.223.255
        media: Ethernet autoselect (1000baseT <full-duplex>)
        status: active
        nd6 options=3D29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
lo0: flags=3D8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
        options=3D680003<RXCSUM,TXCSUM,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
        inet6 ::1 prefixlen 128
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
        inet 127.0.0.1 netmask 0xff000000
        groups: lo
        nd6 options=3D21<PERFORMNUD,AUTO_LINKLOCAL>
wlan0: flags=3D8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric =
0 mtu
1500
        ether 30:b5:c2:6b:4a:8e
        groups: wlan
        ssid skynetV25 channel 1 (2412 MHz 11g) bssid 30:b5:c2:6b:4a:8e
        regdomain 32924 country CN indoor ecm authmode WPA2/802.11i
        privacy MIXED deftxkey 2 AES-CCM 2:128-bit txpower 20 scanvalid 60
        protmode CTS wme burst dtimperiod 1 -dfs
        parent interface: ath0
        media: IEEE 802.11 Wireless Ethernet autoselect mode 11g <hostap>
        status: running
        nd6 options=3D29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
bridge0: flags=3D8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu =
1500
        ether 02:27:ad:54:af:00
        inet 192.168.20.1 netmask 0xffffff00 broadcast 192.168.20.255
        id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15
        maxage 20 holdcnt 6 proto stp-rstp maxaddr 2000 timeout 1200
        root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0
        member: re0 flags=3D143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
                ifmaxaddr 0 port 1 priority 128 path cost 55
        member: wlan0 flags=3D143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP>
                ifmaxaddr 0 port 4 priority 128 path cost 33333
        groups: bridge
        nd6 options=3D9<PERFORMNUD,IFDISABLED>
wg0: flags=3D8080c1<UP,RUNNING,NOARP,MULTICAST> metric 0 mtu 1420
        options=3D880000<LINKSTATE>
        inet 10.72.53.108 netmask 0xffffffff
        inet6 fe80::ae9e:17ff:fe4e:9f04%wg0 prefixlen 64 scopeid 0x6
        inet6 fc00:bbbb:bbbb:bb01::9:356b prefixlen 128
        groups: wg
        listen-port: 12674
        private-key: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
        public-key:  gkF73UggCUanPjFZmznv3BjkiuMxXuXbYiUSbuDJTjw=3D
        media: Ethernet autoselect (25GBase-ACC <full-duplex>)
        status: active
        nd6 options=3D21<PERFORMNUD,AUTO_LINKLOCAL>

I backported if_wg from 13.0. When upgrading to 13.0 I do not create it.

Firewall rules:

00100      0         0 reass ip from any to any frag in
00200 131190 110141293 skipto 30000 ip from any to any layer2
00300      0         0 check-state :before-nat
00400  36470   2220647 allow ip from any to any tagged 100 via bridge0
00500      8      2616 allow udp from any 68 to me 67 in via bridge0 keep-s=
tate
:before-nat
00600      3       144 allow icmp from any to any via bridge0
00700      6       780 deny ip from any to 192.168.20.0/24 in via bridge0
00800   3134    210604 allow ip from any to any via re0
00900   1177     89601 allow ip from any to any via wlan0
01000  79865 101970562 allow ip from any to any via bridge0
01100     16      1664 allow ip from any to any via lo0
01200      0         0 allow ip from any to any via tap0
01300  10428   6033288 allow udp from me to 185.213.155.130 51820 out via r=
e1
keep-state :before-nat
01400      0         0 allow icmp from any to any via re1
01500    287     45445 deny ip from any to any via re1
01600   5501   4584315 nat 1 ip from any to any in via wg0
01700      0         0 check-state :after-nat
01800      0         0 skipto 20000 tcp from me to any 53 out via wg0 setup
keep-state :after-nat
01900     96     10310 skipto 20000 udp from me to any 53 out via wg0
keep-state :after-nat
02000      0         0 skipto 20000 tcp from me to any 80,443,22,43,9418 out
via wg0 setup keep-state :after-nat
02100      0         0 skipto 20000 udp from any 68 to any 67 out via wg0
keep-state :after-nat
02200    282     21432 skipto 20000 udp from me to any 123 out via wg0
keep-state :after-nat
02300      0         0 skipto 20000 icmp from any to any via wg0
02400      0         0 deny ip from me to any out via wg0
02500      1        48 deny ip from any to me in via wg0
20000   4882    750396 nat 1 ip from any to any out via wg0
20100  10378   5334303 allow ip from any to any via wg0
20200      0         0 deny ip from any to any
30000   6303         0 allow ip from any to any mac-type 0x0806
30100      0         0 allow tag 100 ip from any to any MAC any
cc:af:78:58:73:a2 in
30200      0         0 allow tag 100 ip from any to any MAC cc:af:78:58:73:=
a2
any out
30300  37494   2287884 allow tag 100 ip from any to any MAC any
60:45:cb:64:2a:65 in
30400  67051  97788491 allow tag 100 ip from any to any MAC 60:45:cb:64:2a:=
65
any out
30500      0         0 allow tag 100 ip from any to any MAC any
3c:7c:3f:3c:52:5b in
30600      0         0 allow tag 100 ip from any to any MAC 3c:7c:3f:3c:52:=
5b
any out
30700  20342  10064918 allow ip from any to any
65535     54      7970 allow ip from any to any

Also there is kernel nat on interface re1.

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-254015-7501-2vzPqCKo5j>