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

1 view
Skip to first unread message

syzbot

unread,
Apr 7, 2023, 4:31:49 AM4/7/23
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 543aff194ab6 Linux 6.1.23
git tree: linux-6.1.y
console output: https://syzkaller.appspot.com/x/log.txt?x=12b637fdc80000
kernel config: https://syzkaller.appspot.com/x/.config?x=e9affea290775ea7
dashboard link: https://syzkaller.appspot.com/bug?extid=a5ddd0a69ba3bcb6ca90
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/6fe9097a8f09/disk-543aff19.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/9df5aa0f6266/vmlinux-543aff19.xz
kernel image: https://storage.googleapis.com/syzbot-assets/84127c4bde2b/bzImage-543aff19.xz

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

rcu: INFO: rcu_preempt detected stalls on CPUs/tasks:
rcu: Tasks blocked on level-0 rcu_node (CPUs 0-1): P10277/1:b..l
(detected by 1, t=10506 jiffies, g=107557, q=11 ncpus=2)
task:kworker/u4:22 state:R running task stack:21152 pid:10277 ppid:2 flags:0x00004000
Workqueue: bat_events batadv_nc_worker
Call Trace:
<TASK>
context_switch kernel/sched/core.c:5241 [inline]
__schedule+0x132c/0x4330 kernel/sched/core.c:6554
preempt_schedule_irq+0xf7/0x1c0 kernel/sched/core.c:6866
irqentry_exit+0x53/0x80 kernel/entry/common.c:433
asm_sysvec_reschedule_ipi+0x16/0x20 arch/x86/include/asm/idtentry.h:654
RIP: 0010:lock_acquire+0x26f/0x5a0 kernel/locking/lockdep.c:5673
Code: 2b 00 74 08 4c 89 f7 e8 ef 09 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:ffffc9000342fa80 EFLAGS: 00000206
RAX: 0000000000000001 RBX: 1ffff92000685f5c RCX: 1ffff92000685efc
RDX: dffffc0000000000 RSI: ffffffff8aebd760 RDI: ffffffff8b3cb7e0
RBP: ffffc9000342fbd8 R08: dffffc0000000000 R09: fffffbfff204e031
R10: 0000000000000000 R11: dffffc0000000001 R12: 1ffff92000685f58
R13: dffffc0000000000 R14: ffffc9000342fae0 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+0x268/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 10505 jiffies! g107557 f0x0 RCU_GP_WAIT_FQS(5) ->state=0x402
rcu: Possible timer handling issue on cpu=0 timer-softirq=104983
rcu: rcu_preempt kthread starved for 10506 jiffies! g107557 f0x0 RCU_GP_WAIT_FQS(5) ->state=0x402 ->cpu=0
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:26712 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:1660
rcu_gp_kthread+0xa3/0x3a0 kernel/rcu/tree.c:1859
kthread+0x268/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 1 to CPUs 0:
NMI backtrace for cpu 0
CPU: 0 PID: 18859 Comm: syz-executor.1 Not tainted 6.1.23-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/30/2023
RIP: 0010:__lock_acquire+0x16e/0x1f80 kernel/locking/lockdep.c:4962
Code: 68 44 89 7c 24 60 44 8b a4 24 d0 00 00 00 48 c7 c0 80 60 f6 8f 48 29 c3 48 c1 fb 06 48 b9 ab aa aa aa aa aa aa aa 48 0f af cb <48> 89 c8 48 89 8c 24 80 00 00 00 41 89 cf 48 85 f6 4c 89 6c 24 48
RSP: 0018:ffffc90000007a60 EFLAGS: 00000803
RAX: ffffffff8ff66080 RBX: 0000000000002b50 RCX: 0000000000000e70
RDX: dffffc0000000000 RSI: 0000000000000001 RDI: ffff88808e668300
RBP: ffff888076d6c4c8 R08: 0000000000000001 R09: 0000000000000001
R10: 0000000000000000 R11: dffffc0000000001 R12: 0000000000000000
R13: ffff888076d6ba80 R14: ffff88808e668300 R15: 0000000000000001
FS: 000055555630d400(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ff948cdde00 CR3: 000000002259f000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<IRQ>
lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5669
__raw_spin_lock include/linux/spinlock_api_smp.h:133 [inline]
_raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:154
spin_lock include/linux/spinlock.h:350 [inline]
advance_sched+0x47/0x940 net/sched/sch_taprio.c:700
__run_hrtimer kernel/time/hrtimer.c:1685 [inline]
__hrtimer_run_queues+0x5e5/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:1096 [inline]
__sysvec_apic_timer_interrupt+0x156/0x580 arch/x86/kernel/apic/apic.c:1113
sysvec_apic_timer_interrupt+0x8c/0xb0 arch/x86/kernel/apic/apic.c:1107
</IRQ>
<TASK>
asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:649
RIP: 0010:lock_acquire+0x8/0x5a0 kernel/locking/lockdep.c:5637
Code: a4 52 8e e8 4a 0c 76 00 e9 a2 fd ff ff 0f 1f 44 00 00 65 8b 05 b1 cd 98 7e a9 00 ff ff 00 0f 95 c0 c3 55 48 89 e5 41 57 41 56 <41> 55 41 54 53 48 83 e4 e0 48 81 ec 20 01 00 00 4c 89 4c 24 28 4c
RSP: 0018:ffffc900033af578 EFLAGS: 00000246
RAX: ffffffff81c812fa RBX: ffff88807337c7f0 RCX: 0000000000000002
RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffffffff8cf26660
RBP: ffffc900033af588 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: dffffc0000000001 R12: 1ffff92000675ef7
R13: 1ffff92000675ef4 R14: 0000000000000000 R15: ffff88807337c7f0
rcu_lock_acquire+0x2a/0x30 include/linux/rcupdate.h:306
rcu_read_lock include/linux/rcupdate.h:747 [inline]
list_lru_count_one+0x20/0x280 mm/list_lru.c:184
list_lru_shrink_count include/linux/list_lru.h:122 [inline]
super_cache_count+0x130/0x280 fs/super.c:146
do_shrink_slab+0x7e/0xed0 mm/vmscan.c:793
shrink_slab_memcg mm/vmscan.c:915 [inline]
shrink_slab+0x574/0x8b0 mm/vmscan.c:994
shrink_node_memcgs mm/vmscan.c:6119 [inline]
shrink_node+0x767/0x2940 mm/vmscan.c:6148
shrink_zones mm/vmscan.c:6386 [inline]
do_try_to_free_pages+0x751/0x1a50 mm/vmscan.c:6448
try_to_free_mem_cgroup_pages+0x46f/0xb70 mm/vmscan.c:6763
reclaim_high+0x1dd/0x260 mm/memcontrol.c:2389
mem_cgroup_handle_over_high+0x146/0x2b0 mm/memcontrol.c:2574
resume_user_mode_work include/linux/resume_user_mode.h:58 [inline]
exit_to_user_mode_loop+0x96/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:0x7f53a8c8d5d7
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:00007ffd82fdf468 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6
RAX: ffffffffffffffea RBX: 00000000000002a4 RCX: 00007f53a8c8d5d7
RDX: 00007ffd82fdf53e RSI: 000000000000000a RDI: 00007ffd82fdf530
RBP: 00007ffd82fdf530 R08: 00000000ffffffff R09: 00007ffd82fdf300
R10: 000055555630e853 R11: 0000000000000246 R12: 00007f53a8ce6cdc
R13: 00007ffd82fe05f0 R14: 000055555630e810 R15: 00007ffd82fe0630
</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.

syzbot

unread,
Dec 27, 2023, 11:12:21 PM12/27/23
to syzkaller...@googlegroups.com
syzbot has found a reproducer for the following issue on:

HEAD commit: 4aa6747d9352 Linux 6.1.69
git tree: linux-6.1.y
console output: https://syzkaller.appspot.com/x/log.txt?x=1734c47ee80000
kernel config: https://syzkaller.appspot.com/x/.config?x=e1e9066810307299
dashboard link: https://syzkaller.appspot.com/bug?extid=a5ddd0a69ba3bcb6ca90
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=17e5a379e80000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=10bd0d31e80000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/209330361447/disk-4aa6747d.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/48aa2c86988d/vmlinux-4aa6747d.xz
kernel image: https://storage.googleapis.com/syzbot-assets/84320338eba6/bzImage-4aa6747d.xz

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

rcu: INFO: rcu_preempt detected stalls on CPUs/tasks:
(detected by 0, t=10502 jiffies, g=4589, q=23 ncpus=2)
rcu: All QSes seen, last rcu_preempt kthread activity 10503 (4294966651-4294956148), jiffies_till_next_fqs=1, root ->qsmask 0x0
rcu: rcu_preempt kthread starved for 10504 jiffies! g4589 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:26136 pid:16 ppid:2 flags:0x00004000
Call Trace:
<TASK>
context_switch kernel/sched/core.c:5245 [inline]
__schedule+0x142d/0x4550 kernel/sched/core.c:6558
schedule+0xbf/0x180 kernel/sched/core.c:6634
schedule_timeout+0x1b9/0x300 kernel/time/timer.c:1935
rcu_gp_fqs_loop+0x2d2/0x1120 kernel/rcu/tree.c:1674
rcu_gp_kthread+0xa3/0x3a0 kernel/rcu/tree.c:1873
kthread+0x28d/0x320 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: 3590 Comm: syz-executor161 Not tainted 6.1.69-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023
RIP: 0010:debug_spin_unlock kernel/locking/spinlock_debug.c:104 [inline]
RIP: 0010:do_raw_spin_unlock+0xdf/0x8a0 kernel/locking/spinlock_debug.c:140
Code: 03 84 c0 0f 85 ea 03 00 00 41 8b 06 65 8b 0d 08 6b 96 7e 39 c8 0f 85 c5 02 00 00 48 bd 00 00 00 00 00 fc ff df 41 80 3c 2c 00 <74> 08 4c 89 ef e8 c7 40 76 00 49 c7 45 00 ff ff ff ff 0f b6 04 2b
RSP: 0018:ffffc900001e0b20 EFLAGS: 00000046
RAX: 0000000000000001 RBX: 1ffff1100fe28251 RCX: 0000000000000001
RDX: 0000000000000000 RSI: 0000000000000004 RDI: ffff88807f141280
RBP: dffffc0000000000 R08: dffffc0000000000 R09: ffffed100fe28251
R10: 0000000000000000 R11: dffffc0000000001 R12: 1ffff1100fe28252
R13: ffff88807f141290 R14: ffff88807f141288 R15: ffff88807f141280
FS: 00005555567083c0(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000000002006b000 CR3: 000000007d256000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<NMI>
</NMI>
<IRQ>
__raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:150 [inline]
_raw_spin_unlock_irqrestore+0x7d/0x130 kernel/locking/spinlock.c:194
spin_unlock_irqrestore include/linux/spinlock.h:405 [inline]
unlock_task_sighand include/linux/sched/signal.h:753 [inline]
send_sigqueue+0x4cb/0x720 kernel/signal.c:2007
posix_timer_event kernel/time/posix-timers.c:354 [inline]
posix_timer_fn+0x186/0x390 kernel/time/posix-timers.c:380
__run_hrtimer kernel/time/hrtimer.c:1685 [inline]
__hrtimer_run_queues+0x5e5/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:653
RIP: 0010:__raw_spin_unlock_irq include/linux/spinlock_api_smp.h:160 [inline]
RIP: 0010:_raw_spin_unlock_irq+0x25/0x40 kernel/locking/spinlock.c:202
Code: 41 b8 f5 ff 90 53 48 89 fb 48 83 c7 18 48 8b 74 24 08 e8 be 30 d6 f6 48 89 df e8 26 6e d7 f6 e8 21 0b fd f6 fb bf 01 00 00 00 <e8> 06 fd c9 f6 65 8b 05 87 2f 6e 75 85 c0 74 02 5b c3 e8 c4 4d 6c
RSP: 0018:ffffc90003bbfb30 EFLAGS: 00000286
RAX: 2925e3de422cbe00 RBX: ffff88807f141280 RCX: ffffffff91c87103
RDX: dffffc0000000000 RSI: ffffffff8aebe6c0 RDI: 0000000000000001
RBP: ffffc90003bbfc70 R08: dffffc0000000000 R09: ffffed100fe28251
R10: 0000000000000000 R11: dffffc0000000001 R12: 1ffff1100fe282e3
R13: 000000001c000004 R14: 0000000000000021 R15: ffff88807f141718
spin_unlock_irq include/linux/spinlock.h:400 [inline]
get_signal+0x154b/0x17d0 kernel/signal.c:2865
arch_do_signal_or_restart+0xb0/0x1a10 arch/x86/kernel/signal.c:871
exit_to_user_mode_loop+0x6a/0x100 kernel/entry/common.c:168
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:87
entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7fbaa87fbe79
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 18 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffdb19123e8 EFLAGS: 00000246
RAX: 0000000000000000 RBX: 0000000000000003 RCX: 00007fbaa87fbe79
RDX: 000000002006b000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 00000000000f4240 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000002 R14: 00007ffdb1912460 R15: 00007ffdb1912450
</TASK>
INFO: NMI handler (nmi_cpu_backtrace_handler) took too long to run: 1.428 msecs


---
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.
Reply all
Reply to author
Forward
0 new messages