From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932559AbWFHHcl (ORCPT ); Thu, 8 Jun 2006 03:32:41 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932557AbWFHHcl (ORCPT ); Thu, 8 Jun 2006 03:32:41 -0400 Received: from ppsw-9.csi.cam.ac.uk ([131.111.8.139]:44470 "EHLO ppsw-9.csi.cam.ac.uk") by vger.kernel.org with ESMTP id S932545AbWFHHck (ORCPT ); Thu, 8 Jun 2006 03:32:40 -0400 X-Cam-SpamDetails: Not scanned X-Cam-AntiVirus: No virus found X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Subject: Re: 2.6.17-rc6-mm1 -- BUG: possible circular locking deadlock detected! From: Anton Altaparmakov To: Miles Lane Cc: LKML , Andrew Morton In-Reply-To: References: Content-Type: text/plain Organization: Computing Service, University of Cambridge, UK Date: Thu, 08 Jun 2006 08:32:33 +0100 Message-Id: <1149751953.10056.10.camel@imp.csi.cam.ac.uk> Mime-Version: 1.0 X-Mailer: Evolution 2.4.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Hi, Thanks for the report. On Wed, 2006-06-07 at 21:27 -0700, Miles Lane wrote: > ===================================================== > [ BUG: possible circular locking deadlock detected! ] > ----------------------------------------------------- > mount/1219 is trying to acquire lock: > (&ni->mrec_lock){--..}, at: [] mutex_lock+0x21/0x24 > > but task is already holding lock: > (&rl->lock){----}, at: [] ntfs_map_runlist+0x2a/0xb5 [ntfs] > > which lock already depends on the new lock, > which could lead to circular deadlocks! That's rubbish. The lock analyser is not intelligent enough for ntfs... )-: FWIW it appears to be picking up that locks depend on each other even when they relate to different inodes which means that they do not depend on each other. It perhaps is getting confused by the special case for the table of inodes ($MFT) which has the lock dependency reverse to all other inodes but it is special because it can never take the lock recursively (and hence deadlock) because we always keep the whole runlist for $MFT in memory and should a bug or memory corruption cause this not to be the case then ntfs will detect this and go BUG() so it still will not deadlock... The people responsible for the lock analyser will need to fix this in their code or by adding some magic to ntfs to make the errors go away... Best regards, Anton > the existing dependency chain (in reverse order) is: > > -> #1 (&rl->lock){----}: > [] lock_acquire+0x58/0x74 > [] ntfs_readpage+0x362/0x8fd [ntfs] > [] read_cache_page+0x8c/0x137 > [] map_mft_record+0xd7/0x1d2 [ntfs] > [] ntfs_read_locked_inode+0x74/0xea9 [ntfs] > [] ntfs_read_inode_mount+0x625/0x846 [ntfs] > [] ntfs_fill_super+0x8ca/0xd14 [ntfs] > [] get_sb_bdev+0xed/0x14e > [] ntfs_get_sb+0x10/0x12 [ntfs] > [] vfs_kern_mount+0x76/0x143 > [] do_kern_mount+0x29/0x3d > [] do_mount+0x78a/0x7e4 > [] sys_mount+0x5f/0x91 > [] sysenter_past_esp+0x56/0x8d > > -> #0 (&ni->mrec_lock){--..}: > [] lock_acquire+0x58/0x74 > [] __mutex_lock_slowpath+0xa7/0x21d > [] mutex_lock+0x21/0x24 > [] map_mft_record+0x19/0x1d2 [ntfs] > [] ntfs_map_runlist_nolock+0x48/0x437 [ntfs] > [] ntfs_map_runlist+0x87/0xb5 [ntfs] > [] ntfs_readpage+0x482/0x8fd [ntfs] > [] read_cache_page+0x8c/0x137 > [] load_system_files+0x155/0x7c7 [ntfs] > [] ntfs_fill_super+0x979/0xd14 [ntfs] > [] get_sb_bdev+0xed/0x14e > [] ntfs_get_sb+0x10/0x12 [ntfs] > [] vfs_kern_mount+0x76/0x143 > [] do_kern_mount+0x29/0x3d > [] do_mount+0x78a/0x7e4 > [] sys_mount+0x5f/0x91 > [] sysenter_past_esp+0x56/0x8d > > other info that might help us debug this: > > 2 locks held by mount/1219: > #0: (&s->s_umount#18){--..}, at: [] sget+0x223/0x3a1 > #1: (&rl->lock){----}, at: [] ntfs_map_runlist+0x2a/0xb5 [ntfs] > > stack backtrace: > [] show_trace_log_lvl+0x54/0xfd > [] show_trace+0xd/0x10 > [] dump_stack+0x17/0x1c > [] print_circular_bug_tail+0x59/0x64 > [] __lock_acquire+0x7c2/0x97a > [] lock_acquire+0x58/0x74 > [] __mutex_lock_slowpath+0xa7/0x21d > [] mutex_lock+0x21/0x24 > [] map_mft_record+0x19/0x1d2 [ntfs] > [] ntfs_map_runlist_nolock+0x48/0x437 [ntfs] > [] ntfs_map_runlist+0x87/0xb5 [ntfs] > [] ntfs_readpage+0x482/0x8fd [ntfs] > [] read_cache_page+0x8c/0x137 > [] load_system_files+0x155/0x7c7 [ntfs] > [] ntfs_fill_super+0x979/0xd14 [ntfs] > [] get_sb_bdev+0xed/0x14e > [] ntfs_get_sb+0x10/0x12 [ntfs] > [] vfs_kern_mount+0x76/0x143 > [] do_kern_mount+0x29/0x3d > [] do_mount+0x78a/0x7e4 > [] sys_mount+0x5f/0x91 > [] sysenter_past_esp+0x56/0x8d > NTFS volume version 3.1. -- Anton Altaparmakov (replace at with @) Unix Support, Computing Service, University of Cambridge, CB2 3QH, UK Linux NTFS maintainer / IRC: #ntfs on irc.freenode.net WWW: http://linux-ntfs.sf.net/ & http://www-stu.christs.cam.ac.uk/~aia21/