Netdev List
 help / color / mirror / Atom feed
From: Kumar S <ps2kumar@yahoo.com>
To: "netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Memory leak in ip_dst_cache
Date: Thu, 8 Sep 2011 22:04:34 -0700 (PDT)	[thread overview]
Message-ID: <1315544674.20226.YahooMailNeo@web113902.mail.gq1.yahoo.com> (raw)

Hi,
We are running Linux-2.6.24 kernel on MPC8360. Though forwarding is disabled, when connected to public network we see the system running out of memory and rebooting frequently. After doing some study we found out slowly "ip_dst-cache" is growing, and doesn't release entries. Interestingly route entries displayed with command "ip route ls cache" show fewer than the active objects listed under "cat /proc/slabinfo | grep ip_dst_cache". After doing some study, we could reproduce it in the lab by injecting packets withdifferent source IP addresses. Ideally ageing should happen, and old entries are supposed to be cleared out, but that doesn't happen. We do see one or two entries getting agedout but not all. 
After some time we did see that "rt_run_flush" kicks in and flushes out the ip_dst_cache. That's why the "ip route ls cache" fewer entries. But looks like __chache_free() doesn't get called, that's why these entries are not really released. This results in the leak.
 
Any idea what is going wrong here. Is it a known bug?
 
Regards
psk

             reply	other threads:[~2011-09-09  5:04 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-09  5:04 Kumar S [this message]
2011-09-09  5:30 ` Memory leak in ip_dst_cache Eric Dumazet
     [not found]   ` <1315593553.98279.YahooMailNeo@web113904.mail.gq1.yahoo.com>
     [not found]     ` <1315596786.2606.3.camel@edumazet-laptop>
2011-09-09 20:48       ` Kumar S
2011-09-09 21:47         ` Eric Dumazet
     [not found]           ` <1315605497.25052.YahooMailNeo@web113916.mail.gq1.yahoo.com>
2011-09-09 22:08             ` Eric Dumazet
2011-09-09 22:53               ` Kumar S
2011-09-10 13:04                 ` Neil Horman
2011-09-12  3:38                   ` Kumar S
2011-09-12  5:40                     ` Eric Dumazet
2011-09-12  6:07                       ` Kumar S
2011-09-12  6:28                         ` Eric Dumazet
2011-09-12 17:16                           ` Kumar S
2011-09-12 17:57                             ` Eric Dumazet
2011-09-12 22:20                               ` Kumar S

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1315544674.20226.YahooMailNeo@web113902.mail.gq1.yahoo.com \
    --to=ps2kumar@yahoo.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox