======================================================
WARNING: possible circular locking dependency detected
5.3.0+ #0 Not tainted
------------------------------------------------------
swapper/0/0 is trying to acquire lock:
ffff888093611340 (&(&sch->q.lock)->rlock){+.-.}, at: spin_lock include/linux/spinlock.h:338 [inline]
ffff888093611340 (&(&sch->q.lock)->rlock){+.-.}, at: pie_timer+0x88/0x7d0 net/sched/sch_pie.c:449
but task is already holding lock:
ffff8880aea09d50 ((&q->adapt_timer)){+.-.}, at: lockdep_copy_map include/linux/lockdep.h:182 [inline]
ffff8880aea09d50 ((&q->adapt_timer)){+.-.}, at: call_timer_fn+0x5d/0x170 kernel/time/timer.c:1394
which lock already depends on the new lock.
the existing dependency chain (in reverse order) is:
-> #1 ((&q->adapt_timer)){+.-.}:
lock_acquire+0x158/0x250 kernel/locking/lockdep.c:4487
del_timer_sync+0xab/0x240 kernel/time/timer.c:1354
pie_destroy+0x45/0x60 net/sched/sch_pie.c:554
qdisc_destroy+0x147/0x4d0 net/sched/sch_generic.c:968
qdisc_put+0x5d/0x90 net/sched/sch_generic.c:995
sfb_change+0x52d/0xd30 net/sched/sch_sfb.c:522
qdisc_change net/sched/sch_api.c:1321 [inline]
tc_modify_qdisc+0x184d/0x1ea0 net/sched/sch_api.c:1623
rtnetlink_rcv_msg+0x889/0xd40 net/core/rtnetlink.c:5223
netlink_rcv_skb+0x19e/0x3d0 net/netlink/af_netlink.c:2477
rtnetlink_rcv+0x1c/0x20 net/core/rtnetlink.c:5241
netlink_unicast_kernel net/netlink/af_netlink.c:1302 [inline]
netlink_unicast+0x787/0x8f0 net/netlink/af_netlink.c:1328
netlink_sendmsg+0x993/0xc50 net/netlink/af_netlink.c:1917
sock_sendmsg_nosec net/socket.c:637 [inline]
sock_sendmsg net/socket.c:657 [inline]
___sys_sendmsg+0x60d/0x910 net/socket.c:2311
__sys_sendmsg net/socket.c:2356 [inline]
__do_sys_sendmsg net/socket.c:2365 [inline]
__se_sys_sendmsg net/socket.c:2363 [inline]
__x64_sys_sendmsg+0x17c/0x200 net/socket.c:2363
do_syscall_64+0xf7/0x1c0 arch/x86/entry/common.c:290
entry_SYSCALL_64_after_hwframe+0x49/0xbe
-> #0 (&(&sch->q.lock)->rlock){+.-.}:
check_prev_add kernel/locking/lockdep.c:2476 [inline]
check_prevs_add kernel/locking/lockdep.c:2581 [inline]
validate_chain+0x161e/0x7bc0 kernel/locking/lockdep.c:2971
__lock_acquire+0xc75/0x1be0 kernel/locking/lockdep.c:3955
lock_acquire+0x158/0x250 kernel/locking/lockdep.c:4487
__raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline]
_raw_spin_lock+0x2d/0x40 kernel/locking/spinlock.c:151
spin_lock include/linux/spinlock.h:338 [inline]
pie_timer+0x88/0x7d0 net/sched/sch_pie.c:449
call_timer_fn+0x95/0x170 kernel/time/timer.c:1404
expire_timers kernel/time/timer.c:1449 [inline]
__run_timers+0x7b6/0x990 kernel/time/timer.c:1773
run_timer_softirq+0x4a/0x90 kernel/time/timer.c:1786
__do_softirq+0x333/0x7c4 arch/x86/include/asm/paravirt.h:766
invoke_softirq kernel/softirq.c:373 [inline]
irq_exit+0x227/0x230 kernel/softirq.c:413
exiting_irq arch/x86/include/asm/apic.h:536 [inline]
smp_apic_timer_interrupt+0x113/0x280 arch/x86/kernel/apic/apic.c:1137
apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:830
native_safe_halt+0xe/0x10 arch/x86/include/asm/irqflags.h:60
arch_cpu_idle+0xa/0x10 arch/x86/kernel/process.c:571
default_idle_call+0x59/0xa0 kernel/sched/idle.c:94
cpuidle_idle_call kernel/sched/idle.c:154 [inline]
do_idle+0x140/0x670 kernel/sched/idle.c:263
cpu_startup_entry+0x25/0x30 kernel/sched/idle.c:355
rest_init+0x29d/0x2b0 init/main.c:451
arch_call_rest_init+0xe/0x10
start_kernel+0x6cc/0x7cd init/main.c:783
x86_64_start_reservations+0x18/0x2e arch/x86/kernel/head64.c:472
x86_64_start_kernel+0x7a/0x7d arch/x86/kernel/head64.c:453
secondary_startup_64+0xa4/0xb0 arch/x86/kernel/head_64.S:241
other info that might help us debug this:
Possible unsafe locking scenario:
CPU0 CPU1
---- ----
lock((&q->adapt_timer));
lock(&(&sch->q.lock)->rlock);
lock((&q->adapt_timer));
lock(&(&sch->q.lock)->rlock);
*** DEADLOCK ***
1 lock held by swapper/0/0:
#0: ffff8880aea09d50 ((&q->adapt_timer)){+.-.}, at: lockdep_copy_map include/linux/lockdep.h:182 [inline]
#0: ffff8880aea09d50 ((&q->adapt_timer)){+.-.}, at: call_timer_fn+0x5d/0x170 kernel/time/timer.c:1394
stack backtrace:
CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.3.0+ #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
__dump_stack lib/dump_stack.c:77 [inline]
dump_stack+0x1d8/0x2f8 lib/dump_stack.c:113
print_circular_bug+0xc2d/0xe60 kernel/locking/lockdep.c:1685
check_noncircular+0x206/0x3a0 kernel/locking/lockdep.c:1809
check_prev_add kernel/locking/lockdep.c:2476 [inline]
check_prevs_add kernel/locking/lockdep.c:2581 [inline]
validate_chain+0x161e/0x7bc0 kernel/locking/lockdep.c:2971
__lock_acquire+0xc75/0x1be0 kernel/locking/lockdep.c:3955
lock_acquire+0x158/0x250 kernel/locking/lockdep.c:4487
__raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline]
_raw_spin_lock+0x2d/0x40 kernel/locking/spinlock.c:151
spin_lock include/linux/spinlock.h:338 [inline]
pie_timer+0x88/0x7d0 net/sched/sch_pie.c:449
call_timer_fn+0x95/0x170 kernel/time/timer.c:1404
expire_timers kernel/time/timer.c:1449 [inline]
__run_timers+0x7b6/0x990 kernel/time/timer.c:1773
run_timer_softirq+0x4a/0x90 kernel/time/timer.c:1786
__do_softirq+0x333/0x7c4 arch/x86/include/asm/paravirt.h:766
invoke_softirq kernel/softirq.c:373 [inline]
irq_exit+0x227/0x230 kernel/softirq.c:413
exiting_irq arch/x86/include/asm/apic.h:536 [inline]
smp_apic_timer_interrupt+0x113/0x280 arch/x86/kernel/apic/apic.c:1137
apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:830
RIP: 0010:native_safe_halt+0xe/0x10 arch/x86/include/asm/irqflags.h:61
Code: 3b fa eb ae 89 d9 80 e1 07 80 c1 03 38 c1 7c ba 48 89 df e8 74 95 3b fa eb b0 90 90 e9 07 00 00 00 0f 00 2d e6 da 51 00 fb f4 90 e9 07 00 00 00 0f 00 2d d6 da 51 00 f4 c3 90 90 55 48 89 e5
RSP: 0018:ffffffff88807dc0 EFLAGS: 00000286 ORIG_RAX: ffffffffffffff13
RAX: 1ffffffff1115179 RBX: ffffffff88875a00 RCX: dffffc0000000000
RDX: 0000000000000000 RSI: ffffffff812b707a RDI: ffffffff88876244
RBP: ffffffff88807dc8 R08: ffffffff88876258 R09: fffffbfff110eb41
R10: fffffbfff110eb41 R11: 0000000000000000 R12: dffffc0000000000
R13: 1ffffffff110eb40 R14: dffffc0000000000 R15: 1ffffffff1115177
arch_cpu_idle+0xa/0x10 arch/x86/kernel/process.c:571
default_idle_call+0x59/0xa0 kernel/sched/idle.c:94
cpuidle_idle_call kernel/sched/idle.c:154 [inline]
do_idle+0x140/0x670 kernel/sched/idle.c:263
cpu_startup_entry+0x25/0x30 kernel/sched/idle.c:355
rest_init+0x29d/0x2b0 init/main.c:451
arch_call_rest_init+0xe/0x10
start_kernel+0x6cc/0x7cd init/main.c:783
x86_64_start_reservations+0x18/0x2e arch/x86/kernel/head64.c:472
x86_64_start_kernel+0x7a/0x7d arch/x86/kernel/head64.c:453
secondary_startup_64+0xa4/0xb0 arch/x86/kernel/head_64.S:241