Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1763366AbXJMXUW (ORCPT ); Sat, 13 Oct 2007 19:20:22 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754412AbXJMXUI (ORCPT ); Sat, 13 Oct 2007 19:20:08 -0400 Received: from pentafluge.infradead.org ([213.146.154.40]:36546 "EHLO pentafluge.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754264AbXJMXUH (ORCPT ); Sat, 13 Oct 2007 19:20:07 -0400 Subject: Re: [2.6.23.1] possible circular locking dependency detected From: Peter Zijlstra To: Folkert van Heusden Cc: linux-kernel@vger.kernel.org, Andrew Morton In-Reply-To: <20071013223614.GF25076@vanheusden.com> References: <20071013223614.GF25076@vanheusden.com> Content-Type: text/plain Date: Sun, 14 Oct 2007 01:19:56 +0200 Message-Id: <1192317596.5625.12.camel@lappy> Mime-Version: 1.0 X-Mailer: Evolution 2.12.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 9014 Lines: 161 On Sun, 2007-10-14 at 00:36 +0200, Folkert van Heusden wrote: > I've got a deja-vu feeling for this one but in any case: > > > [ 7393.894980] ======================================================= > [ 7393.895081] [ INFO: possible circular locking dependency detected ] > [ 7393.895130] 2.6.23.1 #2 > [ 7393.895175] ------------------------------------------------------- > [ 7393.895225] moo/28246 is trying to acquire lock: > [ 7393.895275] (tty_mutex){--..}, at: [] mutex_lock+0x8/0xa > [ 7393.895486] > [ 7393.895487] but task is already holding lock: > [ 7393.895578] (&s->s_dquot.dqptr_sem){----}, at: [] dquot_alloc_space+0x50/0x189 > [ 7393.895784] > [ 7393.895785] which lock already depends on the new lock. > [ 7393.895788] > [ 7393.895915] > [ 7393.895916] the existing dependency chain (in reverse order) is: > [ 7393.896003] > [ 7393.896005] -> #3 (&s->s_dquot.dqptr_sem){----}: > [ 7393.896209] [] check_prev_add+0xc4/0x1fb > [ 7393.896555] [] check_prevs_add+0x8b/0xe8 > [ 7393.896890] [] validate_chain+0x22b/0x354 > [ 7393.897223] [] __lock_acquire+0x1a0/0x74a > [ 7393.897553] [] lock_acquire+0x6b/0x8a > [ 7393.897882] [] down_read+0x2b/0x3d > [ 7393.898205] [] dquot_alloc_space+0x50/0x189 > [ 7393.898537] [] ext3_new_blocks+0x44b/0x5a2 > [ 7393.898868] [] ext3_alloc_blocks+0x40/0xdf > [ 7393.899194] [] ext3_alloc_branch+0x50/0x21b > [ 7393.899527] [] ext3_get_blocks_handle+0x1b8/0x367 > [ 7393.899858] [] ext3_getblk+0x97/0x228 > [ 7393.900186] [] ext3_bread+0x1a/0x78 > [ 7393.900514] [] ext3_mkdir+0xf2/0x270 > [ 7393.900851] [] vfs_mkdir+0xb3/0x161 > [ 7393.901174] [] sys_mkdirat+0x8c/0xc4 > [ 7393.901512] [] sys_mkdir+0x20/0x22 > [ 7393.901841] [] syscall_call+0x7/0xb > [ 7393.902169] [] 0xffffffff > [ 7393.902511] > [ 7393.902512] -> #2 (&ei->truncate_mutex){--..}: > [ 7393.902706] [] check_prev_add+0xc4/0x1fb > [ 7393.903033] [] check_prevs_add+0x8b/0xe8 > [ 7393.903364] [] validate_chain+0x22b/0x354 > [ 7393.903700] [] __lock_acquire+0x1a0/0x74a > [ 7393.904353] [] lock_acquire+0x6b/0x8a > [ 7393.904682] [] __mutex_lock_slowpath+0x75/0x299 > [ 7393.905015] [] mutex_lock+0x8/0xa > [ 7393.905339] [] ext3_get_blocks_handle+0xd9/0x367 > [ 7393.905675] [] ext3_get_block+0x78/0xe3 > [ 7393.906009] [] __block_prepare_write+0x168/0x415 > [ 7393.906339] [] block_prepare_write+0x28/0x3b > [ 7393.906673] [] ext3_prepare_write+0xe3/0x17e > [ 7393.907002] [] generic_file_buffered_write+0x1cb/0x62b > [ 7393.907333] [] __generic_file_aio_write_nolock+0x23a/0x53d > [ 7393.907667] [] generic_file_aio_write+0x58/0xc4 > [ 7393.907998] [] ext3_file_write+0x2d/0xba > [ 7393.908324] [] do_sync_write+0xc7/0x116 > [ 7393.908655] [] vfs_write+0x158/0x15d > [ 7393.908981] [] sys_write+0x3d/0x64 > [ 7393.909310] [] syscall_call+0x7/0xb > [ 7393.909635] [] 0xffffffff > [ 7393.909974] > [ 7393.909976] -> #1 (&inode->i_mutex){--..}: > [ 7393.910163] [] check_prev_add+0xc4/0x1fb > [ 7393.910496] [] check_prevs_add+0x8b/0xe8 > [ 7393.910823] [] validate_chain+0x22b/0x354 > [ 7393.911152] [] __lock_acquire+0x1a0/0x74a > [ 7393.911478] [] lock_acquire+0x6b/0x8a > [ 7393.911807] [] __mutex_lock_slowpath+0x75/0x299 > [ 7393.912137] [] mutex_lock+0x8/0xa > [ 7393.912465] [] get_node+0x21/0x4d > [ 7393.912788] [] devpts_get_tty+0xb/0x3b > [ 7393.913398] [] init_dev+0x22b/0x58b > [ 7393.913718] [] ptmx_open+0x90/0x1c9 > [ 7393.913992] [] chrdev_open+0xaf/0x171 > [ 7393.914001] [] __dentry_open+0x152/0x1d3 > [ 7393.914008] [] nameidata_to_filp+0x28/0x3f > [ 7393.914018] [] do_filp_open+0x46/0x53 > [ 7393.914024] [] do_sys_open+0x54/0xda > [ 7393.914031] [] sys_open+0x1c/0x1e > [ 7393.914038] [] syscall_call+0x7/0xb > [ 7393.914046] [] 0xffffffff > [ 7393.914069] > [ 7393.914070] -> #0 (tty_mutex){--..}: > [ 7393.914074] [] check_prev_add+0x34/0x1fb > [ 7393.914084] [] check_prevs_add+0x8b/0xe8 > [ 7393.914092] [] validate_chain+0x22b/0x354 > [ 7393.914103] [] __lock_acquire+0x1a0/0x74a > [ 7393.914111] [] lock_acquire+0x6b/0x8a > [ 7393.914117] [] __mutex_lock_slowpath+0x75/0x299 > [ 7393.914126] [] mutex_lock+0x8/0xa > [ 7393.914134] [] print_warning+0x8c/0x15d > [ 7393.914143] [] dquot_alloc_space+0x184/0x189 > [ 7393.914154] [] ext3_new_blocks+0x44b/0x5a2 > [ 7393.914162] [] ext3_alloc_blocks+0x40/0xdf > [ 7393.914170] [] ext3_alloc_branch+0x50/0x21b > [ 7393.914177] [] ext3_get_blocks_handle+0x1b8/0x367 > [ 7393.914185] [] ext3_get_block+0x78/0xe3 > [ 7393.914195] [] __block_prepare_write+0x168/0x415 > [ 7393.914203] [] block_prepare_write+0x28/0x3b > [ 7393.914211] [] ext3_prepare_write+0xe3/0x17e > [ 7393.914218] [] generic_file_buffered_write+0x1cb/0x62b > [ 7393.914226] [] __generic_file_aio_write_nolock+0x23a/0x53d > [ 7393.914238] [] generic_file_aio_write+0x58/0xc4 > [ 7393.914245] [] ext3_file_write+0x2d/0xba > [ 7393.914252] [] do_sync_write+0xc7/0x116 > [ 7393.914260] [] vfs_write+0x158/0x15d > [ 7393.914266] [] sys_write+0x3d/0x64 > [ 7393.914274] [] syscall_call+0x7/0xb > [ 7393.914280] [] 0xffffffff > [ 7393.914290] > [ 7393.914291] other info that might help us debug this: > [ 7393.914293] > [ 7393.914295] 3 locks held by moo/28246: > [ 7393.914298] #0: (&inode->i_mutex){--..}, at: [] mutex_lock+0x8/0xa > [ 7393.914305] #1: (&ei->truncate_mutex){--..}, at: [] mutex_lock+0x8/0xa > [ 7393.914315] #2: (&s->s_dquot.dqptr_sem){----}, at: [] dquot_alloc_space+0x50/0x189 > [ 7393.914322] > [ 7393.914323] stack backtrace: > [ 7393.914325] [] show_trace_log_lvl+0x1a/0x30 > [ 7393.914330] [] show_trace+0x12/0x14 > [ 7393.914334] [] dump_stack+0x16/0x18 > [ 7393.914339] [] print_circular_bug_tail+0x6f/0x71 > [ 7393.914344] [] check_prev_add+0x34/0x1fb > [ 7393.914348] [] check_prevs_add+0x8b/0xe8 > [ 7393.914354] [] validate_chain+0x22b/0x354 > [ 7393.914362] [] __lock_acquire+0x1a0/0x74a > [ 7393.914365] [] lock_acquire+0x6b/0x8a > [ 7393.914369] [] __mutex_lock_slowpath+0x75/0x299 > [ 7393.914373] [] mutex_lock+0x8/0xa > [ 7393.914377] [] print_warning+0x8c/0x15d > [ 7393.914383] [] dquot_alloc_space+0x184/0x189 > [ 7393.914387] [] ext3_new_blocks+0x44b/0x5a2 > [ 7393.914391] [] ext3_alloc_blocks+0x40/0xdf > [ 7393.914397] [] ext3_alloc_branch+0x50/0x21b > [ 7393.914403] [] ext3_get_blocks_handle+0x1b8/0x367 > [ 7393.914407] [] ext3_get_block+0x78/0xe3 > [ 7393.914411] [] __block_prepare_write+0x168/0x415 > [ 7393.914415] [] block_prepare_write+0x28/0x3b > [ 7393.914420] [] ext3_prepare_write+0xe3/0x17e > [ 7393.914425] [] generic_file_buffered_write+0x1cb/0x62b > [ 7393.914429] [] __generic_file_aio_write_nolock+0x23a/0x53d > [ 7393.914433] [] generic_file_aio_write+0x58/0xc4 > [ 7393.914440] [] ext3_file_write+0x2d/0xba > [ 7393.914445] [] do_sync_write+0xc7/0x116 > [ 7393.914448] [] vfs_write+0x158/0x15d > [ 7393.914452] [] sys_write+0x3d/0x64 > [ 7393.914455] [] syscall_call+0x7/0xb > [ 7393.914460] ======================= > I seems that patch hasn't made it into .23... I'll stick it in the lockdep tree aimed at .24. - 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/