[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CABi1daE=Jgs=cLe+Zxp28oFhrguFYQKxfTc6agDxYfo=oA+d_A@mail.gmail.com>
Date: Wed, 26 Oct 2011 20:37:11 -0700
From: Dave Hylands <dhylands@...il.com>
To: Sri Ram Vemulpali <sri.ram.gmu06@...il.com>
Cc: Kernel-newbies <kernelnewbies@...linux.org>,
linux-kernel-mail <linux-kernel@...r.kernel.org>,
kernelnewbies <Kernelnewbies@...nelnewbies.org>
Subject: Re: Question on Memory Leak: very tough problem
Hi Sri,
On Wed, Oct 26, 2011 at 8:20 PM, Sri Ram Vemulpali
<sri.ram.gmu06@...il.com> wrote:
>
> Hi All,
>
> I have very difficult problem I am working on to figure out where the
> memory leak is in my system. Sometimes it shows up and sometimes it
> reveals very slowly (I mean increments very slowly). This is dependent
> on system load, if the system is in very high load, then leak is very
> fast. We tried solving this problem from many dimensions, but no
> success.
>
> After quite sometime, we started using valgrind to capture the memory
> leak. The funny thing is the leak disappears once we start running our
> application on top of valgrind.
> So, we cannot capture leak using valgrind. We came to conclusion that,
> since valgrind serializes the allocations (leak disappears), we
> thought this might be result of race conditions, that
> resulted from system high load (by the way ours is multi threaded
> system). We run system without valgrind we see the memory leak.
>
> The question is, is it true that valgrind serializes the mem
> allocations. Does this happen to anyone disappearing the leak when
> used valgrind.
>
> Any thoughts and input that can help me solve this problem. Thanks to
> all in advance.
A couple of possibilities spring to mind.
It might be that the leak is being caused by some uninitialized
variables/memory. Running under valgrind may be causing the
unitialized variables to change, which in turn causes the behavior to
change.
It also may be that you don't have a leak, but in fact have heap
fragmentation, which can look like a leak.
--
Dave Hylands
Shuswap, BC, Canada
http://www.davehylands.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists