Description

This article explain what "host mbuf leak" means and how to handle it.

Symptoms

CPP reports following log sometimes, what does it mean and how to handle it

Jun 7 18:47:58 BNUFW1 cpp0 swanhill8: SPU8 host mbuf leak 1%.
Jun 7 18:48:09 BNUFW1 cpp0 swanhill8: SPU8 host mbuf leak 2%.
Jun 7 18:49:59 BNUFW1 cpp0 swanhill8: SPU8 host mbuf leak 3%.
Jun 7 18:50:21 BNUFW1 cpp0 swanhill8: SPU8 host mbuf leak 1%.
Jun 7 19:11:48 BNUFW1 cpp0 swanhill8: SPU8 host mbuf leak 2%.
Jun 7 19:12:44 BNUFW1 cpp0 swanhill8: SPU8 host mbuf leak 1%.
Jun 7 19:18:24 BNUFW1 cpp0 swanhill8: SPU8 host mbuf leak 2%.
Jun 7 19:19:52 BNUFW1 cpp0 swanhill8: SPU8 host mbuf leak 3%.
Jun 7 19:21:53 BNUFW1 cpp0 swanhill8: SPU8 host mbuf leak 4%.
Jun 7 19:24:17 BNUFW1 cpp0 swanhill8: SPU8 host mbuf leak 1%.


Solution


Example: host mbuf leak percentage = total lost / total_count

1.  Total lost is here

=== SPU7.0, fpc7.pic0 flowd> show mbuf timeout

POOL NAME: 512 payload
0:mbuf 0xcc55600, client: 4:(host processing)
...
137:mbuf 0xcf48e00, client: 4:(host processing)
total_lost = 138
                 client name    leak num
 1                 multicast           0
 2             fragmentation           0
 3             host sampling           0
 4           host processing         138
 5      multilink processing           0
 6          service freelist           0
 7     FT service originated           0
 8            UTM processing           0
 9            FTP processing           0
10      TCP Proxy processing           0
32                   unknown           0

POOL NAME: 2K payload
total_lost = 0
POOL NAME: 10K payload
total_lost = 0
POOL NAME: 64K payload
total_lost = 0
POOL NAME: JMPI msg
total_lost = 0
Mbuf leak trig: 80%, interval: 300 seconds, total lost: 138, pool tested: 5
2.  Total_count is here, it is 6144+6144+512=12800
=== SPU7.0, fpc7.pic0 flowd> show mbuf counter

Mbuf Pool Counters:

                  Name                    total_count   enq_count     deq_count      free_count    err_count
            -----------------             ---------     ---------     ----------     ---------      -------
Flow shared 512byte length packet pool        6144  3324625235    3324619241           5994           0
            Flow shared 2K packet pool        6144   272143309     272137165           6144           0
           Flow shared 10K packet pool         512     4742765       4742253            512           0
...

The log does not actually mean host mbuf leak, it is current mbuf held. If the host mbuf leak < 5%, it is most likely not a leak; while it >= 5% and increases continuously, it is possibly mbuf usage problem. Please submit a technical case and work with vendor to solve the problem.