[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <AANLkTimb7rP0rS0OU8nan5uNEhHx_kEYL99ImZ3c8o0D@mail.gmail.com>
Date: Fri, 18 Jun 2010 13:41:07 +0530
From: Sankar P <sankar.curiosity@...il.com>
To: "Luis R. Rodriguez" <lrodriguez@...eros.com>
Cc: "rnagarajan@...ell.com" <rnagarajan@...ell.com>,
"teheo@...ell.com" <teheo@...ell.com>,
Catalin Marinas <catalin.marinas@....com>,
Pekka Enberg <penberg@...helsinki.fi>,
Luis Rodriguez <Luis.Rodriguez@...eros.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-mm@...ck.org" <linux-mm@...ck.org>
Subject: Re: Probable Bug (or configuration error) in kmemleak
On Thu, Jun 17, 2010 at 11:06 PM, Luis R. Rodriguez
<lrodriguez@...eros.com> wrote:
> On Thu, Jun 17, 2010 at 02:21:56AM -0700, Sankar P wrote:
>> Hi,
>>
>> I wanted to detect memory leaks in one of my kernel modules. So I
>> built Linus' tree with the following config options enabled (on top
>> of make defconfig)
>>
>> CONFIG_DEBUG_KMEMLEAK=y
>> CONFIG_DEBUG_KMEMLEAK_EARLY_LOG_SIZE=400
>> CONFIG_DEBUG_KMEMLEAK_TEST=y
>>
>> If I boot with this kernel, debugfs is automatically mounted. But I do
>> not have the file:
>>
>> /sys/kernel/debug/kmemleak
>>
>> created at all. There are other files like kprobes in the mounted
>> /sys/kernel/debug directory btw. So I am not able to detect any of the
>> memory leaks. Is there anything I am doing wrong or missing (or) is
>> this a bug in kmemleak ?
>>
>> Please let me know your suggestions to fix this and get memory leaks
>> reporting working. Thanks.
>>
>> The full .config file is also attached with this mail. Sorry for the
>> attachment, I did not want to paste 5k lines in the mail. Sorry if it
>> is wrong.
>
>
> This is odd.. Do you see this message on your kernel ring buffer?
>
> Failed to create the debugfs kmemleak file
>
I dont see such an error in the dmesg output. But I got another
interesting error:
[ 0.000000] kmemleak: Early log buffer exceeded, please increase
DEBUG_KMEMLEAK_EARLY_LOG_SIZE
[ 0.000000] kmemleak: Kernel memory leak detector disabled
But after that also, I see some other lines like:
[ 0.511641] kmemleak: vmalloc(64) = f7857000
[ 0.511645] kmemleak: vmalloc(64) = f785a000
The variable DEBUG_KMEMLEAK_EARLY_LOG_SIZE was set to 400 by default.
I changed it to 4000 and then 40000 (may be should try < 32567 ?) but
still I get the same error message and the file
/sys/kernel/debug/kmem* is never created at all.
Attached is the output of : dmesg | grep -i kmemleak
--
Sankar P
http://psankar.blogspot.com
Download attachment "psankar-dmsg" of type "application/octet-stream" (2296 bytes)
Powered by blists - more mailing lists