Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 Feb 2020 17:04:46 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 244247] Kernel panic when removing 700 vlans via netgraph
Message-ID:  <bug-244247-227@https.bugs.freebsd.org/bugzilla/>

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

            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@FreeBSD.org
          Reporter: admin@support.od.ua

Created attachment 211776
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D211776&action=
=3Dedit
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=20
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=3D2048000
#sysctl net.graph.maxdgram=3D2048000
#sysctl kern.ipc.nmbclusters=3D4000000
#sysctl kern.ipc.maxsockbuf=3D83886080

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

# man ng_vlan

ETHER_IF=3Dem2

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=3D$i hook=3D\"vlan$i\" \}
done
EOF

#sh test_creating_vlan.sh=20

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=3Dem2

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=3D$i hook=3D\"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

--=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-244247-227>