Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757665Ab0FRILN (ORCPT ); Fri, 18 Jun 2010 04:11:13 -0400 Received: from mail-yx0-f174.google.com ([209.85.213.174]:38588 "EHLO mail-yx0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757266Ab0FRILJ (ORCPT ); Fri, 18 Jun 2010 04:11:09 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=M4WGrXnblCJahb+QRquWsb2tWmH5KGpx67A7J0a5P3UztcyUZAESpuVORB4QqLyIpL Uwjk4048xmvdpfPD7ac30VLs/7sT0Oye6XtKT5w17Bz+YyBWJoFksznFS3St9YCtOBVn wDbRo+zgOPvr6LXdVap0Y5Bzy+HgPDH06+9hs= MIME-Version: 1.0 In-Reply-To: <20100617173604.GB28055@tux> References: <20100617173604.GB28055@tux> Date: Fri, 18 Jun 2010 13:41:07 +0530 Message-ID: Subject: Re: Probable Bug (or configuration error) in kmemleak From: Sankar P To: "Luis R. Rodriguez" Cc: "rnagarajan@novell.com" , "teheo@novell.com" , Catalin Marinas , Pekka Enberg , Luis Rodriguez , "linux-kernel@vger.kernel.org" , "linux-mm@kvack.org" Content-Type: multipart/mixed; boundary=00c09f89935b43669a0489497fed Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 5642 Lines: 116 --00c09f89935b43669a0489497fed Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Thu, Jun 17, 2010 at 11:06 PM, Luis R. Rodriguez 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 =A0with the following config options enabled (on top >> of make defconfig) >> >> CONFIG_DEBUG_KMEMLEAK=3Dy >> CONFIG_DEBUG_KMEMLEAK_EARLY_LOG_SIZE=3D400 >> CONFIG_DEBUG_KMEMLEAK_TEST=3Dy >> >> 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) =3D f7857000 [ 0.511645] kmemleak: vmalloc(64) =3D 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 --=20 Sankar P http://psankar.blogspot.com --00c09f89935b43669a0489497fed Content-Type: application/octet-stream; name=psankar-dmsg Content-Disposition: attachment; filename=psankar-dmsg Content-Transfer-Encoding: base64 X-Attachment-Id: f_gakqo4xs0 WyAgICAwLjAwMDAwMF0gTGludXggdmVyc2lvbiAyLjYuMzIuMTNzbGUta21lbWxlYWsgKGdlZWtv QGJ1aWxkaG9zdCkgKGdjYyB2ZXJzaW9uIDQuMy40IFtnY2MtNF8zLWJyYW5jaCByZXZpc2lvbiAx NTI5NzNdIChTVVNFIExpbnV4KSApICMxIFNNUCBUaHUgSnVuIDE3IDA0OjE3OjAyIElTVCAyMDEw ClsgICAgMC4wMDAwMDBdIGttZW1sZWFrOiBFYXJseSBsb2c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WFrIGVoY2lfaGNkClsgICAgMi4xMTc0MTNdIHVzYiB1c2IzOiBNYW51ZmFjdHVyZXI6IExp bnV4IDIuNi4zMi4xM3NsZS1rbWVtbGVhayB1aGNpX2hjZApbICAgIDIuMTE4MzUzXSB1c2IgdXNi NDogTWFudWZhY3R1cmVyOiBMaW51eCAyLjYuMzIuMTNzbGUta21lbWxlYWsgdWhjaV9oY2QKWyAg ICAyLjExOTIyOV0gdXNiIHVzYjU6IE1hbnVmYWN0dXJlcjogTGludXggMi42LjMyLjEzc2xlLWtt ZW1sZWFrIHVoY2lfaGNkClsgICAgMi4xMjAwOThdIHVzYiB1c2I2OiBNYW51ZmFjdHVyZXI6IExp bnV4IDIuNi4zMi4xM3NsZS1rbWVtbGVhayB1aGNpX2hjZApbICAgIDIuMTIwOTU3XSB1c2IgdXNi NzogTWFudWZhY3R1cmVyOiBMaW51eCAyLjYuMzIuMTNzbGUta21lbWxlYWsgdWhjaV9oY2QKWyAg ICAyLjEyMTgyMV0gdXNiIHVzYjg6IE1hbnVmYWN0dXJlcjogTGludXggMi42LjMyLjEzc2xlLWtt ZW1sZWFrIHVoY2lfaGNkCg== --00c09f89935b43669a0489497fed-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/