koverstreet / bcachefs

Other
686 stars 71 forks source link

lockdep issue when mounting #719

Closed g2p closed 2 months ago

g2p commented 2 months ago

Not sure if this is really a problem, but since I have it here is the report:

juil. 25 12:45:40 moulinex kernel: bcachefs (9986b9d8-9f64-43c3-9a1d-cd397dcf3643): starting version 1.9: disk_accounting_v2 opts=compression=lz4,background_compression=zstd,foreground_target=ssd,background_target=hdd,promote_target=ssd,gc_reserve_percent=5,verbose
juil. 25 12:45:40 moulinex kernel: bcachefs (9986b9d8-9f64-43c3-9a1d-cd397dcf3643): recovering from clean shutdown, journal seq 49258200
juil. 25 12:45:41 moulinex kernel: bcachefs (9986b9d8-9f64-43c3-9a1d-cd397dcf3643): accounting_read... done
juil. 25 12:45:42 moulinex kernel: bcachefs (9986b9d8-9f64-43c3-9a1d-cd397dcf3643): alloc_read... done
juil. 25 12:45:42 moulinex kernel: bcachefs (9986b9d8-9f64-43c3-9a1d-cd397dcf3643): stripes_read... done
juil. 25 12:45:42 moulinex kernel: bcachefs (9986b9d8-9f64-43c3-9a1d-cd397dcf3643): snapshots_read... done
juil. 25 12:45:43 moulinex kernel: bcachefs (9986b9d8-9f64-43c3-9a1d-cd397dcf3643): journal_replay... done
juil. 25 12:45:43 moulinex kernel: bcachefs (9986b9d8-9f64-43c3-9a1d-cd397dcf3643): resume_logged_ops... done
juil. 25 12:45:43 moulinex kernel: bcachefs (9986b9d8-9f64-43c3-9a1d-cd397dcf3643): going read-write
juil. 25 12:45:43 moulinex kernel: bcachefs (9986b9d8-9f64-43c3-9a1d-cd397dcf3643): done starting filesystem
juil. 25 12:45:43 moulinex kernel:
juil. 25 12:45:43 moulinex kernel: =================================
juil. 25 12:45:43 moulinex kernel: WARNING: bad contention detected!
juil. 25 12:45:43 moulinex kernel: 6.10.1-g2p #35 Tainted: G            E
juil. 25 12:45:43 moulinex kernel: ---------------------------------
juil. 25 12:45:43 moulinex kernel: kworker/u52:0/145 is trying to contend lock (&b->lock) at:
juil. 25 12:45:43 moulinex kernel: six_lock_ip_waiter (fs/bcachefs/six.c:558) 
juil. 25 12:45:43 moulinex kernel: but there are no locks held!
juil. 25 12:45:43 moulinex kernel:
other info that might help us debug this:
juil. 25 12:45:43 moulinex kernel: 4 locks held by kworker/u52:0/145:
juil. 25 12:45:43 moulinex kernel: #0: ffff91b949ab4558 ((wq_completion)bcachefs){+.+.}-{0:0}, at: process_one_work (kernel/workqueue.c:3223 (discriminator 1)) 
juil. 25 12:45:43 moulinex kernel: #1: ffffa6b3405c7e40 ((work_completion)(&wp->index_update_work)){+.+.}-{0:0}, at: process_one_work (kernel/workqueue.c:3224 (discriminator 1)) 
juil. 25 12:45:43 moulinex kernel: #2: ffff91b9678043e0 (&c->btree_trans_barrier){.+.+}-{0:0}, at: __bch2_trans_get (./include/linux/srcu.h:116 (discriminator 1) ./include/linux/srcu.h:215 (discriminator 1) fs/bcachefs/btree_iter.c:3196 (discriminator 1)) 
juil. 25 12:45:43 moulinex kernel: #3: ffff91b977060128 (bcachefs_btree){+.+.}-{0:0}, at: bch2_trans_begin (fs/bcachefs/btree_locking.h:194 (discriminator 1) fs/bcachefs/btree_locking.h:191 (discriminator 1) fs/bcachefs/btree_iter.c:3093 (discriminator 1)) 
juil. 25 12:45:43 moulinex kernel:
stack backtrace:
juil. 25 12:45:43 moulinex kernel: CPU: 1 PID: 145 Comm: kworker/u52:0 Kdump: loaded Tainted: G            E      6.10.1-g2p #35
juil. 25 12:45:43 moulinex kernel: Hardware name: To Be Filled By O.E.M. X570 Phantom Gaming 4/X570 Phantom Gaming 4, BIOS P5.61 02/22/2024
juil. 25 12:45:43 moulinex kernel: Workqueue: bcachefs bch2_write_point_do_index_updates
juil. 25 12:45:43 moulinex kernel: Call Trace:
juil. 25 12:45:43 moulinex kernel:  <TASK>
juil. 25 12:45:43 moulinex kernel: dump_stack_lvl (lib/dump_stack.c:117) 
juil. 25 12:45:43 moulinex kernel: dump_stack (lib/dump_stack.c:124) 
juil. 25 12:45:43 moulinex kernel: print_lock_contention_bug (kernel/locking/lockdep.c:5921) 
juil. 25 12:45:43 moulinex kernel: ? btree_key_cache_fill (fs/bcachefs/btree_locking.h:224 fs/bcachefs/btree_locking.h:243 fs/bcachefs/btree_key_cache.c:278 fs/bcachefs/btree_key_cache.c:363 fs/bcachefs/btree_key_cache.c:452) 
juil. 25 12:45:43 moulinex kernel: lock_acquired (kernel/locking/lockdep.c:5985 kernel/locking/lockdep.c:6042) 
juil. 25 12:45:43 moulinex kernel: ? btree_key_cache_fill (fs/bcachefs/btree_locking.h:224 fs/bcachefs/btree_locking.h:243 fs/bcachefs/btree_key_cache.c:278 fs/bcachefs/btree_key_cache.c:363 fs/bcachefs/btree_key_cache.c:452) 
juil. 25 12:45:43 moulinex kernel: six_lock_ip_waiter (fs/bcachefs/six.c:558) 
juil. 25 12:45:43 moulinex kernel: ? bch2_check_for_deadlock (fs/bcachefs/btree_locking.c:398) 
juil. 25 12:45:43 moulinex kernel: btree_key_cache_fill (fs/bcachefs/btree_locking.h:227 fs/bcachefs/btree_locking.h:243 fs/bcachefs/btree_key_cache.c:278 fs/bcachefs/btree_key_cache.c:363 fs/bcachefs/btree_key_cache.c:452) 
juil. 25 12:45:43 moulinex kernel: ? srso_return_thunk (arch/x86/lib/retpoline.S:224) 
juil. 25 12:45:43 moulinex kernel: ? sched_clock_noinstr (arch/x86/kernel/tsc.c:267) 
juil. 25 12:45:43 moulinex kernel: bch2_btree_path_traverse_cached (fs/bcachefs/btree_key_cache.c:509) 
juil. 25 12:45:43 moulinex kernel: ? bch2_btree_path_traverse_cached (fs/bcachefs/six.h:207 (discriminator 1) fs/bcachefs/btree_locking.h:288 (discriminator 1) fs/bcachefs/btree_key_cache.c:475 (discriminator 1) fs/bcachefs/btree_key_cache.c:507 (discriminator 1)) 
juil. 25 12:45:43 moulinex kernel: bch2_btree_path_traverse_one (fs/bcachefs/btree_iter.c:1146) 
juil. 25 12:45:43 moulinex kernel: ? bch2_trans_start_alloc_update (./include/linux/err.h:107 (discriminator 1) fs/bcachefs/btree_iter.h:17 (discriminator 1) fs/bcachefs/btree_iter.h:573 (discriminator 1) fs/bcachefs/btree_iter.h:583 (discriminator 1) fs/bcachefs/alloc_background.c:461 (discriminator 1) fs/bcachefs/alloc_background.c:484 (discriminator 1)) 
juil. 25 12:45:43 moulinex kernel: ? srso_return_thunk (arch/x86/lib/retpoline.S:224) 
juil. 25 12:45:43 moulinex kernel: ? srso_return_thunk (arch/x86/lib/retpoline.S:224) 
juil. 25 12:45:43 moulinex kernel: ? mempool_free_slab (mm/mempool.c:567) 
juil. 25 12:45:43 moulinex kernel: ? srso_return_thunk (arch/x86/lib/retpoline.S:224) 
juil. 25 12:45:43 moulinex kernel: ? bch2_btree_node_upgrade (fs/bcachefs/btree_locking.c:515) 
juil. 25 12:45:43 moulinex kernel: bch2_btree_iter_peek_slot (fs/bcachefs/btree_iter.c:2611 (discriminator 1)) 
juil. 25 12:45:43 moulinex kernel: ? srso_return_thunk (arch/x86/lib/retpoline.S:224) 
juil. 25 12:45:43 moulinex kernel: ? btree_path_get_locks (fs/bcachefs/btree_locking.c:450 (discriminator 4)) 
juil. 25 12:45:43 moulinex kernel: ? srso_return_thunk (arch/x86/lib/retpoline.S:224) 
juil. 25 12:45:43 moulinex kernel: ? bch2_btree_path_upgrade_noupgrade_sibs (fs/bcachefs/btree_locking.c:627) 
juil. 25 12:45:43 moulinex kernel: ? srso_return_thunk (arch/x86/lib/retpoline.S:224) 
juil. 25 12:45:43 moulinex kernel: ? bch2_path_get (fs/bcachefs/btree_iter.c:1774) 
juil. 25 12:45:43 moulinex kernel: ? bch2_trans_start_alloc_update (fs/bcachefs/alloc_background.c:482) 
juil. 25 12:45:43 moulinex kernel: bch2_trans_start_alloc_update (./include/linux/err.h:107 (discriminator 1) fs/bcachefs/btree_iter.h:17 (discriminator 1) fs/bcachefs/btree_iter.h:573 (discriminator 1) fs/bcachefs/btree_iter.h:583 (discriminator 1) fs/bcachefs/alloc_background.c:461 (discriminator 1) fs/bcachefs/alloc_background.c:484 (discriminator 1)) 
juil. 25 12:45:43 moulinex kernel: bch2_trigger_pointer.constprop.0 (./include/linux/err.h:107 (discriminator 1) fs/bcachefs/buckets.c:573 (discriminator 1)) 
juil. 25 12:45:43 moulinex kernel: ? srso_return_thunk (arch/x86/lib/retpoline.S:224) 
juil. 25 12:45:43 moulinex kernel: ? local_clock_noinstr (kernel/sched/clock.c:301 (discriminator 1)) 
juil. 25 12:45:43 moulinex kernel: __trigger_extent (fs/bcachefs/buckets.c:725) 
juil. 25 12:45:43 moulinex kernel: bch2_trigger_extent (fs/bcachefs/buckets.c:857 (discriminator 6)) 
juil. 25 12:45:43 moulinex kernel: run_btree_triggers (fs/bcachefs/btree_trans_commit.c:515 (discriminator 2) fs/bcachefs/btree_trans_commit.c:540 (discriminator 2)) 
juil. 25 12:45:43 moulinex kernel: ? srso_return_thunk (arch/x86/lib/retpoline.S:224) 
juil. 25 12:45:43 moulinex kernel: ? bch2_trans_update_extent.isra.0 (fs/bcachefs/btree_update.c:345) 
juil. 25 12:45:43 moulinex kernel: ? srso_return_thunk (arch/x86/lib/retpoline.S:224) 
juil. 25 12:45:43 moulinex kernel: __bch2_trans_commit (fs/bcachefs/btree_trans_commit.c:573 fs/bcachefs/btree_trans_commit.c:1058) 
juil. 25 12:45:43 moulinex kernel: ? __bch2_trans_commit (fs/bcachefs/btree_trans_commit.c:573 fs/bcachefs/btree_trans_commit.c:1058) 
juil. 25 12:45:43 moulinex kernel: __bch2_data_update_index_update (fs/bcachefs/btree_update.h:184 fs/bcachefs/data_update.c:296) 
juil. 25 12:45:43 moulinex kernel: ? srso_return_thunk (arch/x86/lib/retpoline.S:224) 
juil. 25 12:45:43 moulinex kernel: ? __bch2_data_update_index_update (fs/bcachefs/btree_update.h:184 fs/bcachefs/data_update.c:296) 
juil. 25 12:45:43 moulinex kernel: ? srso_return_thunk (arch/x86/lib/retpoline.S:224) 
juil. 25 12:45:43 moulinex kernel: ? __lock_acquire (kernel/locking/lockdep.c:4599 (discriminator 1) kernel/locking/lockdep.c:5097 (discriminator 1)) 
juil. 25 12:45:43 moulinex kernel: bch2_data_update_index_update (fs/bcachefs/data_update.c:342 (discriminator 2)) 
juil. 25 12:45:43 moulinex kernel: ? bch2_data_update_index_update (fs/bcachefs/data_update.c:342 (discriminator 2)) 
juil. 25 12:45:43 moulinex kernel: __bch2_write_index (fs/bcachefs/io_write.c:527 (discriminator 1)) 
juil. 25 12:45:43 moulinex kernel: bch2_write_point_do_index_updates (fs/bcachefs/io_write.c:638) 
juil. 25 12:45:43 moulinex kernel: process_one_work (kernel/workqueue.c:3253) 
juil. 25 12:45:43 moulinex kernel: ? worker_thread (kernel/workqueue.c:3366) 
juil. 25 12:45:43 moulinex kernel: worker_thread (kernel/workqueue.c:3323 (discriminator 2) kernel/workqueue.c:3409 (discriminator 2)) 
juil. 25 12:45:43 moulinex kernel: ? rescuer_thread (kernel/workqueue.c:3356) 
juil. 25 12:45:43 moulinex kernel: kthread (kernel/kthread.c:389) 
juil. 25 12:45:43 moulinex kernel: ? kthread_insert_work_sanity_check (kernel/kthread.c:342) 
juil. 25 12:45:43 moulinex kernel: ret_from_fork (arch/x86/kernel/process.c:153) 
juil. 25 12:45:43 moulinex kernel: ? kthread_insert_work_sanity_check (kernel/kthread.c:342) 
juil. 25 12:45:43 moulinex kernel: ret_from_fork_asm (arch/x86/entry/entry_64.S:257) 
juil. 25 12:45:43 moulinex kernel:  </TASK>

