syzbot


INFO: rcu detected stall in sys_madvise

Status: upstream: reported on 2025/01/01 11:19
Reported-by: syzbot+89d414df4b598998aa4c@syzkaller.appspotmail.com
First crash: 13d, last: 13d
Similar bugs (5)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream INFO: rcu detected stall in sys_madvise scsi 1 526d 526d 0/28 auto-obsoleted due to no activity on 2023/11/05 19:10
linux-6.1 INFO: rcu detected stall in sys_madvise 1 197d 197d 0/3 auto-obsoleted due to no activity on 2024/10/10 08:27
android-5-15 BUG: soft lockup in sys_madvise 1 296d 296d 0/2 auto-obsoleted due to no activity on 2024/06/23 02:57
linux-4.19 BUG: soft lockup in sys_madvise 1 985d 985d 0/1 auto-obsoleted due to no activity on 2022/09/03 05:10
linux-4.19 BUG: soft lockup in sys_madvise (2) 1 851d 851d 0/1 auto-obsoleted due to no activity on 2023/01/14 20:18

Sample crash report:
rcu: INFO: rcu_preempt detected stalls on CPUs/tasks:
rcu: 	Tasks blocked on level-0 rcu_node (CPUs 0-1): P5358/1:b..l
	(detected by 1, t=10502 jiffies, g=13041, q=218)
task:syz.3.224       state:R  running task     stack:23808 pid: 5358 ppid:  4171 flags:0x00004004
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5027 [inline]
 __schedule+0x12c4/0x45b0 kernel/sched/core.c:6373
 preempt_schedule_irq+0xf7/0x1c0 kernel/sched/core.c:6777
 irqentry_exit+0x53/0x80 kernel/entry/common.c:432
 asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:676
RIP: 0010:lock_acquire+0x252/0x4f0 kernel/locking/lockdep.c:5627
Code: 2b 00 74 08 4c 89 f7 e8 cc 91 67 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:ffffc9000347ee00 EFLAGS: 00000206
RAX: 0000000000000001 RBX: 1ffff9200068fdcc RCX: 1ffff9200068fd6c
RDX: dffffc0000000000 RSI: ffffffff8aab3e20 RDI: ffffffff8af9f000
RBP: ffffc9000347ef48 R08: dffffc0000000000 R09: fffffbfff2131221
R10: 0000000000000000 R11: dffffc0000000001 R12: 1ffff9200068fdc8
R13: dffffc0000000000 R14: ffffc9000347ee60 R15: 0000000000000246
 rcu_lock_acquire+0x2a/0x30 include/linux/rcupdate.h:312
 rcu_read_lock include/linux/rcupdate.h:739 [inline]
 page_evictable+0x1c/0x2c0 mm/internal.h:101
 shrink_page_list+0x879/0x7540 mm/vmscan.c:1404
 reclaim_pages+0x82d/0xbc0 mm/vmscan.c:2417
 madvise_cold_or_pageout_pte_range+0x17fb/0x2090 mm/madvise.c:478
 walk_pmd_range mm/pagewalk.c:128 [inline]
 walk_pud_range mm/pagewalk.c:205 [inline]
 walk_p4d_range mm/pagewalk.c:240 [inline]
 walk_pgd_range+0xb28/0x13d0 mm/pagewalk.c:277
 __walk_page_range+0x137/0x5c0 mm/pagewalk.c:379
 walk_page_range+0x4aa/0x680 mm/pagewalk.c:477
 madvise_pageout_page_range mm/madvise.c:531 [inline]
 madvise_pageout mm/madvise.c:568 [inline]
 madvise_vma mm/madvise.c:998 [inline]
 do_madvise+0x1bb3/0x3470 mm/madvise.c:1207
 __do_sys_madvise mm/madvise.c:1233 [inline]
 __se_sys_madvise mm/madvise.c:1231 [inline]
 __x64_sys_madvise+0xa1/0xb0 mm/madvise.c:1231
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x66/0xd0
RIP: 0033:0x7f76f94a7d29
RSP: 002b:00007f76f7318038 EFLAGS: 00000246 ORIG_RAX: 000000000000001c
RAX: ffffffffffffffda RBX: 00007f76f9697fa0 RCX: 00007f76f94a7d29
RDX: 0000000000000015 RSI: 0000000000600000 RDI: 0000000020000000
RBP: 00007f76f9523b08 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007f76f9697fa0 R15: 00007ffeeca48af8
 </TASK>
rcu: rcu_preempt kthread timer wakeup didn't happen for 10097 jiffies! g13041 f0x0 RCU_GP_WAIT_FQS(5) ->state=0x402
rcu: 	Possible timer handling issue on cpu=0 timer-softirq=6172
rcu: rcu_preempt kthread starved for 10103 jiffies! g13041 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:27256 pid:   15 ppid:     2 flags:0x00004000
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5027 [inline]
 __schedule+0x12c4/0x45b0 kernel/sched/core.c:6373
 schedule+0x11b/0x1f0 kernel/sched/core.c:6456
 schedule_timeout+0x1b9/0x300 kernel/time/timer.c:1914
 rcu_gp_fqs_loop+0x2bf/0x1080 kernel/rcu/tree.c:1972
 rcu_gp_kthread+0xa4/0x360 kernel/rcu/tree.c:2145
 kthread+0x3f6/0x4f0 kernel/kthread.c:334
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287
 </TASK>
rcu: Stack dump where RCU GP kthread last ran:
Sending NMI from CPU 1 to CPUs 0:
NMI backtrace for cpu 0 skipped: idling at native_safe_halt arch/x86/include/asm/irqflags.h:51 [inline]
NMI backtrace for cpu 0 skipped: idling at arch_safe_halt arch/x86/include/asm/irqflags.h:89 [inline]
NMI backtrace for cpu 0 skipped: idling at acpi_safe_halt drivers/acpi/processor_idle.c:108 [inline]
NMI backtrace for cpu 0 skipped: idling at acpi_idle_do_entry+0x10f/0x340 drivers/acpi/processor_idle.c:562

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/01/01 11:18 linux-5.15.y 91786f140358 d3ccff63 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: rcu detected stall in sys_madvise
* Struck through repros no longer work on HEAD.