[Bug 244247] Kernel panic when removing 700 vlans via netgraph

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Thu Feb 20 17:04:47 UTC 2020


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=244247

            Bug ID: 244247
           Summary: Kernel panic when removing 700 vlans via netgraph
           Product: Base System
           Version: 12.1-STABLE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: kern
          Assignee: bugs at FreeBSD.org
          Reporter: admin at support.od.ua

Created attachment 211776
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=211776&action=edit
ifconfig output

Kernel panic when removing 700 vlans via netgraph

I have a virtual machine on Virtualbox with 2 core CPU and 2 GP RAM.
I have non-GENERIC kernel.
Problem Source - PR 187835.

# uname -a
FreeBSD core.domain.com 12.1-STABLE FreeBSD 12.1-STABLE r358094 SUPPORT-12-1-0 
amd64

# kldstat
Id Refs Address                Size Name
 1   10 0xffffffff80200000  25a7a78 kernel
 2    1 0xffffffff827a8000   3ad5b8 zfs.ko
 3    2 0xffffffff82b56000     a3f0 opensolaris.ko


How to play kernel panic:

1) Add tuning sysctl

#sysctl net.graph.recvspace=2048000
#sysctl net.graph.maxdgram=2048000
#sysctl kern.ipc.nmbclusters=4000000
#sysctl kern.ipc.maxsockbuf=83886080

2) adding 564 vlan
#cat << EOF >> test_creating_vlan.sh
#!/bin/sh

# man ng_vlan

ETHER_IF=em2

ngctl -f- <<EOF
     mkpeer ${ETHER_IF}: vlan lower downstream
     name ${ETHER_IF}:lower vlan-${ETHER_IF}
     connect ${ETHER_IF}: vlan-${ETHER_IF}: upper nomatch
EOF

for i in `jot 564 100`; do
    ngctl mkpeer vlan-${ETHER_IF}: eiface vlan$i ether
    ngctl msg vlan-${ETHER_IF}: addfilter \{ vlan=$i hook=\"vlan$i\" \}
done
EOF

#sh test_creating_vlan.sh 

3) delete all freshly created vlans
#ngctl list | awk ' $2 ~ /ngeth/ {print "ngctl shutdown "$2":";}' | sh

4) add already 700 vlan

#cat << EOF >> test_creating_vlan.2.sh
#!/bin/sh

# man ng_vlan

ETHER_IF=em2

ngctl -f- <<EOF
     mkpeer ${ETHER_IF}: vlan lower downstream
     name ${ETHER_IF}:lower vlan-${ETHER_IF}
     connect ${ETHER_IF}: vlan-${ETHER_IF}: upper nomatch
EOF

for i in `jot 700 100`; do
    ngctl mkpeer vlan-${ETHER_IF}: eiface vlan$i ether
    ngctl msg vlan-${ETHER_IF}: addfilter \{ vlan=$i hook=\"vlan$i\" \}
done
EOF

#sh test_creating_vlan.2.sh

5) Again we delete these 700 vlans
ngctl list | awk ' $2 ~ /ngeth/ {print "ngctl shutdown "$2":";}' | sh

6) and
kernel panic

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


More information about the freebsd-bugs mailing list