syzbot


INFO: rcu detected stall in sys_madvise

Status: upstream: reported on 2024/07/02 08:27
Reported-by: syzbot+2f107293dccdefff0e9b@syzkaller.appspotmail.com
First crash: 67d, last: 67d
Similar bugs (4)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream INFO: rcu detected stall in sys_madvise scsi 1 397d 397d 0/27 auto-obsoleted due to no activity on 2023/11/05 19:10
android-5-15 BUG: soft lockup in sys_madvise 1 166d 166d 0/2 auto-obsoleted due to no activity on 2024/06/23 02:57
linux-4.19 BUG: soft lockup in sys_madvise 1 855d 855d 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 722d 722d 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): P9392/1:b..l
	(detected by 0, t=10502 jiffies, g=53093, q=271 ncpus=2)
task:syz.0.1664      state:R  running task     stack:24920 pid:9392  ppid:6989   flags:0x00004000
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5245 [inline]
 __schedule+0x142d/0x4550 kernel/sched/core.c:6558
 preempt_schedule_irq+0xf7/0x1c0 kernel/sched/core.c:6870
 irqentry_exit+0x53/0x80 kernel/entry/common.c:439
 asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:653
RIP: 0010:lock_acquire+0x26f/0x5a0 kernel/locking/lockdep.c:5666
Code: 2b 00 74 08 4c 89 f7 e8 3f ac 77 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:ffffc9000311eb60 EFLAGS: 00000206
RAX: 0000000000000001 RBX: 1ffff92000623d78 RCX: 1ffff92000623d18
RDX: dffffc0000000000 RSI: ffffffff8aec13c0 RDI: ffffffff8b3d4760
RBP: ffffc9000311ecb0 R08: dffffc0000000000 R09: fffffbfff2093845
R10: 0000000000000000 R11: dffffc0000000001 R12: 1ffff92000623d74
R13: dffffc0000000000 R14: ffffc9000311ebc0 R15: 0000000000000246
 rcu_lock_acquire include/linux/rcupdate.h:350 [inline]
 rcu_read_lock include/linux/rcupdate.h:791 [inline]
 is_bpf_text_address+0x3e/0x2a0 kernel/bpf/core.c:731
 kernel_text_address+0x9f/0xd0 kernel/extable.c:125
 __kernel_text_address+0x9/0x40 kernel/extable.c:79
 unwind_get_return_address+0x49/0x80 arch/x86/kernel/unwind_orc.c:323
 arch_stack_walk+0xf3/0x140 arch/x86/kernel/stacktrace.c:26
 stack_trace_save+0x113/0x1c0 kernel/stacktrace.c:122
 save_stack+0xf6/0x1e0 mm/page_owner.c:127
 __set_page_owner+0x26/0x390 mm/page_owner.c:190
 set_page_owner include/linux/page_owner.h:31 [inline]
 post_alloc_hook+0x18d/0x1b0 mm/page_alloc.c:2513
 prep_new_page mm/page_alloc.c:2520 [inline]
 get_page_from_freelist+0x31a1/0x3320 mm/page_alloc.c:4279
 __alloc_pages+0x28d/0x770 mm/page_alloc.c:5547
 __folio_alloc+0xf/0x30 mm/page_alloc.c:5579
 vma_alloc_folio+0x486/0x990 mm/mempolicy.c:2243
 alloc_page_vma include/linux/gfp.h:284 [inline]
 do_anonymous_page mm/memory.c:4172 [inline]
 handle_pte_fault mm/memory.c:5011 [inline]
 __handle_mm_fault mm/memory.c:5155 [inline]
 handle_mm_fault+0x2e90/0x5340 mm/memory.c:5276
 faultin_page mm/gup.c:1009 [inline]
 __get_user_pages+0x4f3/0x1190 mm/gup.c:1233
 faultin_vma_page_range+0x21b/0x2b0 mm/gup.c:1653
 madvise_populate mm/madvise.c:919 [inline]
 madvise_vma_behavior mm/madvise.c:1028 [inline]
 madvise_walk_vmas mm/madvise.c:1250 [inline]
 do_madvise+0x16be/0x4470 mm/madvise.c:1429
 __do_sys_madvise mm/madvise.c:1442 [inline]
 __se_sys_madvise mm/madvise.c:1440 [inline]
 __x64_sys_madvise+0xa1/0xb0 mm/madvise.c:1440
 do_syscall_x64 arch/x86/entry/common.c:51 [inline]
 do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81
 entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f6567575b99
RSP: 002b:00007f6568299048 EFLAGS: 00000246 ORIG_RAX: 000000000000001c
RAX: ffffffffffffffda RBX: 00007f6567703fa0 RCX: 00007f6567575b99
RDX: 0000000000000017 RSI: 0000000000800000 RDI: 00000000200ec000
RBP: 00007f65675f677e R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 000000000000000b R14: 00007f6567703fa0 R15: 00007fff88ef9f98
 </TASK>
rcu: rcu_preempt kthread starved for 10512 jiffies! g53093 f0x0 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:27064 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:1965
 rcu_gp_fqs_loop+0x2d2/0x1150 kernel/rcu/tree.c:1706
 rcu_gp_kthread+0xa3/0x3b0 kernel/rcu/tree.c:1905
 kthread+0x28d/0x320 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308
 </TASK>
rcu: Stack dump where RCU GP kthread last ran:
Sending NMI from CPU 0 to CPUs 1:
NMI backtrace for cpu 1 skipped: idling at native_safe_halt arch/x86/include/asm/irqflags.h:51 [inline]
NMI backtrace for cpu 1 skipped: idling at arch_safe_halt arch/x86/include/asm/irqflags.h:89 [inline]
NMI backtrace for cpu 1 skipped: idling at acpi_safe_halt drivers/acpi/processor_idle.c:112 [inline]
NMI backtrace for cpu 1 skipped: idling at acpi_idle_do_entry+0x10f/0x340 drivers/acpi/processor_idle.c:572

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/07/02 08:26 linux-6.1.y 99e6a620de00 b294e901 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan INFO: rcu detected stall in sys_madvise
* Struck through repros no longer work on HEAD.