I encountered a memory leak issue which led to system crash。 Analyzing vmcore, found that there are so many skb(list as below) not freed.
crash> kmem -s |grep skbuff_head_cache
ffff80007b2a0c00 256 426183 426416 26651 4k skbuff_head_cache
most of them are multicast or broadcast packets. most of them are on eth4.
crash> sk_buff.dev -x ffff8000095a5500
dev = 0xffff800063129000
crash> net
NET_DEVICE NAME IP ADDRESS(ES)
ffff80007b2ca000 lo 127.0.0.1
ffff800063124000 eth0
ffff80007b2c0000 eth1 192.168.1.4
ffff800063126000 eth2
ffff80006362d000 eth3 169.254.200.1
ffff800063129000 eth4
NIC information
[root@localhost ~]# ethtool -i eth4
driver: fsl_dpa
version:
firmware-version: 0
expansion-rom-version:
bus-info: soc:fsl,dpaa
supports-statistics: yes
supports-test: no
supports-eeprom-access: no
supports-register-dump: no
supports-priv-flags: no
second time, I found that the leaked packets could be freed by DOWN/UP the NIC eth4.
[root@localhost log]# cat /proc/slabinfo |grep skbuff_head;date
skbuff_head_cache 246636 247424 256 16 1 : tunables 120 60 8 : slabdata 15464 15464 120
2021年 09月 15日 星期三 13:50:51 CST
[root@localhost log]# ifconfig eth4 up
[root@localhos log]# cat /proc/slabinfo |grep skbuff_head;date
skbuff_head_cache 3516 14528 256 16 1 : tunables 120 60 8 : slabdata 908 908 420
2021年 09月 15日 星期三 13:50:58 CST
Anyone who can help me to diagnose it is very appreciate.