Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1765600AbXJPIz4 (ORCPT ); Tue, 16 Oct 2007 04:55:56 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1757439AbXJPIzs (ORCPT ); Tue, 16 Oct 2007 04:55:48 -0400 Received: from mailhub.sw.ru ([195.214.233.200]:20755 "EHLO relay.sw.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756384AbXJPIzr (ORCPT ); Tue, 16 Oct 2007 04:55:47 -0400 Date: Tue, 16 Oct 2007 12:54:29 +0400 From: Alexey Dobriyan To: linux-kernel@vger.kernel.org Cc: a.p.zijlstra@chello.nl, mingo@elte.hu, akpm@osdl.org Subject: Possible circular locking: ->mmap_sem vs jbd_handle Message-ID: <20071016085429.GA6352@localhost.sw.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.11 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 5086 Lines: 123 Got this during LTP's diotest1. Reproducable. ======================================================= [ INFO: possible circular locking dependency detected ] 2.6.23-65a6ec0d72a07f16719e9b7a96e1c4bae044b591 #2 ------------------------------------------------------- diotest1/13563 is trying to acquire lock: (&mm->mmap_sem){----}, at: [] dio_get_page+0x4b/0x16b but task is already holding lock: (jbd_handle){--..}, at: [] journal_start+0xf3/0x120 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (jbd_handle){--..}: [] __lock_acquire+0x9b0/0xb7b [] journal_start+0xf3/0x120 [] kmem_cache_alloc+0x67/0x9b [] lock_acquire+0x5f/0x77 [] journal_start+0xf3/0x120 [] journal_start+0x116/0x120 [] journal_start+0xf3/0x120 [] ext3_dirty_inode+0x24/0x6d [] kmem_cache_alloc+0x67/0x9b [] __mark_inode_dirty+0x24/0x145 [] current_fs_time+0x13/0x15 [] generic_file_mmap+0x2a/0x3e [] mmap_region+0x200/0x3ee [] do_mmap_pgoff+0x209/0x252 [] sys_mmap2+0x9d/0xb7 [] syscall_call+0x7/0xb [] 0xffffffff -> #0 (&mm->mmap_sem){----}: [] print_circular_bug_entry+0x40/0x46 [] __lock_acquire+0x8a0/0xb7b [] check_noncircular+0x57/0x84 [] check_bytes_and_report+0x26/0xb2 [] debug_check_no_locks_freed+0x134/0x13e [] lock_acquire+0x5f/0x77 [] dio_get_page+0x4b/0x16b [] down_read+0x38/0x49 [] dio_get_page+0x4b/0x16b [] dio_get_page+0x4b/0x16b [] __spin_lock_init+0x29/0x49 [] __blockdev_direct_IO+0x495/0xad4 [] mark_held_locks+0x39/0x53 [] __mutex_unlock_slowpath+0x105/0x127 [] trace_hardirqs_on+0x11a/0x13d [] journal_start+0xf3/0x120 [] journal_start+0x116/0x120 [] ext3_direct_IO+0xfa/0x18a [] ext3_get_block+0x0/0xbe [] generic_file_direct_IO+0xe5/0x116 [] generic_file_direct_write+0x5c/0x138 [] current_fs_time+0x13/0x15 [] __generic_file_aio_write_nolock+0x378/0x4dc [] trace_hardirqs_on+0x11a/0x13d [] generic_file_aio_write+0x45/0xb8 [] generic_file_aio_write+0x5a/0xb8 [] ext3_file_write+0x24/0x8f [] do_sync_write+0xc7/0x10a [] autoremove_wake_function+0x0/0x35 [] up_read+0x14/0x29 [] do_brk+0x1ad/0x259 [] do_sync_write+0x0/0x10a [] vfs_write+0x74/0x95 [] sys_write+0x41/0x67 [] sysenter_past_esp+0x5f/0xa5 [] 0xffffffff other info that might help us debug this: 2 locks held by diotest1/13563: #0: (&type->i_mutex_key#3){--..}, at: [] generic_file_aio_write+0x45/0xb8 #1: (jbd_handle){--..}, at: [] journal_start+0xf3/0x120 stack backtrace: [] print_circular_bug_tail+0x5f/0x67 [] __lock_acquire+0x8a0/0xb7b [] check_noncircular+0x57/0x84 [] check_bytes_and_report+0x26/0xb2 [] debug_check_no_locks_freed+0x134/0x13e [] lock_acquire+0x5f/0x77 [] dio_get_page+0x4b/0x16b [] down_read+0x38/0x49 [] dio_get_page+0x4b/0x16b [] dio_get_page+0x4b/0x16b [] __spin_lock_init+0x29/0x49 [] __blockdev_direct_IO+0x495/0xad4 [] mark_held_locks+0x39/0x53 [] __mutex_unlock_slowpath+0x105/0x127 [] trace_hardirqs_on+0x11a/0x13d [] journal_start+0xf3/0x120 [] journal_start+0x116/0x120 [] ext3_direct_IO+0xfa/0x18a [] ext3_get_block+0x0/0xbe [] generic_file_direct_IO+0xe5/0x116 [] generic_file_direct_write+0x5c/0x138 [] current_fs_time+0x13/0x15 [] __generic_file_aio_write_nolock+0x378/0x4dc [] trace_hardirqs_on+0x11a/0x13d [] generic_file_aio_write+0x45/0xb8 [] generic_file_aio_write+0x5a/0xb8 [] ext3_file_write+0x24/0x8f [] do_sync_write+0xc7/0x10a [] autoremove_wake_function+0x0/0x35 [] up_read+0x14/0x29 [] do_brk+0x1ad/0x259 [] do_sync_write+0x0/0x10a [] vfs_write+0x74/0x95 [] sys_write+0x41/0x67 [] sysenter_past_esp+0x5f/0xa5 ======================= - 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/