syzbot


INFO: rcu detected stall in filemap_fault

Status: upstream: reported on 2024/09/05 23:08
Reported-by: syzbot+ad18c8225786ffd7577f@syzkaller.appspotmail.com
First crash: 81d, last: 72d
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream INFO: rcu detected stall in filemap_fault mm 1 2242d 2240d 0/28 closed as dup on 2019/01/02 16:20
upstream INFO: rcu detected stall in filemap_fault (2) mm fs 7 1112d 1133d 0/28 auto-closed as invalid on 2022/02/07 21:39
linux-5.15 INFO: rcu detected stall in filemap_fault 2 94d 97d 0/3 upstream: reported on 2024/08/21 15:28

Sample crash report:
rcu: INFO: rcu_preempt detected stalls on CPUs/tasks:
rcu: 	Tasks blocked on level-0 rcu_node (CPUs 0-1): P3756/1:b..l P3806/1:b..l P3810/1:b..l
	(detected by 0, t=10502 jiffies, g=7009, q=21 ncpus=2)
task:syz.2.18        state:R  running task     stack:21688 pid:3810  ppid:3799   flags:0x00004000
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5241 [inline]
 __schedule+0x143f/0x4570 kernel/sched/core.c:6558
 preempt_schedule_common+0x83/0xd0 kernel/sched/core.c:6727
 preempt_schedule+0xd9/0xe0 kernel/sched/core.c:6751
 preempt_schedule_thunk+0x16/0x18 arch/x86/entry/thunk_64.S:34
 __raw_spin_unlock include/linux/spinlock_api_smp.h:143 [inline]
 _raw_spin_unlock+0x36/0x40 kernel/locking/spinlock.c:186
 spin_unlock include/linux/spinlock.h:391 [inline]
 filemap_map_pages+0xffa/0x12c0 mm/filemap.c:3470
 do_fault_around mm/memory.c:4581 [inline]
 do_read_fault mm/memory.c:4607 [inline]
 do_fault mm/memory.c:4741 [inline]
 handle_pte_fault mm/memory.c:5012 [inline]
 __handle_mm_fault mm/memory.c:5154 [inline]
 handle_mm_fault+0x33e0/0x5340 mm/memory.c:5275
 faultin_page mm/gup.c:1009 [inline]
 __get_user_pages+0x4f3/0x1190 mm/gup.c:1233
 __get_user_pages_locked mm/gup.c:1437 [inline]
 get_dump_page+0x1ad/0x8a0 mm/gup.c:1935
 dump_user_range+0x111/0x8e0 fs/coredump.c:906
 elf_core_dump+0x3d2b/0x4590 fs/binfmt_elf.c:2313
 do_coredump+0x18b7/0x2700 fs/coredump.c:755
 get_signal+0x1454/0x17d0 kernel/signal.c:2856
 arch_do_signal_or_restart+0xb0/0x1a10 arch/x86/kernel/signal.c:871
 exit_to_user_mode_loop+0x6a/0x100 kernel/entry/common.c:174
 exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:210
 irqentry_exit_to_user_mode+0x5/0x30 kernel/entry/common.c:316
 exc_page_fault+0x1c0/0x620 arch/x86/mm/fault.c:1490
 asm_exc_page_fault+0x22/0x30 arch/x86/include/asm/idtentry.h:570
RIP: 0033:0x7fef06040397
RSP: 002b:00007fef06f88120 EFLAGS: 00010202
RAX: 0000000000000000 RBX: 000000000000000b RCX: 00007fef0617def9
RDX: 00007fef06f88140 RSI: 00007fef06f88270 RDI: 000000000000000b
RBP: 00007fef061f0b76 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000206 R12: 0000000000000000
R13: 0000000000000000 R14: 00007fef06336130 R15: 00007ffdae1ea718
 </TASK>