This happens at mount time with e12b7d19c7b20536681e073c503e428fb3a8bfa0 (recent bcachefs-testing, has the lockdep stuff sent for 6.11) (plus recent stable fixes but I had the same report without).

koverstreet commented 2 months ago

I have a fix in the bcachefs-testing branch, can you test it?

g2p commented 2 months ago

I did finally boot bcachefs-testing (01c10bef726344d7793f82ac139b18fff000d92b), but still get a similar error immediately after mounting.

2024-08-07T10:40:29.095269+00:00 moulinex kernel: bcachefs (9986b9d8-9f64-43c3-9a1d-cd397dcf3643): starting version 1.9: disk_accounting_v2 opts=compression=lz4,background_compression=zstd,foreground_target=ssd,background_target=hdd,promote_target=ssd,gc_reserve_percent=5,verbose
2024-08-07T10:40:29.095358+00:00 moulinex kernel: bcachefs (9986b9d8-9f64-43c3-9a1d-cd397dcf3643): recovering from clean shutdown, journal seq 51484698
2024-08-07T10:40:29.175441+00:00 moulinex kernel: bcachefs (9986b9d8-9f64-43c3-9a1d-cd397dcf3643): accounting_read... done
2024-08-07T10:40:31.015267+00:00 moulinex kernel: bcachefs (9986b9d8-9f64-43c3-9a1d-cd397dcf3643): alloc_read... done
2024-08-07T10:40:31.015346+00:00 moulinex kernel: bcachefs (9986b9d8-9f64-43c3-9a1d-cd397dcf3643): stripes_read... done
2024-08-07T10:40:31.015367+00:00 moulinex kernel: bcachefs (9986b9d8-9f64-43c3-9a1d-cd397dcf3643): snapshots_read... done
2024-08-07T10:40:31.155799+00:00 moulinex kernel: bcachefs (9986b9d8-9f64-43c3-9a1d-cd397dcf3643): journal_replay... done
2024-08-07T10:40:31.155861+00:00 moulinex kernel: bcachefs (9986b9d8-9f64-43c3-9a1d-cd397dcf3643): resume_logged_ops... done
2024-08-07T10:40:31.155881+00:00 moulinex kernel: bcachefs (9986b9d8-9f64-43c3-9a1d-cd397dcf3643): going read-write
2024-08-07T10:40:31.155900+00:00 moulinex kernel: bcachefs (9986b9d8-9f64-43c3-9a1d-cd397dcf3643): done starting filesystem
2024-08-07T10:40:31.172556+00:00 moulinex kernel:
2024-08-07T10:40:31.172599+00:00 moulinex kernel: =================================
2024-08-07T10:40:31.172614+00:00 moulinex kernel: WARNING: bad contention detected!
2024-08-07T10:40:31.172658+00:00 moulinex kernel: 6.11.0-rc2-g2p #40 Tainted: G            E
2024-08-07T10:40:31.172672+00:00 moulinex kernel: ---------------------------------
2024-08-07T10:40:31.172685+00:00 moulinex kernel: kworker/9:3/11249 is trying to contend lock (&b->lock) at:
2024-08-07T10:40:31.172699+00:00 moulinex kernel: six_lock_ip_waiter (fs/bcachefs/six.c:558) 
2024-08-07T10:40:31.172712+00:00 moulinex kernel: but there are no locks held!
2024-08-07T10:40:31.172733+00:00 moulinex kernel:
other info that might help us debug this:
2024-08-07T10:40:31.172747+00:00 moulinex kernel: 5 locks held by kworker/9:3/11249:
2024-08-07T10:40:31.172760+00:00 moulinex kernel: #0: ffff9fae845be558 ((wq_completion)bcachefs_write_ref){+.+.}-{0:0}, at: process_one_work (kernel/workqueue.c:3206 (discriminator 1)) 
2024-08-07T10:40:31.172773+00:00 moulinex kernel: #1: ffffab6fc2aafe40 ((work_completion)(&ca->discard_work)){+.+.}-{0:0}, at: process_one_work (kernel/workqueue.c:3207 (discriminator 1)) 
2024-08-07T10:40:31.172787+00:00 moulinex kernel: #2: ffff9faea08843e8 (&c->btree_trans_barrier){.+.+}-{0:0}, at: bch2_btree_path_traverse_one (./include/linux/srcu.h:151 (discriminator 1) ./include/linux/srcu.h:250 (discriminator 1) fs/bcachefs/btree_iter.c:3021 (discriminator 1) fs/bcachefs/btree_iter.c:1132 (discriminator 1)) 
2024-08-07T10:40:31.172800+00:00 moulinex kernel: #3: ffff9faea08a8888 (&c->gc_lock){.+.+}-{3:3}, at: bch2_btree_update_start (fs/bcachefs/btree_update_interior.c:1195 (discriminator 1)) 
2024-08-07T10:40:31.172813+00:00 moulinex kernel: #4: ffff9fae81de8128 (bcachefs_btree){+.+.}-{0:0}, at: __bch2_trans_relock (fs/bcachefs/btree_locking.h:194 (discriminator 1) fs/bcachefs/btree_locking.c:785 (discriminator 1)) 
2024-08-07T10:40:31.172826+00:00 moulinex kernel:
stack backtrace:
2024-08-07T10:40:31.172839+00:00 moulinex kernel: CPU: 9 UID: 0 PID: 11249 Comm: kworker/9:3 Tainted: G            E      6.11.0-rc2-g2p #40
2024-08-07T10:40:31.172852+00:00 moulinex kernel: Tainted: [E]=UNSIGNED_MODULE
2024-08-07T10:40:31.172865+00:00 moulinex kernel: Hardware name: To Be Filled By O.E.M. X570 Phantom Gaming 4/X570 Phantom Gaming 4, BIOS P5.61 02/22/2024
2024-08-07T10:40:31.172885+00:00 moulinex kernel: Workqueue: bcachefs_write_ref bch2_do_discards_work
2024-08-07T10:40:31.172898+00:00 moulinex kernel: Call Trace:
2024-08-07T10:40:31.172912+00:00 moulinex kernel:  <TASK>
2024-08-07T10:40:31.172924+00:00 moulinex kernel: dump_stack_lvl (lib/dump_stack.c:122) 
2024-08-07T10:40:31.172937+00:00 moulinex kernel: dump_stack (lib/dump_stack.c:129) 
2024-08-07T10:40:31.172951+00:00 moulinex kernel: print_lock_contention_bug (kernel/locking/lockdep.c:5920) 
2024-08-07T10:40:31.172963+00:00 moulinex kernel: ? bch2_btree_node_alloc (fs/bcachefs/btree_locking.h:224 fs/bcachefs/btree_locking.h:250 fs/bcachefs/btree_update_interior.c:392) 
2024-08-07T10:40:31.172976+00:00 moulinex kernel: lock_acquired (kernel/locking/lockdep.c:5987 kernel/locking/lockdep.c:6044) 
2024-08-07T10:40:31.172990+00:00 moulinex kernel: ? bch2_btree_node_alloc (fs/bcachefs/btree_locking.h:224 fs/bcachefs/btree_locking.h:250 fs/bcachefs/btree_update_interior.c:392) 
2024-08-07T10:40:31.173002+00:00 moulinex kernel: six_lock_ip_waiter (fs/bcachefs/six.c:558) 
2024-08-07T10:40:31.173015+00:00 moulinex kernel: ? bch2_check_for_deadlock (fs/bcachefs/btree_locking.c:398) 
2024-08-07T10:40:31.173039+00:00 moulinex kernel: bch2_btree_node_alloc (fs/bcachefs/btree_locking.h:252 (discriminator 1) fs/bcachefs/btree_update_interior.c:392 (discriminator 1)) 
2024-08-07T10:40:31.173052+00:00 moulinex kernel: ? bch2_btree_node_alloc (fs/bcachefs/btree_locking.h:224 fs/bcachefs/btree_locking.h:250 fs/bcachefs/btree_update_interior.c:392) 
2024-08-07T10:40:31.173065+00:00 moulinex kernel: bch2_btree_node_alloc_replacement (fs/bcachefs/btree_update_interior.c:449) 
2024-08-07T10:40:31.173078+00:00 moulinex kernel: ? srso_return_thunk (arch/x86/lib/retpoline.S:224) 
2024-08-07T10:40:31.173091+00:00 moulinex kernel: ? mutex_unlock (kernel/locking/mutex.c:549) 
2024-08-07T10:40:31.173103+00:00 moulinex kernel: ? srso_return_thunk (arch/x86/lib/retpoline.S:224) 
2024-08-07T10:40:31.173116+00:00 moulinex kernel: ? bch2_btree_interior_update_will_free_node (fs/bcachefs/btree_update_interior.c:1108) 
2024-08-07T10:40:31.173129+00:00 moulinex kernel: btree_split (fs/bcachefs/btree_update_interior.c:1662) 
2024-08-07T10:40:31.173142+00:00 moulinex kernel: bch2_btree_split_leaf (fs/bcachefs/btree_update_interior.c:1858) 
2024-08-07T10:40:31.173155+00:00 moulinex kernel: bch2_trans_commit_error (fs/bcachefs/btree_trans_commit.c:947) 
2024-08-07T10:40:31.173168+00:00 moulinex kernel: ? bch2_discard_one_bucket (fs/bcachefs/alloc_background.c:1831) 
2024-08-07T10:40:31.173188+00:00 moulinex kernel: ? srso_return_thunk (arch/x86/lib/retpoline.S:224) 
2024-08-07T10:40:31.173200+00:00 moulinex kernel: ? bch2_trans_unlock_write (fs/bcachefs/six.h:367 (discriminator 1) fs/bcachefs/btree_locking.h:181 (discriminator 1) fs/bcachefs/btree_trans_commit.c:142 (discriminator 1)) 
2024-08-07T10:40:31.173213+00:00 moulinex kernel: ? bch2_trans_lock_write (fs/bcachefs/btree_trans_commit.c:101 fs/bcachefs/btree_trans_commit.c:129) 
2024-08-07T10:40:31.173273+00:00 moulinex kernel: __bch2_trans_commit (fs/bcachefs/btree_trans_commit.c:1175 (discriminator 1)) 
2024-08-07T10:40:31.173290+00:00 moulinex kernel: bch2_discard_one_bucket (fs/bcachefs/alloc_background.c:1831) 
2024-08-07T10:40:31.173306+00:00 moulinex kernel: ? srso_return_thunk (arch/x86/lib/retpoline.S:224) 
2024-08-07T10:40:31.173322+00:00 moulinex kernel: ? bch2_discard_one_bucket (fs/bcachefs/alloc_background.c:1831) 
2024-08-07T10:40:31.173338+00:00 moulinex kernel: bch2_do_discards_work (fs/bcachefs/alloc_background.c:1858 (discriminator 9)) 
2024-08-07T10:40:31.173355+00:00 moulinex kernel: process_one_work (kernel/workqueue.c:3236) 
2024-08-07T10:40:31.173371+00:00 moulinex kernel: ? worker_thread (kernel/workqueue.c:3349) 
2024-08-07T10:40:31.173388+00:00 moulinex kernel: worker_thread (kernel/workqueue.c:3306 (discriminator 2) kernel/workqueue.c:3390 (discriminator 2)) 
2024-08-07T10:40:31.173405+00:00 moulinex kernel: ? rescuer_thread (kernel/workqueue.c:3339) 
2024-08-07T10:40:31.173422+00:00 moulinex kernel: kthread (kernel/kthread.c:389) 
2024-08-07T10:40:31.173450+00:00 moulinex kernel: ? kthread_insert_work_sanity_check (kernel/kthread.c:342) 
2024-08-07T10:40:31.173467+00:00 moulinex kernel: ret_from_fork (arch/x86/kernel/process.c:153) 
2024-08-07T10:40:31.173484+00:00 moulinex kernel: ? kthread_insert_work_sanity_check (kernel/kthread.c:342) 
2024-08-07T10:40:31.173501+00:00 moulinex kernel: ret_from_fork_asm (arch/x86/entry/entry_64.S:257) 
2024-08-07T10:40:31.173518+00:00 moulinex kernel:  </TASK>                                                          

Here are the relevant lockdep options I enabled in .config:

 CONFIG_LOCK_DEBUGGING_SUPPORT=y
-# CONFIG_PROVE_LOCKING is not set
-# CONFIG_LOCK_STAT is not set
-# CONFIG_DEBUG_RT_MUTEXES is not set
-# CONFIG_DEBUG_SPINLOCK is not set
-# CONFIG_DEBUG_MUTEXES is not set
-# CONFIG_DEBUG_WW_MUTEX_SLOWPATH is not set
-# CONFIG_DEBUG_RWSEMS is not set
-# CONFIG_DEBUG_LOCK_ALLOC is not set
+CONFIG_PROVE_LOCKING=y
+# CONFIG_PROVE_RAW_LOCK_NESTING is not set
+CONFIG_LOCK_STAT=y
+CONFIG_DEBUG_RT_MUTEXES=y
+CONFIG_DEBUG_SPINLOCK=y
+CONFIG_DEBUG_MUTEXES=y
+CONFIG_DEBUG_WW_MUTEX_SLOWPATH=y
+CONFIG_DEBUG_RWSEMS=y
+CONFIG_DEBUG_LOCK_ALLOC=y
+CONFIG_LOCKDEP=y
+CONFIG_LOCKDEP_BITS=15
+CONFIG_LOCKDEP_CHAINS_BITS=16
+CONFIG_LOCKDEP_STACK_TRACE_BITS=19
+CONFIG_LOCKDEP_STACK_TRACE_HASH_BITS=14
+CONFIG_LOCKDEP_CIRCULAR_QUEUE_BITS=12
+# CONFIG_DEBUG_LOCKDEP is not set
 # CONFIG_DEBUG_ATOMIC_SLEEP is not set
@@ -6631,2 +6639,3 @@ CONFIG_STACKTRACE=y
 #
+CONFIG_PROVE_RCU=y
 # CONFIG_RCU_SCALE_TEST is not set
@@ -6670,2 +6679,3 @@ CONFIG_EVENT_TRACING=y
 CONFIG_CONTEXT_SWITCH_TRACER=y
+CONFIG_PREEMPTIRQ_TRACEPOINTS=y
g2p commented 2 months ago

ff9bf4b34104955017822e9bc42aeeb526ee2a80 fixes it! Thank you.