From: Trond Myklebust Subject: Re: lock dependency warning Date: Tue, 01 Sep 2009 18:58:47 -0400 Message-ID: <1251845927.8463.30.camel@heimdal.trondhjem.org> References: <20090901221155.GA30521@fieldses.org> Mime-Version: 1.0 Content-Type: text/plain Cc: linux-nfs@vger.kernel.org To: "J. Bruce Fields" Return-path: Received: from mx2.netapp.com ([216.240.18.37]:62501 "EHLO mx2.netapp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755335AbZIAW7s (ORCPT ); Tue, 1 Sep 2009 18:59:48 -0400 In-Reply-To: <20090901221155.GA30521@fieldses.org> Sender: linux-nfs-owner@vger.kernel.org List-ID: On Tue, 2009-09-01 at 18:11 -0400, J. Bruce Fields wrote: > I'm getting this, running connectathon tests on a kernel which includes your > latest nfs-for-2.6.32. Is it new? No, you are by far the first one to report this. It dates back a couple of years at least. The last time it surfaced was here: http://thread.gmane.org/gmane.linux.nfs/27406 Peter Zijlstra has a fix, but it hasn't yet been merged into mainline: http://programming.kicks-ass.net/kernel-patches/mmap-vs-nfs/ Cheers Trond > --b. > > ======================================================= > [ INFO: possible circular locking dependency detected ] > 2.6.31-rc8-00162-gf7fcab6 #321 > ------------------------------------------------------- > bigfile/3763 is trying to acquire lock: > (&sb->s_type->i_mutex_key#11){+.+.+.}, at: [] nfs_revalidate_mapping+0x92/0xd0 > > but task is already holding lock: > (&mm->mmap_sem){++++++}, at: [] sys_mmap2+0x8e/0xc0 > > which lock already depends on the new lock. > > > the existing dependency chain (in reverse order) is: > > -> #1 (&mm->mmap_sem){++++++}: > [] __lock_acquire+0xef6/0x1710 > [] lock_acquire+0xcf/0xf0 > [] might_fault+0x8b/0xb0 > [] copy_to_user+0x37/0x70 > [] filldir64+0xa9/0xf0 > [] nfs_do_filldir+0x1e2/0x5b0 > [] nfs_readdir+0x3ce/0x910 > [] vfs_readdir+0x95/0xb0 > [] sys_getdents64+0x6e/0xc0 > [] syscall_call+0x7/0xb > [] 0xffffffff > > -> #0 (&sb->s_type->i_mutex_key#11){+.+.+.}: > [] __lock_acquire+0x102b/0x1710 > [] lock_acquire+0xcf/0xf0 > [] mutex_lock_nested+0x5d/0x310 > [] nfs_revalidate_mapping+0x92/0xd0 > [] nfs_file_mmap+0x48/0x80 > [] mmap_region+0x2b6/0x430 > [] do_mmap_pgoff+0x24d/0x350 > [] sys_mmap2+0xad/0xc0 > [] syscall_call+0x7/0xb > [] 0xffffffff > > other info that might help us debug this: > > 1 lock held by bigfile/3763: > #0: (&mm->mmap_sem){++++++}, at: [] sys_mmap2+0x8e/0xc0 > > stack backtrace: > Pid: 3763, comm: bigfile Not tainted 2.6.31-rc8-00162-gf7fcab6 #321 > Call Trace: > [] ? printk+0x1d/0x1f > [] print_circular_bug_tail+0xbc/0xc0 > [] __lock_acquire+0x102b/0x1710 > [] ? nfs_revalidate_mapping+0x92/0xd0 > [] lock_acquire+0xcf/0xf0 > [] ? nfs_revalidate_mapping+0x92/0xd0 > [] ? nfs_revalidate_mapping+0x92/0xd0 > [] mutex_lock_nested+0x5d/0x310 > [] ? nfs_revalidate_mapping+0x92/0xd0 > [] ? nfs_have_delegation+0x0/0xc0 > [] nfs_revalidate_mapping+0x92/0xd0 > [] nfs_file_mmap+0x48/0x80 > [] mmap_region+0x2b6/0x430 > [] do_mmap_pgoff+0x24d/0x350 > [] sys_mmap2+0xad/0xc0 > [] syscall_call+0x7/0xb > -- Trond Myklebust Linux NFS client maintainer NetApp Trond.Myklebust@netapp.com www.netapp.com