task:syz.3.21        state:R  running task     stack:25016 pid:3806  ppid:3638   flags:0x00004000
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5241 [inline]
 __schedule+0x143f/0x4570 kernel/sched/core.c:6558
 preempt_schedule_common+0x83/0xd0 kernel/sched/core.c:6727
 preempt_schedule+0xd9/0xe0 kernel/sched/core.c:6751
 preempt_schedule_thunk+0x16/0x18 arch/x86/entry/thunk_64.S:34
 unwind_next_frame+0x1a55/0x2220 arch/x86/kernel/unwind_orc.c:629
 arch_stack_walk+0x10d/0x140 arch/x86/kernel/stacktrace.c:25
 stack_trace_save+0x113/0x1c0 kernel/stacktrace.c:122
 save_stack+0xf6/0x1e0 mm/page_owner.c:127
 __reset_page_owner+0x52/0x1a0 mm/page_owner.c:148
 reset_page_owner include/linux/page_owner.h:24 [inline]
 free_pages_prepare mm/page_alloc.c:1444 [inline]
 free_pcp_prepare mm/page_alloc.c:1494 [inline]
 free_unref_page_prepare+0xf63/0x1120 mm/page_alloc.c:3369
 free_unref_page_list+0x663/0x900 mm/page_alloc.c:3510
 release_pages+0x2836/0x2b40 mm/swap.c:1055
 tlb_batch_pages_flush mm/mmu_gather.c:59 [inline]
 tlb_flush_mmu_free mm/mmu_gather.c:254 [inline]
 tlb_flush_mmu+0xfc/0x210 mm/mmu_gather.c:261
 zap_pte_range mm/memory.c:1525 [inline]
 zap_pmd_range mm/memory.c:1574 [inline]
 zap_pud_range mm/memory.c:1603 [inline]
 zap_p4d_range mm/memory.c:1624 [inline]
 unmap_page_range+0x217c/0x2740 mm/memory.c:1645
 unmap_vmas+0x48b/0x640 mm/memory.c:1730
 exit_mmap+0x252/0x9f0 mm/mmap.c:3227
 __mmput+0x115/0x3c0 kernel/fork.c:1199
 exit_mm+0x226/0x300 kernel/exit.c:565
 do_exit+0x9f6/0x26a0 kernel/exit.c:858
 do_group_exit+0x202/0x2b0 kernel/exit.c:1021
 get_signal+0x16f7/0x17d0 kernel/signal.c:2870
 arch_do_signal_or_restart+0xb0/0x1a10 arch/x86/kernel/signal.c:871
 exit_to_user_mode_loop+0x6a/0x100 kernel/entry/common.c:174
 exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:210
 __syscall_exit_to_user_mode_work kernel/entry/common.c:292 [inline]
 syscall_exit_to_user_mode+0x60/0x270 kernel/entry/common.c:303
 do_syscall_64+0x47/0xb0 arch/x86/entry/common.c:87
 entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f951e57def9
RSP: 002b:00007f951f28f038 EFLAGS: 00000246 ORIG_RAX: 0000000000000136
RAX: 00000000005f7b80 RBX: 00007f951e735f80 RCX: 00007f951e57def9
RDX: 0000000000000002 RSI: 0000000020008400 RDI: 0000000000000015
RBP: 00007f951e5f0b76 R08: 0000000000000286 R09: 0000000000000000
R10: 0000000020008640 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007f951e735f80 R15: 00007ffe0e71da98
 </TASK>
task:syz.1.2         state:R  running task     stack:21592 pid:3756  ppid:3635   flags:0x00004000
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5241 [inline]
 __schedule+0x143f/0x4570 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_is_held_type+0x137/0x180
