Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932965AbWL0QOt (ORCPT ); Wed, 27 Dec 2006 11:14:49 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932987AbWL0QOt (ORCPT ); Wed, 27 Dec 2006 11:14:49 -0500 Received: from nz-out-0506.google.com ([64.233.162.227]:56730 "EHLO nz-out-0506.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932965AbWL0QOs (ORCPT ); Wed, 27 Dec 2006 11:14:48 -0500 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=KHpGL+MVzZN1XmIlORZLkNp0nq0KM1N38b6LDQX3y4w678wyaFof+7xO3wLiUyYYNq7QqnWj1b8QA6MX6mUAhSfQCXk7IXNF2iX3ist51JkiCUScth75pXUPu0j8n0qc6q4AOXCEFGv39QJqcry1W5TIDWflvkBSijK/AtlJaBw= Message-ID: Date: Wed, 27 Dec 2006 16:14:47 +0000 From: "Catalin Marinas" To: "Ingo Molnar" Subject: Re: [PATCH 2.6.20-rc1 00/10] Kernel memory leak detector 0.13 Cc: linux-kernel@vger.kernel.org In-Reply-To: <20061217094143.GA15372@elte.hu> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20061216153346.18200.51408.stgit@localhost.localdomain> <20061216165738.GA5165@elte.hu> <20061217085859.GB2938@elte.hu> <20061217090943.GA9246@elte.hu> <20061217092828.GA14181@elte.hu> <20061217094143.GA15372@elte.hu> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3547 Lines: 82 On 17/12/06, Ingo Molnar wrote: > it would be nice to record 1) the jiffies value at the time of > allocation, 2) the PID and the comm of the task that did the allocation. > The jiffies timestamp would be useful to see the age of the allocation, > and the PID/comm is useful for context. Trying to copy the comm with get_task_comm, I get the lockdep report below, caused by acquiring the task's alloc_lock. Any idea how to go around this? ================================= [ INFO: inconsistent lock state ] 2.6.20-rc2 #211 --------------------------------- inconsistent {hardirq-on-W} -> {in-hardirq-W} usage. swapper/0 [HC1[1]:SC0[0]:HE0:SE1] takes: (init_task.alloc_lock){+-..}, at: [] get_task_comm+0x24/0x40 {hardirq-on-W} state was registered at: [] lock_acquire+0x80/0x94 [] _spin_lock+0x30/0x40 [] copy_process+0x8b8/0x1208 [] do_fork+0xc0/0x1e0 [] kernel_thread+0x70/0x80 [] rest_init+0x1c/0x30 [] start_kernel+0x224/0x27c [<00008078>] 0x8078 irq event stamp: 33758 hardirqs last enabled at (33757): [] default_idle+0x44/0x50 hardirqs last disabled at (33758): [] __irq_svc+0x34/0xc0 softirqs last enabled at (33750): [] __do_softirq+0x10c/0x124 softirqs last disabled at (33745): [] irq_exit+0x58/0x60 other info that might help us debug this: 1 lock held by swapper/0: #0: (&lp->lock){+...}, at: [] smc_interrupt+0x28/0x784 stack backtrace: [] (dump_stack+0x0/0x14) from [] (print_usage_bug+0x11c/0x154) [] (print_usage_bug+0x0/0x154) from [] (mark_lock+0xe0/0x4c8) r8 = 00000001 r7 = C02A4348 r6 = 00000000 r5 = 00000002 r4 = C02A4638 [] (mark_lock+0x0/0x4c8) from [] (__lock_acquire+0x424/0xc40) [] (__lock_acquire+0x0/0xc40) from [] (lock_acquire+0x80/0x94) [] (lock_acquire+0x0/0x94) from [] (_spin_lock+0x30/0x40) [] (_spin_lock+0x0/0x40) from [] (get_task_comm+0x24/0x40) r4 = C02A4348 [] (get_task_comm+0x0/0x40) from [] (memleak_alloc+0x168/0x2b4) r6 = C7596E60 r5 = A0000193 r4 = C7596E64 [] (memleak_alloc+0x0/0x2b4) from [] (kmem_cache_alloc+0x110/0x124) [] (kmem_cache_alloc+0x0/0x124) from [] (__alloc_skb+0x34/0x130) [] (__alloc_skb+0x0/0x130) from [] (smc_interrupt+0x390/0x784) [] (smc_interrupt+0x0/0x784) from [] (handle_IRQ_event+0x2c/0x68) [] (handle_IRQ_event+0x0/0x68) from [] (handle_level_irq+0xe4/0x150) r7 = C02A1128 r6 = C7805C20 r5 = 00000029 r4 = C02A1100 [] (handle_level_irq+0x0/0x150) from [] (asm_do_IRQ+0x70/0x9c) r7 = 00008000 r6 = 00000029 r5 = 00000000 r4 = C029E000 [] (asm_do_IRQ+0x0/0x9c) from [] (__irq_svc+0x34/0xc0) r5 = FF000100 r4 = FFFFFFFF [] (default_idle+0x0/0x50) from [] (cpu_idle+0x30/0x4c) [] (cpu_idle+0x0/0x4c) from [] (rest_init+0x28/0x30) r5 = C02C3D30 r4 = C04DB2A4 [] (rest_init+0x0/0x30) from [] (start_kernel+0x224/0x27c) [] (start_kernel+0x0/0x27c) from [<00008078>] (0x8078) -- Catalin - 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/