Showing results for 
Search instead for 
Did you mean: 

Ask the Expert- SD-WAN

The user receives the %SYS-2-BADSHARE: Bad refcount in datagram_done error message


Core issue

%SYS-2-BADSHARE: Bad refcount in [chars], ptr=[hex], count=[hex]

A reference count is used to track the usage of many data structures. A function increments the count when it begins to use a structure and decrements it when it is finished. When the count becomes zero, the data structure is freed. When the count is accessed, it is found to be negative, which means that the data structure is not freed until the system is re-loaded. The error message indicates that the process is trying to free a packet which no one is referencing.

This is always a software bug.


Normally, this is an informational error, and it should not affect the switch performance, except for the overhead of reporting the error.

To fix this problem, perform one of these procedures:

  • Upgrade to the latest Cisco IOS Software available.

If the problem persists, open a case with TAC.


Have these messages in our corporate router as CE for our MPLS-VPN link.

We have used  c2900-universalk9-mz.SPA.152-3.T.bin.

Can somebody tell me which image should I upgrade to or how to choose the correct image for that matter?


Cisco Employee

There should be a traceback associated with the error message, it needs to be decoded to find the bug. I'd suggest a TAC SR or the output interpreter


Thanks for the reply. We will have a talk with my seniors on this.

CreatePlease to create content
Content for Community-Ad
July's Community Spotlight Awards