Code: 75 40 48 c7 04 24 00 00 00 00 9c 8f 04 24 f7 04 24 00 02 00 00 75 46 41 f7 c4 00 02 00 00 74 01 fb 65 48 8b 04 25 28 00 00 00 <48> 3b 44 24 08 75 3c 89 e8 48 83 c4 10 5b 41 5c 41 5d 41 5e 41 5f
RSP: 0018:ffffc90004646530 EFLAGS: 00000206
RAX: da8a849b4903e500 RBX: 0000000000000002 RCX: 0000000080000000
RDX: ffff88802e609dc0 RSI: ffffffff8b0c14c0 RDI: ffffffff8b5d6dc0
RBP: 0000000000000001 R08: ffffffff8aa302f9 R09: fffffbfff223b845
R10: 0000000000000000 R11: dffffc0000000001 R12: 0000000000000246
R13: ffff88802e609dc0 R14: 00000000ffffffff R15: ffffffff8d32b000
 xa_entry include/linux/xarray.h:1198 [inline]
 xas_descend+0x120/0x470 lib/xarray.c:204
 xas_load lib/xarray.c:242 [inline]
 xa_load+0x288/0x480 lib/xarray.c:1463
 __readahead_folio include/linux/pagemap.h:1287 [inline]
 readahead_page include/linux/pagemap.h:1305 [inline]
 ext4_mpage_readpages+0x49d/0x2eb0 fs/ext4/readpage.c:256
 read_pages+0x17f/0x830 mm/readahead.c:161
 page_cache_ra_unbounded+0x68b/0x7b0 mm/readahead.c:270
 do_async_mmap_readahead mm/filemap.c:3135 [inline]
 filemap_fault+0x797/0x17e0 mm/filemap.c:3189
 __do_fault+0x136/0x4f0 mm/memory.c:4261
 do_read_fault mm/memory.c:4612 [inline]
 do_fault mm/memory.c:4741 [inline]
 handle_pte_fault mm/memory.c:5012 [inline]
 __handle_mm_fault mm/memory.c:5154 [inline]
 handle_mm_fault+0x3410/0x5340 mm/memory.c:5275
 faultin_page mm/gup.c:1009 [inline]
 __get_user_pages+0x4f3/0x1190 mm/gup.c:1233
 __get_user_pages_locked mm/gup.c:1437 [inline]
 get_dump_page+0x1ad/0x8a0 mm/gup.c:1935
 dump_user_range+0x111/0x8e0 fs/coredump.c:906
 elf_core_dump+0x3d2b/0x4590 fs/binfmt_elf.c:2313
 do_coredump+0x18b7/0x2700 fs/coredump.c:755
 get_signal+0x1454/0x17d0 kernel/signal.c:2856
 arch_do_signal_or_restart+0xb0/0x1a10 arch/x86/kernel/signal.c:871
 exit_to_user_mode_loop+0x6a/0x100 kernel/entry/common.c:174
 exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:210
 irqentry_exit_to_user_mode+0x5/0x30 kernel/entry/common.c:316
 exc_page_fault+0x1c0/0x620 arch/x86/mm/fault.c:1490
 asm_exc_page_fault+0x22/0x30 arch/x86/include/asm/idtentry.h:570
RIP: 0033:0x7fa4dc040397
RSP: 002b:00007fa4dd034120 EFLAGS: 00010202
RAX: 0000000000000000 RBX: 000000000000000b RCX: 00007fa4dc17def9
RDX: 00007fa4dd034140 RSI: 00007fa4dd034270 RDI: 000000000000000b
RBP: 00007fa4dc1f0b76 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000206 R12: 0000000000000000
R13: 0000000000000000 R14: 00007fa4dc335f80 R15: 00007ffeb9f08858
 </TASK>
rcu: rcu_preempt kthread starved for 10635 jiffies! g7009 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:26144 pid:16    ppid:2      flags:0x00004000
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5241 [inline]
 __schedule+0x143f/0x4570 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:295
 </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:111 [inline]
NMI backtrace for cpu 1 skipped: idling at acpi_idle_do_entry+0x10f/0x340 drivers/acpi/processor_idle.c:567
sched: RT throttling activated

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/09/15 06:36 linux-6.1.y 5f55cad62cc9 08d8a733 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan INFO: rcu detected stall in filemap_fault
2024/09/05 23:08 linux-6.1.y 699506173494 464ac2ed .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan INFO: rcu detected stall in filemap_fault
* Struck through repros no longer work on HEAD.