Bug 229777

Summary: dwc ethernet (ROCK64): nmbclusters limit reached results in panic
Product: Base System Reporter: Greg V <greg>
Component: armAssignee: freebsd-arm (Nobody) <freebsd-arm>
Status: New ---    
Severity: Affects Some People CC: peterj
Priority: ---    
Version: CURRENT   
Hardware: arm64   
OS: Any   

Description Greg V 2018-07-14 20:32:14 UTC
I was just building some software on an NFS mount, and suddenly:

[zone: mbuf_cluster] kern.ipc.nmbclusters limit reached
panic: ether_nh_input: no mbuf packet header!

Raised the limit, but I don't think it should just panic?
Comment 1 Peter Jeremy freebsd_committer 2019-02-07 09:11:07 UTC
This is still present in head at r343598.

I have a 2GB Rock64 connected to my NFS server via GigE.  By default it has 42025 mbuf clusters (this is much lower than x86 systems with equivalent RAM) that I've increased to 200000.  Running a "make -j4 buildworld" and sampling "vmstat -z" every minute, I get the following (this is restarting a failed buildworld using META_MODE).  Note that it's not a gradual leak but seems to leak a chunk of clusters and then sits at that level for several minutes.  Stopping the buildworld doesn't free up the clusters so they are leaked, not just in use.  The following isn't perfectly monotonic but only goes backwards at one point.

0755:mbuf_cluster:          2048, 200000,    3542,     506,    3687,   0,   0
0756:mbuf_cluster:          2048, 200000,    4554,    1012,    4725,   0,   0
0757:mbuf_cluster:          2048, 200000,    4554,    1012,    4748,   0,   0
0758:mbuf_cluster:          2048, 200000,    4554,    1012,    4771,   0,   0
0759:mbuf_cluster:          2048, 200000,    4554,    1012,    4794,   0,   0
0800:mbuf_cluster:          2048, 200000,   10120,     760,   20290,   0,   0
0801:mbuf_cluster:          2048, 200000,   10879,    1265,   24025,   0,   0
0802:mbuf_cluster:          2048, 200000,   10879,    1265,   25314,   0,   0
0803:mbuf_cluster:          2048, 200000,   11132,    1012,   25690,   0,   0
0804:mbuf_cluster:          2048, 200000,   12144,    1012,   30254,   0,   0
0805:mbuf_cluster:          2048, 200000,   13915,    1013,   50187,   0,   0
0806:mbuf_cluster:          2048, 200000,   19734,     760,   72872,   0,   0
0807:mbuf_cluster:          2048, 200000,   20746,    1012,   92112,   0,   0
0808:mbuf_cluster:          2048, 200000,   20746,    1012,   92254,   0,   0
0809:mbuf_cluster:          2048, 200000,   21252,    1012,   93880,   0,   0
0810:mbuf_cluster:          2048, 200000,   23023,    1013,   97112,   0,   0
0811:mbuf_cluster:          2048, 200000,   31625,    1013,  124799,   0,   0
0812:mbuf_cluster:          2048, 200000,   31625,    1013,  124858,   0,   0
0813:mbuf_cluster:          2048, 200000,   31625,    1013,  124969,   0,   0
0814:mbuf_cluster:          2048, 200000,   31625,    1013,  125382,   0,   0
0815:mbuf_cluster:          2048, 200000,   31625,    1013,  125451,   0,   0
0816:mbuf_cluster:          2048, 200000,   40820,    1498,  220253,   0,   0
0817:mbuf_cluster:          2048, 200000,   48829,    1441,  300628,   0,   0
0818:mbuf_cluster:          2048, 200000,   48829,    1441,  303776,   0,   0
0819:mbuf_cluster:          2048, 200000,   48829,    1441,  309853,   0,   0
0820:mbuf_cluster:          2048, 200000,   49335,    1185,  316688,   0,   0
0821:mbuf_cluster:          2048, 200000,   50094,    1180,  323880,   0,   0
0822:mbuf_cluster:          2048, 200000,   50094,    1430,  326295,   0,   0
0823:mbuf_cluster:          2048, 200000,   51106,     920,  332130,   0,   0
0824:mbuf_cluster:          2048, 200000,   51106,    1172,  334384,   0,   0
0825:mbuf_cluster:          2048, 200000,   51106,    1422,  336230,   0,   0
0826:mbuf_cluster:          2048, 200000,   51106,    1422,  339243,   0,   0
0827:mbuf_cluster:          2048, 200000,   50656,    1873,  342646,   0,   0
0828:mbuf_cluster:          2048, 200000,   50853,    1603,  351059,   0,   0
0829:mbuf_cluster:          2048, 200000,   51106,    1198,  352932,   0,   0
0830:mbuf_cluster:          2048, 200000,   52118,    2112,  365459,   0,   0
0831:mbuf_cluster:          2048, 200000,   52118,    1936,  366591,   0,   0
0832:mbuf_cluster:          2048, 200000,   52118,    1838,  367848,   0,   0
0833:mbuf_cluster:          2048, 200000,   54142,    1658,  383418,   0,   0
0834:mbuf_cluster:          2048, 200000,   54142,    1658,  385541,   0,   0
0835:mbuf_cluster:          2048, 200000,   54901,    1137,  392943,   0,   0
0836:mbuf_cluster:          2048, 200000,   55407,    1583,  403383,   0,   0
0837:mbuf_cluster:          2048, 200000,   55407,    1583,  411514,   0,   0
0838:mbuf_cluster:          2048, 200000,   55913,    1553,  420834,   0,   0
0839:mbuf_cluster:          2048, 200000,   55913,    1553,  424251,   0,   0
0840:mbuf_cluster:          2048, 200000,   56166,    1300,  428153,   0,   0
0841:mbuf_cluster:          2048, 200000,   56166,    1300,  429588,   0,   0
0842:mbuf_cluster:          2048, 200000,   56166,    1300,  431134,   0,   0
0843:mbuf_cluster:          2048, 200000,   56166,    1538,  433335,   0,   0
0844:mbuf_cluster:          2048, 200000,   56419,    1285,  435480,   0,   0
0845:mbuf_cluster:          2048, 200000,   57431,    1463,  440081,   0,   0
0846:mbuf_cluster:          2048, 200000,   57431,    1463,  441174,   0,   0
0847:mbuf_cluster:          2048, 200000,   57684,    1448,  449174,   0,   0
0848:mbuf_cluster:          2048, 200000,   57684,    1448,  450645,   0,   0
0849:mbuf_cluster:          2048, 200000,   58190,    1180,  460372,   0,   0
0850:mbuf_cluster:          2048, 200000,   58190,    1418,  462094,   0,   0
0851:mbuf_cluster:          2048, 200000,   59708,    1090,  468385,   0,   0
0852:mbuf_cluster:          2048, 200000,   59708,    1568,  470372,   0,   0
0853:mbuf_cluster:          2048, 200000,   59708,    1568,  472798,   0,   0
0854:mbuf_cluster:          2048, 200000,   60720,    1272,  480909,   0,   0
0855:mbuf_cluster:          2048, 200000,   60720,    1512,  484643,   0,   0