From: Evgeniy Polyakov Subject: 2.6.23 circular locking during cache drop. Date: Thu, 31 Jan 2008 19:15:08 +0300 Message-ID: <20080131161508.GA21313@2ka.mipt.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii To: linux-fsdevel@vger.kernel.org Return-path: Received: from relay.2ka.mipt.ru ([194.85.82.65]:40822 "EHLO 2ka.mipt.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752790AbYAaQP2 (ORCPT ); Thu, 31 Jan 2008 11:15:28 -0500 Received: from 2ka.mipt.ru (localhost [127.0.0.1]) by 2ka.mipt.ru (8.14.1/8.14.1) with ESMTP id m0VGF8uA026280 for ; Thu, 31 Jan 2008 19:15:08 +0300 Received: (from johnpol@localhost) by 2ka.mipt.ru (8.14.1/8.12.1/Submit) id m0VGF8No026262 for linux-fsdevel@vger.kernel.org; Thu, 31 Jan 2008 19:15:08 +0300 Content-Disposition: inline Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Hi. I managed to get following circular locking bug during fs development. I can not reproduce it and it was caught during another fs development, so that can be related, but as is it looks like a bug. Hope this helps: ======================================================= [ INFO: possible circular locking dependency detected ] 2.6.23-pohmelfs #4 ------------------------------------------------------- bash/4116 is trying to acquire lock: (&journal->j_list_lock){--..}, at: [] journal_try_to_free_buffers+0xd4/0x187 [jbd] but task is already holding lock: (inode_lock){--..}, at: [] drop_pagecache+0x48/0xd8 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (inode_lock){--..}: [] __lock_acquire+0xa66/0xc48 [] lock_acquire+0x7a/0x94 [] _spin_lock+0x38/0x62 [] __mark_inode_dirty+0xce/0x147 [] __set_page_dirty+0xd0/0xdf [] mark_buffer_dirty+0x8b/0x92 [] __journal_temp_unlink_buffer+0x174/0x17b [jbd] [] __journal_unfile_buffer+0xb/0x15 [jbd] [] __journal_refile_buffer+0x6a/0xe3 [jbd] [] journal_commit_transaction+0xf46/0x11eb [jbd] [] kjournald+0xb5/0x1c1 [jbd] [] kthread+0x3b/0x63 [] kernel_thread_helper+0x7/0x10 [] 0xffffffff -> #0 (&journal->j_list_lock){--..}: [] __lock_acquire+0x952/0xc48 [] lock_acquire+0x7a/0x94 [] _spin_lock+0x38/0x62 [] journal_try_to_free_buffers+0xd4/0x187 [jbd] [] ext3_releasepage+0x68/0x74 [ext3] [] try_to_release_page+0x33/0x44 [] __invalidate_mapping_pages+0x74/0xe0 [] drop_pagecache+0x70/0xd8 [] drop_caches_sysctl_handler+0x36/0x4e [] proc_sys_write+0x6b/0x85 [] vfs_write+0x82/0xb8 [] sys_write+0x3d/0x61 [] syscall_call+0x7/0xb [] 0xffffffff other info that might help us debug this: 2 locks held by bash/4116: #0: (&type->s_umount_key#11){----}, at: [] drop_pagecache+0x38/0xd8 #1: (inode_lock){--..}, at: [] drop_pagecache+0x48/0xd8 stack backtrace: [] show_trace_log_lvl+0x1a/0x2f [] show_trace+0x12/0x14 [] dump_stack+0x16/0x18 [] print_circular_bug_tail+0x5f/0x68 [] __lock_acquire+0x952/0xc48 [] lock_acquire+0x7a/0x94 [] _spin_lock+0x38/0x62 [] journal_try_to_free_buffers+0xd4/0x187 [jbd] [] ext3_releasepage+0x68/0x74 [ext3] [] try_to_release_page+0x33/0x44 [] __invalidate_mapping_pages+0x74/0xe0 [] drop_pagecache+0x70/0xd8 [] drop_caches_sysctl_handler+0x36/0x4e [] proc_sys_write+0x6b/0x85 [] vfs_write+0x82/0xb8 [] sys_write+0x3d/0x61 [] syscall_call+0x7/0xb ======================= -- Evgeniy Polyakov