Hi, I''ve hit this lockdep warning, 2.6.39rc6. Single btrfs partition, 30GB, filled with 2GB, "compress-force=lzo", warning trigered after normal copy+du. Happened only once. [Might be a false positive.] david [14547.128565] ============================================[14547.132010] [ INFO: possible recursive locking detected ] [14547.132010] 2.6.39-rc6-default+ #4 [14547.132010] --------------------------------------------- [14547.132010] du/22878 is trying to acquire lock: [14547.132010] (&(&eb->lock)->rlock){+.+...}, at: [<ffffffffa0401e8c>] btrfs_try_spin_lock+0x7c/0xa0 [btrfs] [14547.132010] [14547.132010] but task is already holding lock: [14547.132010] (&(&eb->lock)->rlock){+.+...}, at: [<ffffffffa0401e02>] btrfs_clear_lock_blocking+0x22/0x30 [btrfs] [14547.132010] [14547.132010] other info that might help us debug this: [14547.132010] 2 locks held by du/22878: [14547.132010] #0: (&sb->s_type->i_mutex_key#18){+.+.+.}, at: [<ffffffff81175df5>] vfs_readdir+0x75/0xd0 [14547.132010] #1: (&(&eb->lock)->rlock){+.+...}, at: [<ffffffffa0401e02>] btrfs_clear_lock_blocking+0x22/0x30 [btrfs] [14547.132010] [14547.132010] stack backtrace: [14547.132010] Pid: 22878, comm: du Not tainted 2.6.39-rc6-default+ #4 [14547.132010] Call Trace: [14547.132010] [<ffffffff810be08b>] __lock_acquire+0x159b/0x1de0 [14547.132010] [<ffffffff810ac8d8>] ? sched_clock_cpu+0xa8/0x110 [14547.132010] [<ffffffff810ac745>] ? sched_clock_local+0x25/0x90 [14547.132010] [<ffffffff810bef4f>] lock_acquire+0x9f/0x130 [14547.132010] [<ffffffffa0401e8c>] ? btrfs_try_spin_lock+0x7c/0xa0 [btrfs] [14547.132010] [<ffffffff814e1586>] _raw_spin_lock+0x36/0x70 [14547.132010] [<ffffffffa0401e8c>] ? btrfs_try_spin_lock+0x7c/0xa0 [btrfs] [14547.132010] [<ffffffffa0401e02>] ? btrfs_clear_lock_blocking+0x22/0x30 [btrfs] [14547.132010] [<ffffffffa0401e8c>] btrfs_try_spin_lock+0x7c/0xa0 [btrfs] [14547.132010] [<ffffffffa03b312d>] btrfs_search_slot+0x80d/0x880 [btrfs] [14547.132010] [<ffffffffa03d1d8f>] btrfs_real_readdir+0xcf/0x4f0 [btrfs] [14547.132010] [<ffffffff814df901>] ? mutex_lock_killable_nested+0x281/0x3c0 [14547.132010] [<ffffffff81175ad0>] ? sys_ioctl+0x80/0x80 [14547.132010] [<ffffffff81175df5>] ? vfs_readdir+0x75/0xd0 [14547.132010] [<ffffffff810b984d>] ? trace_hardirqs_off+0xd/0x10 [14547.132010] [<ffffffff810ac9af>] ? local_clock+0x6f/0x80 [14547.132010] [<ffffffff81175df5>] ? vfs_readdir+0x75/0xd0 [14547.132010] [<ffffffff81175ad0>] ? sys_ioctl+0x80/0x80 [14547.132010] [<ffffffff81175e28>] vfs_readdir+0xa8/0xd0 [14547.132010] [<ffffffff8116419c>] ? fget+0x8c/0x260 [14547.132010] [<ffffffff81164110>] ? fget_raw+0x250/0x250 [14547.132010] [<ffffffff81176045>] sys_getdents64+0x85/0xf0 [14547.132010] [<ffffffff814ea482>] system_call_fastpath+0x16/0x1b -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
another lockdep warning, very similar to the previous. happened during xfstests/224 d/ [344121.276299] ============================================[344121.284642] [ INFO: possible recursive locking detected ] [344121.286331] 2.6.39-rc7-default+ #22 [344121.286331] --------------------------------------------- [344121.286331] dd/2159 is trying to acquire lock: [344121.286331] (&(&eb->lock)->rlock){+.+...}, at: [<ffffffffa0198b3c>] btrfs_try_spin_lock+0x7c/0xa0 [btrfs] [344121.286331] [344121.286331] but task is already holding lock: [344121.286331] (&(&eb->lock)->rlock){+.+...}, at: [<ffffffffa0198ab2>] btrfs_clear_lock_blocking+0x22/0x30 [btrfs] [344121.340024] [344121.340024] other info that might help us debug this: [344121.340024] 1 lock held by dd/2159: [344121.340024] #0: (&(&eb->lock)->rlock){+.+...}, at: [<ffffffffa0198ab2>] btrfs_clear_lock_blocking+0x22/0x30 [btrfs] [344121.340024] [344121.340024] stack backtrace: [344121.340024] Pid: 2159, comm: dd Tainted: G W 2.6.39-rc7-default+ #22 [344121.340024] Call Trace: [344121.340024] [<ffffffff810d14fb>] __lock_acquire+0x159b/0x1de0 [344121.340024] [<ffffffff810ccc19>] ? trace_hardirqs_off_caller+0x29/0xc0 [344121.340024] [<ffffffff810bfd1f>] ? local_clock+0x6f/0x80 [344121.340024] [<ffffffffa0198a86>] ? btrfs_set_lock_blocking+0x26/0x30 [btrfs] [344121.340024] [<ffffffff810ccc19>] ? trace_hardirqs_off_caller+0x29/0xc0 [344121.340024] [<ffffffff810d23bf>] lock_acquire+0x9f/0x130 [344121.340024] [<ffffffffa0198b3c>] ? btrfs_try_spin_lock+0x7c/0xa0 [btrfs] [344121.340024] [<ffffffff81e8be16>] _raw_spin_lock+0x36/0x70 [344121.340024] [<ffffffffa0198b3c>] ? btrfs_try_spin_lock+0x7c/0xa0 [btrfs] [344121.340024] [<ffffffffa0198ab2>] ? btrfs_clear_lock_blocking+0x22/0x30 [btrfs] [344121.340024] [<ffffffffa0198b3c>] btrfs_try_spin_lock+0x7c/0xa0 [btrfs] [344121.340024] [<ffffffffa0147df3>] btrfs_search_slot+0x3c3/0xaa0 [btrfs] [344121.340024] [<ffffffff810cccbd>] ? trace_hardirqs_off+0xd/0x10 [344121.340024] [<ffffffffa015ae1d>] btrfs_lookup_csum+0x6d/0x170 [btrfs] [344121.340024] [<ffffffffa015b0d3>] __btrfs_lookup_bio_sums+0x1b3/0x380 [btrfs] [344121.340024] [<ffffffff81170cc5>] ? kmem_cache_alloc_trace+0xf5/0x180 [344121.340024] [<ffffffffa015b314>] btrfs_lookup_bio_sums_dio+0x14/0x20 [btrfs] [344121.340024] [<ffffffffa0168e22>] btrfs_submit_direct+0x202/0x640 [btrfs] [344121.340024] [<ffffffff810cccbd>] ? trace_hardirqs_off+0xd/0x10 [344121.340024] [<ffffffff810bfd1f>] ? local_clock+0x6f/0x80 [344121.340024] [<ffffffff811b3ae2>] dio_bio_submit+0x72/0xc0 [344121.340024] [<ffffffff811b498e>] __blockdev_direct_IO+0x84e/0xb30 [344121.340024] [<ffffffffa0167092>] btrfs_direct_IO+0x2e2/0x430 [btrfs] [344121.340024] [<ffffffffa0169c20>] ? btrfs_get_extent+0x9c0/0x9c0 [btrfs] [344121.340024] [<ffffffffa0168c20>] ? uncompress_inline+0x200/0x200 [btrfs] [344121.340024] [<ffffffff810442d5>] ? native_sched_clock+0x15/0x70 [344121.340024] [<ffffffff81134444>] generic_file_aio_read+0x704/0x7a0 [344121.340024] [<ffffffff81e8c3cb>] ? _raw_spin_unlock+0x2b/0x40 [344121.340024] [<ffffffff810442d5>] ? native_sched_clock+0x15/0x70 [344121.340024] [<ffffffff810cccbd>] ? trace_hardirqs_off+0xd/0x10 [344121.340024] [<ffffffff8117b1ba>] do_sync_read+0xda/0x120 [344121.340024] [<ffffffff8117b9ab>] vfs_read+0xcb/0x190 [344121.340024] [<ffffffff8117bac4>] sys_read+0x54/0xa0 [344121.340024] [<ffffffff81e94e42>] system_call_fastpath+0x16/0x1b -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Morten P.D. Stevens
2011-Jul-12 14:14 UTC
Re: Lockdep warning in btrfs_clear_lock_blocking
2011/5/10 David Sterba <dave@jikos.cz>> > Hi, > > I''ve hit this lockdep warning, 2.6.39rc6. Single btrfs partition, 30GB, > filled with 2GB, "compress-force=lzo", warning trigered after normal copy+du. > Happened only once. > > [Might be a false positive.]Hi, I have a similar error with 3.0-rc6. OS: Fedora 15 Kernel: 3.0-0.rc6.git6.1.fc16.x86_64 Jul 12 15:44:13 x86-002 kernel: [ 1294.229850] Jul 12 15:44:13 x86-002 kernel: [ 1294.229852] ============================================Jul 12 15:44:13 x86-002 kernel: [ 1294.230298] [ INFO: possible recursive locking detected ] Jul 12 15:44:13 x86-002 kernel: [ 1294.230443] 3.0-0.rc6.git6.1.fc16.x86_64 #1 Jul 12 15:44:13 x86-002 kernel: [ 1294.230443] --------------------------------------------- Jul 12 15:44:13 x86-002 kernel: [ 1294.230443] mv/1289 is trying to acquire lock: Jul 12 15:44:13 x86-002 kernel: [ 1294.230443] (&(&eb->lock)->rlock){+.+...}, at: [<ffffffffa01b84cc>] btrfs_try_spin_lock+0x27/0x83 [btrfs] Jul 12 15:44:13 x86-002 kernel: [ 1294.230443] Jul 12 15:44:13 x86-002 kernel: [ 1294.230443] but task is already holding lock: Jul 12 15:44:13 x86-002 kernel: [ 1294.230443] (&(&eb->lock)->rlock){+.+...}, at: [<ffffffffa01b849c>] btrfs_clear_lock_blocking+0x1f/0x28 [btrfs] Jul 12 15:44:13 x86-002 kernel: [ 1294.230443] Jul 12 15:44:13 x86-002 kernel: [ 1294.230443] other info that might help us debug this: Jul 12 15:44:13 x86-002 kernel: [ 1294.230443] Possible unsafe locking scenario: Jul 12 15:44:13 x86-002 kernel: [ 1294.230443] Jul 12 15:44:13 x86-002 kernel: [ 1294.230443] CPU0 Jul 12 15:44:13 x86-002 kernel: [ 1294.230443] ---- Jul 12 15:44:13 x86-002 kernel: [ 1294.230443] lock(&(&eb->lock)->rlock); Jul 12 15:44:13 x86-002 kernel: [ 1294.230443] lock(&(&eb->lock)->rlock); Jul 12 15:44:13 x86-002 kernel: [ 1294.230443] Jul 12 15:44:13 x86-002 kernel: [ 1294.230443] *** DEADLOCK *** Jul 12 15:44:13 x86-002 kernel: [ 1294.230443] Jul 12 15:44:13 x86-002 kernel: [ 1294.230443] May be due to missing lock nesting notation Jul 12 15:44:13 x86-002 kernel: [ 1294.230443] Jul 12 15:44:13 x86-002 kernel: [ 1294.230443] 1 lock held by mv/1289: Jul 12 15:44:13 x86-002 kernel: [ 1294.230443] #0: (&(&eb->lock)->rlock){+.+...}, at: [<ffffffffa01b849c>] btrfs_clear_lock_blocking+0x1f/0x28 [btrfs] Jul 12 15:44:13 x86-002 kernel: [ 1294.230443] Jul 12 15:44:13 x86-002 kernel: [ 1294.230443] stack backtrace: Jul 12 15:44:13 x86-002 kernel: [ 1294.230443] Pid: 1289, comm: mv Not tainted 3.0-0.rc6.git6.1.fc16.x86_64 #1 Jul 12 15:44:13 x86-002 kernel: [ 1294.230443] Call Trace: Jul 12 15:44:13 x86-002 kernel: [ 1294.230443] [<ffffffff81088c6d>] __lock_acquire+0x917/0xcf7 Jul 12 15:44:13 x86-002 kernel: [ 1294.230443] [<ffffffff8100e9ad>] ? paravirt_read_tsc+0x9/0xd Jul 12 15:44:13 x86-002 kernel: [ 1294.230443] [<ffffffff8100ee82>] ? sched_clock+0x9/0xd Jul 12 15:44:13 x86-002 kernel: [ 1294.230443] [<ffffffff8107a44d>] ? sched_clock_local+0x12/0x75 Jul 12 15:44:13 x86-002 kernel: [ 1294.230443] [<ffffffffa01b849c>] ? btrfs_clear_lock_blocking+0x1f/0x28 [btrfs] Jul 12 15:44:13 x86-002 kernel: [ 1294.230443] [<ffffffffa01b84cc>] ? btrfs_try_spin_lock+0x27/0x83 [btrfs] Jul 12 15:44:13 x86-002 kernel: [ 1294.230443] [<ffffffff810894da>] lock_acquire+0xbf/0x103 Jul 12 15:44:13 x86-002 kernel: [ 1294.230443] [<ffffffffa01b84cc>] ? btrfs_try_spin_lock+0x27/0x83 [btrfs] Jul 12 15:44:13 x86-002 kernel: [ 1294.230443] [<ffffffff814f61e8>] _raw_spin_lock+0x36/0x6a Jul 12 15:44:13 x86-002 kernel: [ 1294.230443] [<ffffffffa01b84cc>] ? btrfs_try_spin_lock+0x27/0x83 [btrfs] Jul 12 15:44:13 x86-002 kernel: [ 1294.230443] [<ffffffffa01b849c>] ? btrfs_clear_lock_blocking+0x1f/0x28 [btrfs] Jul 12 15:44:13 x86-002 kernel: [ 1294.230443] [<ffffffffa01b84cc>] btrfs_try_spin_lock+0x27/0x83 [btrfs] Jul 12 15:44:13 x86-002 kernel: [ 1294.230443] [<ffffffffa0178d30>] btrfs_search_slot+0x37b/0x499 [btrfs] Jul 12 15:44:13 x86-002 kernel: [ 1294.230443] [<ffffffffa0186a3a>] btrfs_lookup_csum+0x68/0x10a [btrfs] Jul 12 15:44:13 x86-002 kernel: [ 1294.230443] [<ffffffffa0186c59>] __btrfs_lookup_bio_sums+0x17d/0x2e2 [btrfs] Jul 12 15:44:13 x86-002 kernel: [ 1294.230443] [<ffffffffa0186e0e>] btrfs_lookup_bio_sums+0x16/0x18 [btrfs] Jul 12 15:44:13 x86-002 kernel: [ 1294.230443] [<ffffffffa01917b3>] btrfs_submit_bio_hook+0x9b/0x111 [btrfs] Jul 12 15:44:13 x86-002 kernel: [ 1294.230443] [<ffffffffa01a9137>] submit_one_bio+0x92/0xca [btrfs] Jul 12 15:44:13 x86-002 kernel: [ 1294.230443] [<ffffffffa01ac752>] extent_readpages+0xbf/0xd0 [btrfs] Jul 12 15:44:13 x86-002 kernel: [ 1294.230443] [<ffffffffa0192aeb>] ? uncompress_inline+0x11e/0x11e [btrfs] Jul 12 15:44:13 x86-002 kernel: [ 1294.230443] [<ffffffffa019260c>] btrfs_readpages+0x1f/0x21 [btrfs] Jul 12 15:44:13 x86-002 kernel: [ 1294.230443] [<ffffffff810f2ff7>] __do_page_cache_readahead+0x158/0x1de Jul 12 15:44:13 x86-002 kernel: [ 1294.230443] [<ffffffff810f32e6>] ra_submit+0x21/0x25 Jul 12 15:44:13 x86-002 kernel: [ 1294.230443] [<ffffffff810f34d8>] ondemand_readahead+0x1ee/0x1fd Jul 12 15:44:13 x86-002 kernel: [ 1294.230443] [<ffffffff810f35a9>] page_cache_sync_readahead+0x40/0x43 Jul 12 15:44:13 x86-002 kernel: [ 1294.230443] [<ffffffff810eb1e7>] generic_file_aio_read+0x2b9/0x65b Jul 12 15:44:13 x86-002 kernel: [ 1294.230443] [<ffffffff811377ba>] do_sync_read+0xbf/0xff Jul 12 15:44:13 x86-002 kernel: [ 1294.230443] [<ffffffff8120d5c2>] ? security_file_permission+0x2e/0x33 Jul 12 15:44:13 x86-002 kernel: [ 1294.230443] [<ffffffff81137af1>] ? rw_verify_area+0xb6/0xd3 Jul 12 15:44:13 x86-002 kernel: [ 1294.230443] [<ffffffff81137e7e>] vfs_read+0xac/0xf3 Jul 12 15:44:13 x86-002 kernel: [ 1294.230443] [<ffffffff8113928a>] ? fget_light+0x3a/0xa2 Jul 12 15:44:13 x86-002 kernel: [ 1294.230443] [<ffffffff81137f12>] sys_read+0x4d/0x74 Jul 12 15:44:13 x86-002 kernel: [ 1294.230443] [<ffffffff814fd5c2>] system_call_fastpath+0x16/0x1b Jul 12 15:44:37 x86-002 kernel: [ 1319.205483] flush-btrfs-1 used greatest stack depth: 2856 bytes left Best regards, Morten -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html