linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* BUG: MAX_LOCKDEP_CHAIN_HLOCKS too low!
@ 2022-07-26 12:32 Mikhail Gavrilov
  2022-07-26 16:42 ` David Sterba
  0 siblings, 1 reply; 30+ messages in thread
From: Mikhail Gavrilov @ 2022-07-26 12:32 UTC (permalink / raw)
  To: Btrfs BTRFS, Linux List Kernel Mailing

Hi guys.
Always with intensive writing on a btrfs volume, the message "BUG:
MAX_LOCKDEP_CHAIN_HLOCKS too low!" appears in the kernel logs.

[46729.134549] BUG: MAX_LOCKDEP_CHAIN_HLOCKS too low!
[46729.134557] turning off the locking correctness validator.
[46729.134559] Please attach the output of /proc/lock_stat to the bug report
[46729.134561] CPU: 22 PID: 166516 Comm: ThreadPoolForeg Tainted: G
    W    L   --------  ---
5.19.0-0.rc7.20220722git68e77ffbfd06.56.fc37.x86_64 #1
[46729.134566] Hardware name: System manufacturer System Product
Name/ROG STRIX X570-I GAMING, BIOS 4403 04/27/2022
[46729.134569] Call Trace:
[46729.134572]  <TASK>
[46729.134576]  dump_stack_lvl+0x5b/0x77
[46729.134583]  __lock_acquire.cold+0x167/0x29e
[46729.134594]  lock_acquire+0xce/0x2d0
[46729.134599]  ? btrfs_reserve_extent+0xbd/0x250
[46729.134606]  ? btrfs_get_alloc_profile+0x17e/0x240
[46729.134611]  btrfs_get_alloc_profile+0x19c/0x240
[46729.134614]  ? btrfs_reserve_extent+0xbd/0x250
[46729.134618]  btrfs_reserve_extent+0xbd/0x250
[46729.134629]  btrfs_alloc_tree_block+0xa3/0x510
[46729.134635]  ? release_extent_buffer+0xa7/0xe0
[46729.134643]  split_node+0x131/0x3d0
[46729.134652]  btrfs_search_slot+0x2f3/0xc30
[46729.134659]  ? btrfs_insert_inode_ref+0x50/0x3b0
[46729.134664]  btrfs_insert_empty_items+0x31/0x70
[46729.134669]  btrfs_insert_inode_ref+0x99/0x3b0
[46729.134678]  btrfs_rename2+0x317/0x1510
[46729.134690]  ? vfs_rename+0x49d/0xd20
[46729.134693]  ? btrfs_symlink+0x460/0x460
[46729.134696]  vfs_rename+0x49d/0xd20
[46729.134705]  ? do_renameat2+0x4a0/0x510
[46729.134709]  do_renameat2+0x4a0/0x510
[46729.134720]  __x64_sys_rename+0x3f/0x50
[46729.134724]  do_syscall_64+0x5b/0x80
[46729.134729]  ? memcg_slab_free_hook+0x1fd/0x2e0
[46729.134735]  ? do_faccessat+0x111/0x260
[46729.134739]  ? kmem_cache_free+0x379/0x3d0
[46729.134744]  ? lock_is_held_type+0xe8/0x140
[46729.134749]  ? do_syscall_64+0x67/0x80
[46729.134752]  ? lockdep_hardirqs_on+0x7d/0x100
[46729.134757]  ? do_syscall_64+0x67/0x80
[46729.134760]  ? asm_exc_page_fault+0x22/0x30
[46729.134764]  ? lockdep_hardirqs_on+0x7d/0x100
[46729.134768]  entry_SYSCALL_64_after_hwframe+0x63/0xcd
[46729.134773] RIP: 0033:0x7fd2a29b5afb
[46729.134798] Code: e8 7a 27 0a 00 f7 d8 19 c0 5b c3 0f 1f 40 00 b8
ff ff ff ff 5b c3 66 0f 1f 84 00 00 00 00 00 f3 0f 1e fa b8 52 00 00
00 0f 05 <48> 3d 00 f0 ff ff 77 05 c3 0f 1f 40 00 48 8b 15 f1 82 17 00
f7 d8
[46729.134801] RSP: 002b:00007fd25b70a5a8 EFLAGS: 00000282 ORIG_RAX:
0000000000000052
[46729.134805] RAX: ffffffffffffffda RBX: 00007fd25b70a5e0 RCX: 00007fd2a29b5afb
[46729.134808] RDX: 0000000000000000 RSI: 00003ba01ef60820 RDI: 00003ba00e4b2da0
[46729.134810] RBP: 00007fd25b70a660 R08: 0000000000000000 R09: 00007fd25b70a570
[46729.134812] R10: 00007ffd36b1f080 R11: 0000000000000282 R12: 00007fd25b70a5b8
[46729.134815] R13: 00003ba00e4b2da0 R14: 00007fd25b70a6c4 R15: 00003ba01ef60820
[46729.134823]  </TASK>

In this regard, I want to ask, is this really a bug?
The kernel version is 5.19-rc7.

Here's the full kernel log: https://pastebin.com/hYWH7RHu
Here's /proc/lock_stat: https://pastebin.com/ex5w0QW9

-- 
Best Regards,
Mike Gavrilov.

^ permalink raw reply	[flat|nested] 30+ messages in thread
* BUG: MAX_LOCKDEP_CHAIN_HLOCKS too low!
@ 2020-12-09  8:02 Dmitry Vyukov
  0 siblings, 0 replies; 30+ messages in thread
From: Dmitry Vyukov @ 2020-12-09  8:02 UTC (permalink / raw)
  To: syzbot; +Cc: syzkaller-bugs, LKML

This stopped happening a while ago, let's close this to get
notifications about new instances.
One of likely candidates:

#syz fix: net: partially revert dynamic lockdep key changes

^ permalink raw reply	[flat|nested] 30+ messages in thread
* BUG: MAX_LOCKDEP_CHAIN_HLOCKS too low!
@ 2019-03-06 18:04 syzbot
  2019-04-11  1:43 ` syzbot
  2019-04-11 12:14 ` syzbot
  0 siblings, 2 replies; 30+ messages in thread
From: syzbot @ 2019-03-06 18:04 UTC (permalink / raw)
  To: davem, johan.hedberg, linux-bluetooth, linux-kernel, marcel,
	netdev, syzkaller-bugs

Hello,

syzbot found the following crash on:

HEAD commit:    cf08baa29613 Add linux-next specific files for 20190306
git tree:       linux-next
console output: https://syzkaller.appspot.com/x/log.txt?x=15bc76c7200000
kernel config:  https://syzkaller.appspot.com/x/.config?x=c8b6073d992e8217
dashboard link: https://syzkaller.appspot.com/bug?extid=91fd909b6e62ebe06131
compiler:       gcc (GCC) 9.0.0 20181231 (experimental)

Unfortunately, I don't have any reproducer for this crash yet.

IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by: syzbot+91fd909b6e62ebe06131@syzkaller.appspotmail.com

BUG: MAX_LOCKDEP_CHAIN_HLOCKS too low!
turning off the locking correctness validator.
CPU: 0 PID: 11902 Comm: kworker/u5:27 Not tainted 5.0.0-next-20190306 #4
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS  
Google 01/01/2011
Workqueue: hci94 hci_power_on
Call Trace:
  __dump_stack lib/dump_stack.c:77 [inline]
  dump_stack+0x172/0x1f0 lib/dump_stack.c:113
  add_chain_cache kernel/locking/lockdep.c:2582 [inline]
  lookup_chain_cache_add kernel/locking/lockdep.c:2656 [inline]
  validate_chain kernel/locking/lockdep.c:2676 [inline]
  __lock_acquire.cold+0x250/0x50d kernel/locking/lockdep.c:3692
  lock_acquire+0x16f/0x3f0 kernel/locking/lockdep.c:4202
  __flush_work+0x677/0x8a0 kernel/workqueue.c:3034
  flush_work+0x18/0x20 kernel/workqueue.c:3060
  hci_dev_do_open+0xa92/0x1780 net/bluetooth/hci_core.c:1543
  hci_power_on+0x10d/0x580 net/bluetooth/hci_core.c:2173
  process_one_work+0x98e/0x1790 kernel/workqueue.c:2269
  worker_thread+0x98/0xe40 kernel/workqueue.c:2415
  kthread+0x357/0x430 kernel/kthread.c:253
  ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:352


---
This bug is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzkaller@googlegroups.com.

syzbot will keep track of this bug report. See:
https://goo.gl/tpsmEJ#bug-status-tracking for how to communicate with  
syzbot.

^ permalink raw reply	[flat|nested] 30+ messages in thread

end of thread, other threads:[~2023-01-27 15:34 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-26 12:32 BUG: MAX_LOCKDEP_CHAIN_HLOCKS too low! Mikhail Gavrilov
2022-07-26 16:42 ` David Sterba
2022-07-26 19:19   ` Chris Murphy
2022-07-26 19:21     ` Chris Murphy
2022-07-26 20:42       ` David Sterba
2022-08-03 19:28   ` Mikhail Gavrilov
2022-08-03 20:00     ` Chris Murphy
2022-08-04  7:35       ` Mikhail Gavrilov
2022-08-04 11:23         ` Tetsuo Handa
2023-01-24 20:27   ` Mikhail Gavrilov
2023-01-25 17:15     ` David Sterba
2023-01-26  9:47       ` Mikhail Gavrilov
2023-01-26 17:38         ` Boqun Feng
2023-01-26 18:30           ` Waiman Long
2023-01-26 18:59             ` Boqun Feng
2023-01-26 19:07               ` Waiman Long
2023-01-26 22:42           ` Mikhail Gavrilov
2023-01-26 22:51             ` Boqun Feng
2023-01-26 23:49             ` Boqun Feng
2023-01-27  0:20             ` Waiman Long
2023-01-27  3:37               ` Chris Murphy
2023-01-27  4:07                 ` Boqun Feng
2023-01-27  5:35                   ` Mikhail Gavrilov
2023-01-27 14:26                   ` Waiman Long
2023-01-27 15:33                     ` Chris Murphy
  -- strict thread matches above, loose matches on Subject: below --
2020-12-09  8:02 Dmitry Vyukov
2019-03-06 18:04 syzbot
2019-04-11  1:43 ` syzbot
2019-04-11 12:14 ` syzbot
2019-04-11 21:50   ` Benjamin Herrenschmidt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).