Cisco Cisco IOS Software Release 12.2(33)SRE Guide De Dépannage

Page de 5
MALLOCFAIL Errors and General Memory
Problems Troubleshoot
Document ID: 116467
Contributed by Brandon Lynch, Cisco TAC Engineer.
Sep 30, 2013
Contents
Introduction
MALLOCFAIL Errors
     Processor Pool
        Causes and What to Collect
     I/O Pool
        Causes and What to Collect
Items to Investigate
Summary
Related Information
Introduction
This document discusses MALLOCFAIL errors on native Cisco IOS
®
, as well as steps to take and
information to gather before you open a Cisco Technical Assistance Center (TAC) case or reload the device in
order to expedite problem resolution. This document is not exhaustive, but provides a general guideline used
in order to troubleshoot memory issues with many routers and switches.
MALLOCFAIL Errors
Memory problems manifest themselves in several ways on switches and routers. In many instances, a device
that experiences memory errors is reloaded before the appropriate data is gathered.
Memory issues generally appear in the form of MALLOCFAIL errors in the logs of your router or switch.
These errors are important because they provide "road signs" to direct the investigation. Here is a sample
MALLOCFAIL error:
%SYS−2−MALLOCFAIL: Memory allocation of 65536 bytes failed
from 0x60103098, 
alignment 0 
Pool: Processor  Free: 5453728  Cause: Memory fragmentation 
Alternate Pool: None  Free: 0  Cause: No Alternate pool
The first thing to notice is how much memory you need to allocate and how much free memory you have.
This example shows a scenario where you must allocate 65KB from a pool that has only approximately
5.45MB free. The output indicates that, even though there is enough free memory, the largest contiguous
block is smaller than 65KB, and the memory allocation failed. While, by definition, this is considered
memory fragmentation, this is not usually the cause. Most often, it is simply caused by low memory in the
pool itself.
The second thing to notice is the pool type. The prevoius example dealt with the Processor pool. This is
important because it is the first road sign that directs the investigation and what needs to be checked. The pool
specified should be either Processor or I/O. Here is an example of an I/O memory error: