Hi Jon, Okay, please let me look into the issue first, and will get back to you.
Regards, Ying From: Jon Maloy [mailto:[email protected]] Sent: Wednesday, October 17, 2018 10:37 AM To: Xue, Ying Cc: [email protected] Subject: Deadlock warning Hi Ying, I sometimes get the following deadlock warning. As I understand it the reason is that we are calling rhashtable_walk_enter() in a tmer, i.e., in an SW interrupt, something that is not permitted. Do you agree with this interpretation? Since you have worked more with these hash tables than I have, can you see any easy solution to it. I would hate to introduce a work queue to solve this... ///jon [346769.617370] ================================ [346769.618331] WARNING: inconsistent lock state [346769.619187] 4.19.0-rc6+ #27 Tainted: G E [346769.619651] -------------------------------- [346769.619651] inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage. [346769.619651] swapper/3/0 [HC0[0]:SC1[3]:HE1:SE0] takes: [346769.619651] 000000009e3eefe1 (&(&ht->lock)->rlock){+.?.}, at: rhashtable_walk_enter+0x36/0xb0 [346769.619651] {SOFTIRQ-ON-W} state was registered at: [346769.619651] _raw_spin_lock+0x29/0x60 [346769.619651] rht_deferred_worker+0x556/0x810 [346769.619651] process_one_work+0x1f5/0x540 [346769.619651] worker_thread+0x64/0x3e0 [346769.619651] kthread+0x112/0x150 [346769.619651] ret_from_fork+0x3a/0x50 [346769.619651] irq event stamp: 8581694 [346769.619651] hardirqs last enabled at (8581694): [<ffffffff9107f290>] __local_bh_enable_ip+0x80 /0x100 [346769.619651] hardirqs last disabled at (8581693): [<ffffffff9107f257>] __local_bh_enable_ip+0x47 /0x100 [346769.619651] softirqs last enabled at (8581678): [<ffffffff9107fa1e>] irq_enter+0x5e/0x60 [346769.619651] softirqs last disabled at (8581679): [<ffffffff9107fadb>] irq_exit+0xbb/0xc0 [346769.619651] [346769.619651] other info that might help us debug this: [346769.619651] Possible unsafe locking scenario: [346769.619651] [346769.619651] CPU0 [346769.619651] ---- [346769.619651] lock(&(&ht->lock)->rlock); [346769.619651] <Interrupt> [346769.619651] lock(&(&ht->lock)->rlock); [346769.619651] [346769.619651] *** DEADLOCK *** [346769.619651] [346769.619651] 2 locks held by swapper/3/0: [346769.619651] #0: 00000000d9e59d74 ((&d->timer)){+.-.}, at: call_timer_fn+0x5/0x280 [346769.619651] #1: 000000000bf452d8 (&(&d->lock)->rlock){+.-.}, at: tipc_disc_timeout+0xc8/0x540 [tipc] [346769.619651] [346769.619651] stack backtrace: [346769.619651] CPU: 3 PID: 0 Comm: swapper/3 Tainted: G E 4.19.0-rc6+ #27 [346769.619651] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 [346769.619651] Call Trace: [346769.619651] <IRQ> [346769.619651] dump_stack+0x78/0xb3 [346769.619651] print_usage_bug+0x1ed/0x20b [346769.619651] mark_lock+0x5ca/0x640 [346769.619651] __lock_acquire+0x41f/0x1b10 [346769.619651] ? sched_clock_local+0x12/0x80 [346769.619651] ? lock_acquire+0xb3/0x190 [346769.619651] lock_acquire+0xb3/0x190 [346769.619651] ? rhashtable_walk_enter+0x36/0xb0 [346769.651609] _raw_spin_lock+0x29/0x60 [346769.651609] ? rhashtable_walk_enter+0x36/0xb0 [346769.651609] rhashtable_walk_enter+0x36/0xb0 [346769.651609] tipc_sk_reinit+0xb0/0x410 [tipc] [346769.651609] ? mark_held_locks+0x6f/0x90 [346769.651609] ? __local_bh_enable_ip+0x80/0x100 [346769.651609] ? debug_show_all_locks+0x170/0x190 [346769.651609] tipc_net_finalize+0xbf/0x180 [tipc] [346769.651609] tipc_disc_timeout+0x509/0x540 [tipc] _______________________________________________ tipc-discussion mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/tipc-discussion
