From: carlos@fisica.ufpr.br (Carlos Carvalho) Subject: possible deadlock shown by CONFIG_PROVE_LOCKING Date: Thu, 24 Jan 2008 11:33:59 -0200 Message-ID: <18328.37831.359806.359123@fisica.ufpr.br> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: linux-fsdevel@vger.kernel.org Return-path: Received: from fisica.ufpr.br ([200.17.209.129]:49360 "EHLO fisica.ufpr.br" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751542AbYAXNlL (ORCPT ); Thu, 24 Jan 2008 08:41:11 -0500 Sender: linux-fsdevel-owner@vger.kernel.org List-ID: I compiled the kernel with Ingo's CONFIG_PROVE_LOCKING and got the below at boot. Is it a problem? Lock dependency validator: Copyright (c) 2006 Red Hat, Inc., Ingo Molnar ... MAX_LOCKDEP_SUBCLASSES: 8 ... MAX_LOCK_DEPTH: 30 ... MAX_LOCKDEP_KEYS: 2048 ... CLASSHASH_SIZE: 1024 ... MAX_LOCKDEP_ENTRIES: 8192 ... MAX_LOCKDEP_CHAINS: 16384 ... CHAINHASH_SIZE: 8192 memory used by lock dependency info: 1648 kB per task-struct memory footprint: 1680 bytes ------------------------ | Locking API testsuite: ---------------------------------------------------------------------------- [removed] ------------------------------------------------------- Good, all 218 testcases passed! | --------------------------------- Further down md: running: raid1: raid set md3 active with 2 out of 2 mirrors md: ... autorun DONE. Filesystem "md1": Disabling barriers, not supported by the underlying device XFS mounting filesystem md1 Ending clean XFS mount for filesystem: md1 VFS: Mounted root (xfs filesystem). Freeing unused kernel memory: 284k freed Warning: unable to open an initial console. Filesystem "md1": Disabling barriers, not supported by the underlying device ======================================================= [ INFO: possible circular locking dependency detected ] 2.6.22.16 #1 ------------------------------------------------------- mount/1558 is trying to acquire lock: (&(&ip->i_lock)->mr_lock/1){--..}, at: [] xfs_ilock+0x63/0x8d but task is already holding lock: (&(&ip->i_lock)->mr_lock){----}, at: [] xfs_ilock+0x63/0x8d which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&(&ip->i_lock)->mr_lock){----}: [] __lock_acquire+0xa0f/0xb9f [] lock_acquire+0x48/0x63 [] xfs_ilock+0x63/0x8d [] down_write_nested+0x38/0x46 [] xfs_ilock+0x63/0x8d [] xfs_iget_core+0x3ef/0x705 [] xfs_iget+0xa4/0x14e [] xfs_trans_iget+0xb4/0x128 [] xfs_ialloc+0x9b/0x4b7 [] __lock_acquire+0xa32/0xb9f [] xfs_dir_ialloc+0x84/0x2cd [] xfs_ilock+0x63/0x8d [] down_write_nested+0x38/0x46 [] xfs_create+0x331/0x65f [] xfs_dir2_leaf_lookup+0x1d/0x96 [] xfs_vn_mknod+0x12f/0x1f2 [] vfs_create+0x6e/0x9e [] open_namei+0x1f7/0x6a9 [] do_page_fault+0x438/0x78f [] do_filp_open+0x1c/0x3d [] _spin_unlock+0x17/0x20 [] get_unused_fd+0x11c/0x12a [] do_sys_open+0x40/0x7b [] system_call+0x7e/0x83 [] 0xffffffffffffffff -> #0 (&(&ip->i_lock)->mr_lock/1){--..}: [] print_circular_bug_header+0xcc/0xd3 [] __lock_acquire+0x90b/0xb9f [] lock_acquire+0x48/0x63 [] xfs_ilock+0x63/0x8d [] down_write_nested+0x38/0x46 [] xfs_ilock+0x63/0x8d [] xfs_lock_inodes+0x152/0x16d [] xfs_link+0x1d2/0x3f7 [] __lock_acquire+0x9a8/0xb9f [] xfs_vn_link+0x3c/0x91 [] mark_held_locks+0x58/0x72 [] __mutex_lock_slowpath+0x250/0x266 [] trace_hardirqs_on+0x115/0x139 [] __mutex_lock_slowpath+0x25b/0x266 [] vfs_link+0xe8/0x124 [] sys_linkat+0xcd/0x129 [] trace_hardirqs_on_thunk+0x35/0x37 [] trace_hardirqs_on+0x115/0x139 [] trace_hardirqs_on_thunk+0x35/0x37 [] system_call+0x7e/0x83 [] 0xffffffffffffffff other info that might help us debug this: 3 locks held by mount/1558: #0: (&inode->i_mutex/1){--..}, at: [] lookup_create+0x23/0x8 5 #1: (&inode->i_mutex){--..}, at: [] vfs_link+0xd5/0x124 #2: (&(&ip->i_lock)->mr_lock){----}, at: [] xfs_ilock+0x63/0 x8d stack backtrace: Call Trace: [] print_circular_bug_tail+0x69/0x72 [] print_circular_bug_header+0xcc/0xd3 [] __lock_acquire+0x90b/0xb9f [] lock_acquire+0x48/0x63 [] xfs_ilock+0x63/0x8d [] down_write_nested+0x38/0x46 [] xfs_ilock+0x63/0x8d [] xfs_lock_inodes+0x152/0x16d [] xfs_link+0x1d2/0x3f7 [] __lock_acquire+0x9a8/0xb9f [] xfs_vn_link+0x3c/0x91 [] mark_held_locks+0x58/0x72 [] __mutex_lock_slowpath+0x250/0x266 [] trace_hardirqs_on+0x115/0x139 [] __mutex_lock_slowpath+0x25b/0x266 [] vfs_link+0xe8/0x124 [] sys_linkat+0xcd/0x129 [] trace_hardirqs_on_thunk+0x35/0x37 [] trace_hardirqs_on+0x115/0x139 [] trace_hardirqs_on_thunk+0x35/0x37 [] system_call+0x7e/0x83