Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966194AbXIBLz6 (ORCPT ); Sun, 2 Sep 2007 07:55:58 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S965465AbXIBLzn (ORCPT ); Sun, 2 Sep 2007 07:55:43 -0400 Received: from smtp2.linux-foundation.org ([207.189.120.14]:37036 "EHLO smtp2.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965846AbXIBLzl (ORCPT ); Sun, 2 Sep 2007 07:55:41 -0400 Date: Sun, 2 Sep 2007 04:55:29 -0700 From: Andrew Morton To: Folkert van Heusden Cc: linux-kernel@vger.kernel.org, Jan Kara Subject: Re: [2.6.22] circular lock detected Message-Id: <20070902045529.c66eddc9.akpm@linux-foundation.org> In-Reply-To: <20070824210033.GB13237@vanheusden.com> References: <20070824210033.GB13237@vanheusden.com> X-Mailer: Sylpheed version 2.2.4 (GTK+ 2.8.19; i686-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 9865 Lines: 176 > On Fri, 24 Aug 2007 23:00:33 +0200 Folkert van Heusden wrote: > Hi, > > 2.6.22 kernel with hyperthreading enabled only ext3 filesystems (2). > > [ 346.314640] ======================================================= > [ 346.314758] [ INFO: possible circular locking dependency detected ] > [ 346.314815] 2.6.22 #5 > [ 346.314862] ------------------------------------------------------- > [ 346.314920] tor/2421 is trying to acquire lock: > [ 346.314973] (tty_mutex){--..}, at: [] mutex_lock+0x8/0xa > [ 346.315193] > [ 346.315195] but task is already holding lock: > [ 346.316203] (&s->s_dquot.dqptr_sem){----}, at: [] dquot_alloc_space+0x50/0x189 > [ 346.316457] > [ 346.316458] which lock already depends on the new lock. > [ 346.316461] > [ 346.316585] > [ 346.316586] the existing dependency chain (in reverse order) is: > [ 346.316675] > [ 346.316676] -> #4 (&s->s_dquot.dqptr_sem){----}: > [ 346.316871] [] check_prev_add+0x15b/0x281 > [ 346.317204] [] check_prevs_add+0x8b/0xe8 > [ 346.317535] [] __lock_acquire+0x65d/0xb51 > [ 346.317873] [] lock_acquire+0x62/0x81 > [ 346.318195] [] down_read+0x2b/0x3d > [ 346.318527] [] dquot_alloc_space+0x50/0x189 > [ 346.318854] [] ext3_new_blocks+0x44b/0x5a2 > [ 346.319187] [] ext3_alloc_blocks+0x40/0xdf > [ 346.319513] [] ext3_alloc_branch+0x50/0x21b > [ 346.319850] [] ext3_get_blocks_handle+0x1b8/0x367 > [ 346.320184] [] ext3_getblk+0x97/0x228 > [ 346.320530] [] ext3_bread+0x1a/0x78 > [ 346.320870] [] ext3_mkdir+0xf4/0x270 > [ 346.321188] [] vfs_mkdir+0xb3/0x161 > [ 346.321506] [] sys_mkdirat+0x8c/0xc4 > [ 346.321820] [] sys_mkdir+0x20/0x22 > [ 346.322131] [] syscall_call+0x7/0xb > [ 346.322446] [] 0xffffffff > [ 346.322779] > [ 346.322780] -> #3 (&ei->truncate_mutex){--..}: > [ 346.322965] [] check_prev_add+0x15b/0x281 > [ 346.323278] [] check_prevs_add+0x8b/0xe8 > [ 346.323602] [] __lock_acquire+0x65d/0xb51 > [ 346.323919] [] lock_acquire+0x62/0x81 > [ 346.324234] [] __mutex_lock_slowpath+0x75/0x28c > [ 346.324857] [] mutex_lock+0x8/0xa > [ 346.325177] [] ext3_truncate+0x170/0x468 > [ 346.325501] [] vmtruncate+0xa6/0x116 > [ 346.325828] [] inode_setattr+0x145/0x16c > [ 346.326150] [] ext3_setattr+0x150/0x22f > [ 346.326479] [] notify_change+0x352/0x386 > [ 346.326802] [] do_truncate+0x5c/0x7f > [ 346.327116] [] may_open+0x1ec/0x231 > [ 346.327434] [] open_namei+0xdd/0x5a2 > [ 346.327770] [] do_filp_open+0x2c/0x53 > [ 346.328090] [] do_sys_open+0x52/0xd8 > [ 346.328408] [] sys_open+0x1c/0x1e > [ 346.328727] [] syscall_call+0x7/0xb > [ 346.329042] [] 0xffffffff > [ 346.329368] > [ 346.329370] -> #2 (&inode->i_alloc_sem){--..}: > [ 346.329556] [] check_prev_add+0x15b/0x281 > [ 346.329879] [] check_prevs_add+0x8b/0xe8 > [ 346.330192] [] __lock_acquire+0x65d/0xb51 > [ 346.330508] [] lock_acquire+0x62/0x81 > [ 346.330826] [] down_write+0x2b/0x45 > [ 346.331137] [] notify_change+0x2d9/0x386 > [ 346.331453] [] do_truncate+0x5c/0x7f > [ 346.331769] [] may_open+0x1ec/0x231 > [ 346.332087] [] open_namei+0xdd/0x5a2 > [ 346.332401] [] do_filp_open+0x2c/0x53 > [ 346.332720] [] do_sys_open+0x52/0xd8 > [ 346.333037] [] sys_open+0x1c/0x1e > [ 346.333600] [] syscall_call+0x7/0xb > [ 346.333912] [] 0xffffffff > [ 346.334232] > [ 346.334233] -> #1 (&sysfs_inode_imutex_key){--..}: > [ 346.334422] [] check_prev_add+0x15b/0x281 > [ 346.334734] [] check_prevs_add+0x8b/0xe8 > [ 346.335046] [] __lock_acquire+0x65d/0xb51 > [ 346.335361] [] lock_acquire+0x62/0x81 > [ 346.335685] [] __mutex_lock_slowpath+0x75/0x28c > [ 346.336001] [] mutex_lock+0x8/0xa > [ 346.336313] [] remove_dir+0x2c/0xf1 > [ 346.336629] [] sysfs_remove_subdir+0x8/0xa > [ 346.336941] [] sysfs_remove_group+0x67/0x78 > [ 346.337256] [] dpm_sysfs_remove+0x12/0x16 > [ 346.337574] [] device_pm_remove+0x21/0x62 > [ 346.337888] [] device_del+0x82/0x291 > [ 346.338199] [] device_unregister+0xb/0x15 > [ 346.338516] [] device_destroy+0x8d/0x9a > [ 346.338827] [] vcs_remove_sysfs+0x1c/0x3a > [ 346.339142] [] con_close+0x5e/0x6b > [ 346.339458] [] release_dev+0x4c4/0x6ce > [ 346.339767] [] tty_release+0x12/0x1c > [ 346.340078] [] __fput+0x145/0x16e > [ 346.340392] [] fput+0x19/0x1b > [ 346.340701] [] filp_close+0x3c/0x75 > [ 346.341012] [] sys_close+0x69/0xb4 > [ 346.341325] [] syscall_call+0x7/0xb > [ 346.341892] [] 0xffffffff > [ 346.342213] > [ 346.342214] -> #0 (tty_mutex){--..}: > [ 346.342397] [] check_prev_add+0x34/0x281 > [ 346.342708] [] check_prevs_add+0x8b/0xe8 > [ 346.343017] [] __lock_acquire+0x65d/0xb51 > [ 346.343333] [] lock_acquire+0x62/0x81 > [ 346.343646] [] __mutex_lock_slowpath+0x75/0x28c > [ 346.343956] [] mutex_lock+0x8/0xa > [ 346.344263] [] print_warning+0x8c/0x15d > [ 346.344575] [] dquot_alloc_space+0x184/0x189 > [ 346.344883] [] ext3_new_blocks+0x44b/0x5a2 > [ 346.345193] [] ext3_alloc_blocks+0x40/0xdf > [ 346.345507] [] ext3_alloc_branch+0x50/0x21b > [ 346.345816] [] ext3_get_blocks_handle+0x1b8/0x367 > [ 346.346127] [] ext3_get_block+0x78/0xe3 > [ 346.346441] [] __block_prepare_write+0x168/0x415 > [ 346.346750] [] block_prepare_write+0x28/0x3b > [ 346.347057] [] ext3_prepare_write+0xe3/0x17e > [ 346.347369] [] generic_file_buffered_write+0x1b4/0x614 > [ 346.347689] [] __generic_file_aio_write_nolock+0x23a/0x533 > [ 346.348002] [] generic_file_aio_write+0x58/0xc4 > [ 346.348314] [] ext3_file_write+0x2d/0xba > [ 346.348627] [] do_sync_write+0xc7/0x116 > [ 346.348935] [] vfs_write+0x158/0x15d > [ 346.349246] [] sys_write+0x3d/0x64 > [ 346.349560] [] syscall_call+0x7/0xb > [ 346.349869] [] 0xffffffff > [ 346.350438] > [ 346.350440] other info that might help us debug this: > [ 346.350442] > [ 346.350562] 3 locks held by tor/2421: > [ 346.350604] #0: (&inode->i_mutex){--..}, at: [] mutex_lock+0x8/0xa > [ 346.350827] #1: (&ei->truncate_mutex){--..}, at: [] mutex_lock+0x8/0xa > [ 346.351049] #2: (&s->s_dquot.dqptr_sem){----}, at: [] dquot_alloc_space+0x50/0x189 > [ 346.351274] > [ 346.351276] stack backtrace: > [ 346.351363] [] show_trace_log_lvl+0x1a/0x30 > [ 346.351446] [] show_trace+0x12/0x14 > [ 346.351526] [] dump_stack+0x16/0x18 > [ 346.351605] [] print_circular_bug_tail+0x6f/0x71 > [ 346.351686] [] check_prev_add+0x34/0x281 > [ 346.351764] [] check_prevs_add+0x8b/0xe8 > [ 346.351843] [] __lock_acquire+0x65d/0xb51 > [ 346.351921] [] lock_acquire+0x62/0x81 > [ 346.352002] [] __mutex_lock_slowpath+0x75/0x28c > [ 346.352083] [] mutex_lock+0x8/0xa > [ 346.352160] [] print_warning+0x8c/0x15d > [ 346.352240] [] dquot_alloc_space+0x184/0x189 > [ 346.352323] [] ext3_new_blocks+0x44b/0x5a2 > [ 346.352402] [] ext3_alloc_blocks+0x40/0xdf > [ 346.352479] [] ext3_alloc_branch+0x50/0x21b > [ 346.352558] [] ext3_get_blocks_handle+0x1b8/0x367 > [ 346.352638] [] ext3_get_block+0x78/0xe3 > [ 346.352720] [] __block_prepare_write+0x168/0x415 > [ 346.352801] [] block_prepare_write+0x28/0x3b > [ 346.352881] [] ext3_prepare_write+0xe3/0x17e > [ 346.352961] [] generic_file_buffered_write+0x1b4/0x614 > [ 346.353041] [] __generic_file_aio_write_nolock+0x23a/0x533 > [ 346.353121] [] generic_file_aio_write+0x58/0xc4 > [ 346.353200] [] ext3_file_write+0x2d/0xba > [ 346.353281] [] do_sync_write+0xc7/0x116 > [ 346.353364] [] vfs_write+0x158/0x15d > [ 346.353444] [] sys_write+0x3d/0x64 > [ 346.353524] [] syscall_call+0x7/0xb > [ 346.353603] ======================= > Has been reported before, but I don't recall whether we fixed it. Jan, do you know>? - 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/