[v6.1] INFO: rcu detected stall in batadv_nc_worker

6 views
Skip to first unread message

syzbot

unread,
Jul 6, 2023, 2:16:16 AM7/6/23
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 0f4ac6b4c5f0 Linux 6.1.37
git tree: linux-6.1.y
console output: https://syzkaller.appspot.com/x/log.txt?x=11498b08a80000
kernel config: https://syzkaller.appspot.com/x/.config?x=b38e28d864b6a1fc
dashboard link: https://syzkaller.appspot.com/bug?extid=13306b743f5eee80aab3
compiler: Debian clang version 15.0.7, GNU ld (GNU Binutils for Debian) 2.35.2

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

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/b81b32428cff/disk-0f4ac6b4.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/98c79ff1a964/vmlinux-0f4ac6b4.xz
kernel image: https://storage.googleapis.com/syzbot-assets/184fb0dfef6d/bzImage-0f4ac6b4.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+13306b...@syzkaller.appspotmail.com

rcu: INFO: rcu_preempt detected stalls on CPUs/tasks:
rcu: 0-...!: (1 GPs behind) idle=ce64/1/0x4000000000000000 softirq=59802/59803 fqs=17
(detected by 1, t=10506 jiffies, g=83629, q=1071 ncpus=2)
Sending NMI from CPU 1 to CPUs 0:
NMI backtrace for cpu 0
CPU: 0 PID: 5427 Comm: kworker/u4:28 Not tainted 6.1.37-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/27/2023
Workqueue: bat_events batadv_nc_worker
RIP: 0010:memset+0x23/0x40 mm/kasan/shadow.c:47
Code: 00 00 e9 c0 ec ff ff 55 41 56 53 48 89 d3 41 89 f6 48 89 fd 48 8b 4c 24 18 48 89 d6 ba 01 00 00 00 e8 a1 ec ff ff 84 c0 74 12 <48> 89 ef 44 89 f6 48 89 da 5b 41 5e 5d e9 5b ba a1 08 31 c0 5b 41
RSP: 0018:ffffc90000007be0 EFLAGS: 00000002
RAX: 5fcd45ad09e5f801 RBX: 0000000000000010 RCX: ffffffff84392a18
RDX: 0000000000000001 RSI: 0000000000000010 RDI: ffffc90000007c60
RBP: ffffc90000007c60 R08: dffffc0000000000 R09: fffff52000000f8e
R10: 0000000000000000 R11: dffffc0000000001 R12: ffffc90000007c60
R13: 1ffff92000000f88 R14: 0000000000000000 R15: dffffc0000000000
FS: 0000000000000000(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fd2eb10e8c3 CR3: 000000000cc8e000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<NMI>
</NMI>
<IRQ>
debug_object_activate+0x98/0x860 lib/debugobjects.c:683
debug_hrtimer_activate kernel/time/hrtimer.c:420 [inline]
debug_activate kernel/time/hrtimer.c:475 [inline]
enqueue_hrtimer+0x30/0x390 kernel/time/hrtimer.c:1084
__run_hrtimer kernel/time/hrtimer.c:1702 [inline]
__hrtimer_run_queues+0x728/0xe50 kernel/time/hrtimer.c:1749
hrtimer_interrupt+0x392/0x980 kernel/time/hrtimer.c:1811
local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1095 [inline]
__sysvec_apic_timer_interrupt+0x156/0x580 arch/x86/kernel/apic/apic.c:1112
sysvec_apic_timer_interrupt+0x8c/0xb0 arch/x86/kernel/apic/apic.c:1106
</IRQ>
<TASK>
asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:649
RIP: 0010:lock_acquire+0x26f/0x5a0 kernel/locking/lockdep.c:5673
Code: 2b 00 74 08 4c 89 f7 e8 5f 6d 76 00 f6 44 24 61 02 0f 85 84 01 00 00 41 f7 c7 00 02 00 00 74 01 fb 48 c7 44 24 40 0e 36 e0 45 <4b> c7 44 25 00 00 00 00 00 43 c7 44 25 09 00 00 00 00 43 c7 44 25
RSP: 0018:ffffc9000473fa80 EFLAGS: 00000206
RAX: 0000000000000001 RBX: 1ffff920008e7f5c RCX: 1ffff920008e7efc
RDX: dffffc0000000000 RSI: ffffffff8aebe4a0 RDI: ffffffff8b3cce60
RBP: ffffc9000473fbd8 R08: dffffc0000000000 R09: fffffbfff2052845
R10: 0000000000000000 R11: dffffc0000000001 R12: 1ffff920008e7f58
R13: dffffc0000000000 R14: ffffc9000473fae0 R15: 0000000000000246
rcu_lock_acquire+0x2a/0x30 include/linux/rcupdate.h:306
rcu_read_lock include/linux/rcupdate.h:747 [inline]
batadv_nc_purge_orig_hash net/batman-adv/network-coding.c:408 [inline]
batadv_nc_worker+0xc1/0x5b0 net/batman-adv/network-coding.c:719
process_one_work+0x8aa/0x11f0 kernel/workqueue.c:2289
worker_thread+0xa5f/0x1210 kernel/workqueue.c:2436
kthread+0x26e/0x300 kernel/kthread.c:376
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306
</TASK>
rcu: rcu_preempt kthread timer wakeup didn't happen for 10419 jiffies! g83629 f0x0 RCU_GP_WAIT_FQS(5) ->state=0x402
rcu: Possible timer handling issue on cpu=1 timer-softirq=68415
rcu: rcu_preempt kthread starved for 10420 jiffies! g83629 f0x0 RCU_GP_WAIT_FQS(5) ->state=0x402 ->cpu=1
rcu: Unless rcu_preempt kthread gets sufficient CPU time, OOM is now expected behavior.
rcu: RCU grace-period kthread stack dump:
task:rcu_preempt state:I stack:25048 pid:16 ppid:2 flags:0x00004000
Call Trace:
<TASK>
context_switch kernel/sched/core.c:5241 [inline]
__schedule+0x132c/0x4330 kernel/sched/core.c:6554
schedule+0xbf/0x180 kernel/sched/core.c:6630
schedule_timeout+0x1b9/0x300 kernel/time/timer.c:1935
rcu_gp_fqs_loop+0x2c2/0x1010 kernel/rcu/tree.c:1661
rcu_gp_kthread+0xa3/0x3a0 kernel/rcu/tree.c:1860
kthread+0x26e/0x300 kernel/kthread.c:376
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306
</TASK>
rcu: Stack dump where RCU GP kthread last ran:
CPU: 1 PID: 3597 Comm: syz-executor.0 Not tainted 6.1.37-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/27/2023
RIP: 0010:csd_lock_wait kernel/smp.c:413 [inline]
RIP: 0010:smp_call_function_many_cond+0x1f62/0x33d0 kernel/smp.c:987
Code: 2f 44 89 ee 83 e6 01 31 ff e8 9a 11 0b 00 41 83 e5 01 49 bd 00 00 00 00 00 fc ff df 75 0a e8 25 0e 0b 00 e9 1b ff ff ff f3 90 <42> 0f b6 04 2b 84 c0 75 14 41 f7 07 01 00 00 00 0f 84 fe fe ff ff
RSP: 0018:ffffc90003bdf5c0 EFLAGS: 00000293
RAX: ffffffff817ecd3d RBX: 1ffff1101730841d RCX: ffff8880221a3b80
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000000
RBP: ffffc90003bdf990 R08: ffffffff817ecd06 R09: fffffbfff2052872
R10: 0000000000000000 R11: dffffc0000000001 R12: 0000000800000000
R13: dffffc0000000000 R14: 0000000000000000 R15: ffff8880b98420e8
FS: 0000555556938400(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f7316785998 CR3: 00000000597cb000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<IRQ>
</IRQ>
<TASK>
on_each_cpu_cond_mask+0x3b/0x80 kernel/smp.c:1155
invalidate_bdev+0x8a/0xb0 block/bdev.c:85
btrfs_close_bdev fs/btrfs/volumes.c:1116 [inline]
btrfs_close_one_device fs/btrfs/volumes.c:1140 [inline]
close_fs_devices+0x41e/0x880 fs/btrfs/volumes.c:1182
btrfs_close_devices+0xc4/0x5c0 fs/btrfs/volumes.c:1197
close_ctree+0x734/0xc35 fs/btrfs/disk-io.c:4760
generic_shutdown_super+0x130/0x340 fs/super.c:501
kill_anon_super+0x37/0x60 fs/super.c:1108
btrfs_kill_super+0x3d/0x50 fs/btrfs/super.c:2445
deactivate_locked_super+0xa0/0x110 fs/super.c:332
cleanup_mnt+0x490/0x520 fs/namespace.c:1186
task_work_run+0x246/0x300 kernel/task_work.c:179
resume_user_mode_work include/linux/resume_user_mode.h:49 [inline]
exit_to_user_mode_loop+0xd9/0x100 kernel/entry/common.c:171
exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:204
__syscall_exit_to_user_mode_work kernel/entry/common.c:286 [inline]
syscall_exit_to_user_mode+0x60/0x270 kernel/entry/common.c:297
do_syscall_64+0x49/0xb0 arch/x86/entry/common.c:86
entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7fc5fc88d7f7
Code: ff ff ff f7 d8 64 89 01 48 83 c8 ff c3 66 0f 1f 44 00 00 31 f6 e9 09 00 00 00 66 0f 1f 84 00 00 00 00 00 b8 a6 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fff9fd57e98 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 00007fc5fc88d7f7
RDX: 00007fff9fd57f6b RSI: 000000000000000a RDI: 00007fff9fd57f60
RBP: 00007fff9fd57f60 R08: 00000000ffffffff R09: 00007fff9fd57d30
R10: 0000555556939893 R11: 0000000000000246 R12: 00007fc5fc8d643b
R13: 00007fff9fd59020 R14: 0000555556939810 R15: 00007fff9fd59060
</TASK>


---
This report 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 syzk...@googlegroups.com.

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

If the bug is already fixed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want to change bug's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the bug is a duplicate of another bug, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup

syzbot

unread,
Sep 18, 2023, 4:54:08 PM9/18/23
to syzkaller...@googlegroups.com
syzbot has found a reproducer for the following issue on:

HEAD commit: 09045dae0d90 Linux 6.1.53
git tree: linux-6.1.y
console output: https://syzkaller.appspot.com/x/log.txt?x=1402ff52680000
kernel config: https://syzkaller.appspot.com/x/.config?x=195b6ef285251409
dashboard link: https://syzkaller.appspot.com/bug?extid=13306b743f5eee80aab3
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=16619d8c680000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=10a6c702680000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/c3b1bb820e74/disk-09045dae.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/4c5cfb0563d9/vmlinux-09045dae.xz
kernel image: https://storage.googleapis.com/syzbot-assets/c682edb60d96/bzImage-09045dae.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+13306b...@syzkaller.appspotmail.com

rcu: INFO: rcu_preempt detected stalls on CPUs/tasks:
(detected by 0, t=10502 jiffies, g=8329, q=1477 ncpus=2)
rcu: All QSes seen, last rcu_preempt kthread activity 10482 (4294985187-4294974705), jiffies_till_next_fqs=1, root ->qsmask 0x0
rcu: rcu_preempt kthread starved for 10483 jiffies! g8329 f0x2 RCU_GP_WAIT_FQS(5) ->state=0x0 ->cpu=1
rcu: Unless rcu_preempt kthread gets sufficient CPU time, OOM is now expected behavior.
rcu: RCU grace-period kthread stack dump:
task:rcu_preempt state:R running task stack:25496 pid:16 ppid:2 flags:0x00004000
Call Trace:
<TASK>
context_switch kernel/sched/core.c:5241 [inline]
__schedule+0x132c/0x4330 kernel/sched/core.c:6554
schedule+0xbf/0x180 kernel/sched/core.c:6630
schedule_timeout+0x1b9/0x300 kernel/time/timer.c:1935
rcu_gp_fqs_loop+0x2c2/0x1010 kernel/rcu/tree.c:1661
rcu_gp_kthread+0xa3/0x3a0 kernel/rcu/tree.c:1860
kthread+0x26e/0x300 kernel/kthread.c:376
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306
</TASK>
rcu: Stack dump where RCU GP kthread last ran:
Sending NMI from CPU 0 to CPUs 1:
NMI backtrace for cpu 1
CPU: 1 PID: 9 Comm: kworker/u4:0 Not tainted 6.1.53-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/04/2023
Workqueue: bat_events batadv_nc_worker
RIP: 0010:check_kcov_mode kernel/kcov.c:173 [inline]
RIP: 0010:write_comp_data kernel/kcov.c:236 [inline]
RIP: 0010:__sanitizer_cov_trace_const_cmp8+0x28/0x80 kernel/kcov.c:311
Code: 1f 00 4c 8b 04 24 65 48 8b 0d 24 57 78 7e 65 8b 05 25 57 78 7e a9 00 01 ff 00 74 10 a9 00 01 00 00 74 57 83 b9 1c 16 00 00 00 <74> 4e 8b 81 f8 15 00 00 83 f8 03 75 43 48 8b 91 00 16 00 00 44 8b
RSP: 0018:ffffc900001e0a68 EFLAGS: 00000246
RAX: 0000000000000101 RBX: 00004189374bc6a7 RCX: ffff88813fec0000
RDX: ffff88813fec0000 RSI: 0000000000000000 RDI: 00004189374bc6a7
RBP: 0019999999999998 R08: ffffffff88b0ae11 R09: 0000000000000003
R10: ffffffffffffffff R11: dffffc0000000001 R12: 0000000225c17d04
R13: 0000000000000000 R14: 00000015798ee228 R15: 1ffff1100d049d63
FS: 0000000000000000(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020000080 CR3: 000000000ce8e000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<NMI>
</NMI>
<IRQ>
pie_calculate_probability+0x241/0x820 net/sched/sch_pie.c:345
fq_pie_timer+0x1ff/0x410 net/sched/sch_fq_pie.c:387
call_timer_fn+0x19e/0x6b0 kernel/time/timer.c:1474
expire_timers kernel/time/timer.c:1519 [inline]
__run_timers+0x67c/0x890 kernel/time/timer.c:1790
run_timer_softirq+0x63/0xf0 kernel/time/timer.c:1803
__do_softirq+0x2e9/0xa4c kernel/softirq.c:571
invoke_softirq kernel/softirq.c:445 [inline]
__irq_exit_rcu+0x155/0x240 kernel/softirq.c:650
irq_exit_rcu+0x5/0x20 kernel/softirq.c:662
sysvec_apic_timer_interrupt+0x91/0xb0 arch/x86/kernel/apic/apic.c:1106
</IRQ>
<TASK>
asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:649
RIP: 0010:native_save_fl arch/x86/include/asm/irqflags.h:35 [inline]
RIP: 0010:arch_local_save_flags arch/x86/include/asm/irqflags.h:70 [inline]
RIP: 0010:arch_local_irq_save arch/x86/include/asm/irqflags.h:106 [inline]
RIP: 0010:lock_acquire+0x199/0x5a0 kernel/locking/lockdep.c:5657
Code: eb 03 42 80 3c 2b 00 74 08 4c 89 ff e8 d0 bf 76 00 48 c7 84 24 80 00 00 00 00 00 00 00 9c 8f 84 24 80 00 00 00 42 80 3c 2b 00 <74> 08 4c 89 ff e8 2d bf 76 00 48 8d 5c 24 60 4c 8b bc 24 80 00 00
RSP: 0018:ffffc900000e7a80 EFLAGS: 00000246
RAX: 0000000000000000 RBX: 1ffff9200001cf60 RCX: ffffffff8169f64b
RDX: 0000000000000000 RSI: ffffffff8b3ceb60 RDI: ffffffff8b3ceb20
RBP: ffffc900000e7bd8 R08: dffffc0000000000 R09: fffffbfff1ce766e
R10: 0000000000000000 R11: dffffc0000000001 R12: 1ffff9200001cf58
R13: dffffc0000000000 R14: 0000000000000000 R15: ffffc900000e7b00
rcu_lock_acquire+0x2a/0x30 include/linux/rcupdate.h:306
rcu_read_lock include/linux/rcupdate.h:747 [inline]
batadv_nc_purge_orig_hash net/batman-adv/network-coding.c:408 [inline]
batadv_nc_worker+0xc1/0x5b0 net/batman-adv/network-coding.c:719
process_one_work+0x8aa/0x11f0 kernel/workqueue.c:2292
worker_thread+0xa5f/0x1210 kernel/workqueue.c:2439
kthread+0x26e/0x300 kernel/kthread.c:376
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306
</TASK>


---
If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.

syzbot

unread,
Nov 6, 2023, 6:14:07 PM11/6/23
to syzkaller...@googlegroups.com
syzbot suspects this issue could be fixed by backporting the following commit:

commit 8c21ab1bae945686c602c5bfa4e3f3352c2452c5
git tree: upstream
Author: Eric Dumazet <edum...@google.com>
Date: Tue Aug 29 12:35:41 2023 +0000

net/sched: fq_pie: avoid stalls in fq_pie_timer()

bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=120585ef680000
Please keep in mind that other backports might be required as well.

For information about bisection process see: https://goo.gl/tpsmEJ#bisection
Reply all
Reply to author
Forward
0 new messages