From: Sankar P <sankar.curiosity@gmail.com>
To: "Luis R. Rodriguez" <lrodriguez@atheros.com>
Cc: "rnagarajan@novell.com" <rnagarajan@novell.com>,
"teheo@novell.com" <teheo@novell.com>,
Catalin Marinas <catalin.marinas@arm.com>,
Pekka Enberg <penberg@cs.helsinki.fi>,
Luis Rodriguez <Luis.Rodriguez@atheros.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-mm@kvack.org" <linux-mm@kvack.org>
Subject: Re: Probable Bug (or configuration error) in kmemleak
Date: Fri, 18 Jun 2010 13:41:07 +0530 [thread overview]
Message-ID: <AANLkTimb7rP0rS0OU8nan5uNEhHx_kEYL99ImZ3c8o0D@mail.gmail.com> (raw)
In-Reply-To: <20100617173604.GB28055@tux>
[-- Attachment #1: Type: text/plain, Size: 1973 bytes --]
On Thu, Jun 17, 2010 at 11:06 PM, Luis R. Rodriguez
<lrodriguez@atheros.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
[-- Attachment #2: psankar-dmsg --]
[-- Type: application/octet-stream, Size: 2296 bytes --]
[ 0.000000] Linux version 2.6.32.13sle-kmemleak (geeko@buildhost) (gcc version 4.3.4 [gcc-4_3-branch revision 152973] (SUSE Linux) ) #1 SMP Thu Jun 17 04:17:02 IST 2010
[ 0.000000] kmemleak: Early log buffer exceeded, please increase DEBUG_KMEMLEAK_EARLY_LOG_SIZE
[ 0.000000] kmemleak: Kernel memory leak detector disabled
[ 0.511585] Kmemleak testing
[ 0.511588] kmemleak: kmalloc(32) = f44876e0
[ 0.511591] kmemleak: kmalloc(32) = f44876a8
[ 0.511595] kmemleak: kmalloc(1024) = f47c74f8
[ 0.511599] kmemleak: kmalloc(1024) = f47c70e0
[ 0.511604] kmemleak: kmalloc(2048) = f440b060
[ 0.511609] kmemleak: kmalloc(2048) = f440a848
[ 0.511620] kmemleak: kmalloc(4096) = f47b5000
[ 0.511630] kmemleak: kmalloc(4096) = f47b6000
[ 0.511641] kmemleak: vmalloc(64) = f7857000
[ 0.511645] kmemleak: vmalloc(64) = f785a000
[ 0.511649] kmemleak: vmalloc(64) = f785d000
[ 0.511653] kmemleak: vmalloc(64) = f7860000
[ 0.511657] kmemleak: vmalloc(64) = f7863000
[ 0.511660] kmemleak: kmalloc(sizeof(*elem)) = f47b3a38
[ 0.511663] kmemleak: kmalloc(sizeof(*elem)) = f47b3920
[ 0.511666] kmemleak: kmalloc(sizeof(*elem)) = f47b3808
[ 0.511669] kmemleak: kmalloc(sizeof(*elem)) = f47b36f0
[ 0.511672] kmemleak: kmalloc(sizeof(*elem)) = f47b35d8
[ 0.511675] kmemleak: kmalloc(sizeof(*elem)) = f47b34c0
[ 0.511678] kmemleak: kmalloc(sizeof(*elem)) = f47b33a8
[ 0.511681] kmemleak: kmalloc(sizeof(*elem)) = f47b3290
[ 0.511684] kmemleak: kmalloc(sizeof(*elem)) = f47b3178
[ 0.511687] kmemleak: kmalloc(sizeof(*elem)) = f47b3060
[ 0.511693] kmemleak: kmalloc(129) = f47b7e98
[ 0.511696] kmemleak: kmalloc(129) = f47b7d80
[ 2.056433] usb usb1: Manufacturer: Linux 2.6.32.13sle-kmemleak ehci_hcd
[ 2.097280] usb usb2: Manufacturer: Linux 2.6.32.13sle-kmemleak ehci_hcd
[ 2.117413] usb usb3: Manufacturer: Linux 2.6.32.13sle-kmemleak uhci_hcd
[ 2.118353] usb usb4: Manufacturer: Linux 2.6.32.13sle-kmemleak uhci_hcd
[ 2.119229] usb usb5: Manufacturer: Linux 2.6.32.13sle-kmemleak uhci_hcd
[ 2.120098] usb usb6: Manufacturer: Linux 2.6.32.13sle-kmemleak uhci_hcd
[ 2.120957] usb usb7: Manufacturer: Linux 2.6.32.13sle-kmemleak uhci_hcd
[ 2.121821] usb usb8: Manufacturer: Linux 2.6.32.13sle-kmemleak uhci_hcd
next prev parent reply other threads:[~2010-06-18 8:11 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-17 9:21 Probable Bug (or configuration error) in kmemleak Sankar P
2010-06-17 17:36 ` Luis R. Rodriguez
2010-06-18 8:11 ` Sankar P [this message]
2010-06-18 13:00 ` Catalin Marinas
2010-06-18 13:25 ` Sankar P
2010-06-22 6:54 ` Sankar P
2010-06-22 6:58 ` [PATCH] mm: kmemleak: Change kmemleak default buffer size Sankar P
2010-06-22 8:11 ` Pekka Enberg
2010-06-22 8:46 ` [PATCH] kmemleak: config-options: Default buffer size for kmemleak Sankar P
2010-06-22 11:31 ` Paul Mundt
2010-06-22 12:05 ` Catalin Marinas
2010-06-22 12:14 ` Paul Mundt
2010-06-22 12:21 ` Pekka Enberg
2010-06-22 12:35 ` Catalin Marinas
2010-06-22 12:41 ` Pekka Enberg
2010-06-22 16:55 ` [PATCH] mm: kmemleak: Change kmemleak default buffer size Luis R. Rodriguez
2010-06-24 7:31 ` Sankar P
2010-06-24 18:56 ` Luis R. Rodriguez
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=AANLkTimb7rP0rS0OU8nan5uNEhHx_kEYL99ImZ3c8o0D@mail.gmail.com \
--to=sankar.curiosity@gmail.com \
--cc=Luis.Rodriguez@atheros.com \
--cc=catalin.marinas@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lrodriguez@atheros.com \
--cc=penberg@cs.helsinki.fi \
--cc=rnagarajan@novell.com \
--cc=teheo@novell.com \
/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;
as well as URLs for NNTP newsgroup(s).