syzbot


INFO: rcu detected stall in shmem_fault (2)

Status: upstream: reported on 2024/12/17 16:40
Reported-by: syzbot+ed7102c3fd41447141e8@syzkaller.appspotmail.com
First crash: 58d, last: 31d
Similar bugs (9)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream INFO: rcu detected stall in shmem_fault (4) kernel 1 776d 776d 0/28 auto-obsoleted due to no activity on 2023/04/08 07:17
linux-5.15 INFO: rcu detected stall in shmem_fault (2) 9 2h34m 255d 0/3 upstream: reported on 2024/06/03 20:13
upstream INFO: rcu detected stall in shmem_fault mm 13 2159d 2319d 0/28 closed as dup on 2019/01/02 16:58
linux-6.1 INFO: rcu detected stall in shmem_fault 7 187d 251d 0/3 auto-obsoleted due to no activity on 2024/11/18 20:23
upstream INFO: rcu detected stall in shmem_fault (5) cgroups mm 3 546d 566d 23/28 fixed on 2023/10/12 12:48
linux-5.15 INFO: rcu detected stall in shmem_fault 1 530d 530d 0/3 auto-obsoleted due to no activity on 2023/12/11 11:17
upstream INFO: rcu detected stall in shmem_fault (3) fs mm 4 1025d 1025d 0/28 auto-closed as invalid on 2022/06/25 08:10
upstream INFO: rcu detected stall in shmem_fault (2) cgroups mm 1 1898d 1898d 0/28 closed as invalid on 2019/12/04 14:04
upstream INFO: rcu detected stall in shmem_fault (6) mm 78 3d20h 147d 0/28 upstream: reported on 2024/09/19 14:28

Sample crash report:
rcu: INFO: rcu_preempt detected stalls on CPUs/tasks:
rcu: 	Tasks blocked on level-0 rcu_node (CPUs 0-1): P10950/1:b..l
	(detected by 1, t=10502 jiffies, g=48641, q=128 ncpus=2)
task:syz.3.1505      state:R  running task     stack:24600 pid:10950 ppid:4247   flags:0x00004004
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:691
RIP: 0010:kasan_check_range+0x1/0x290 mm/kasan/generic.c:188
Code: 01 c6 48 89 c7 e8 df 31 d1 08 31 c0 c3 0f 0b b8 ea ff ff ff c3 0f 0b b8 ea ff ff ff c3 cc cc cc cc cc cc cc cc cc cc cc cc 55 <41> 57 41 56 53 b0 01 48 85 f6 0f 84 9a 01 00 00 48 89 fd 48 01 f5
RSP: 0018:ffffc900037471d0 EFLAGS: 00000246
RAX: 0000000000000000 RBX: 0000000000000001 RCX: ffffffff816aa21b
RDX: 0000000000000000 RSI: 0000000000000008 RDI: ffffffff8e9b0ba8
RBP: ffffc90003747340 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: dffffc0000000001 R12: 1ffff920006e8e44
R13: dffffc0000000000 R14: 0000000000000000 R15: dffffc0000000000
 instrument_atomic_read include/linux/instrumented.h:72 [inline]
 _test_bit include/asm-generic/bitops/instrumented-non-atomic.h:141 [inline]
 cpumask_test_cpu include/linux/cpumask.h:444 [inline]
 cpu_online include/linux/cpumask.h:1030 [inline]
 trace_lock_acquire include/trace/events/lock.h:24 [inline]
 lock_acquire+0xeb/0x5a0 kernel/locking/lockdep.c:5633
 rcu_lock_acquire include/linux/rcupdate.h:350 [inline]
 rcu_read_lock include/linux/rcupdate.h:791 [inline]
 blk_cgroup_congested+0x36/0x220 block/blk-cgroup.c:2001
 __cgroup_throttle_swaprate+0x6d/0x1b0 mm/swapfile.c:3671
 cgroup_throttle_swaprate include/linux/swap.h:662 [inline]
 folio_throttle_swaprate include/linux/swap.h:671 [inline]
 shmem_add_to_page_cache+0xb90/0x1e60 mm/shmem.c:717
 shmem_get_folio_gfp+0x164e/0x3470 mm/shmem.c:1971
 shmem_fault+0x235/0x9c0 mm/shmem.c:2156
 __do_fault+0x136/0x4f0 mm/memory.c:4278
 do_read_fault mm/memory.c:4629 [inline]
 do_fault mm/memory.c:4758 [inline]
 handle_pte_fault mm/memory.c:5029 [inline]
 __handle_mm_fault mm/memory.c:5171 [inline]
 handle_mm_fault+0x3410/0x5340 mm/memory.c:5292
 faultin_page mm/gup.c:1009 [inline]
 __get_user_pages+0x4f3/0x1190 mm/gup.c:1233
 populate_vma_page_range+0x217/0x2b0 mm/gup.c:1590
 __mm_populate+0x275/0x440 mm/gup.c:1704
 mm_populate include/linux/mm.h:2801 [inline]
 vm_mmap_pgoff+0x22b/0x2d0 mm/util.c:525
 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:0x7f7cbcb85d29
RSP: 002b:00007f7cbda2f038 EFLAGS: 00000246 ORIG_RAX: 0000000000000009
RAX: ffffffffffffffda RBX: 00007f7cbcd75fa0 RCX: 00007f7cbcb85d29
RDX: b635773f06ebbeef RSI: 0000000000b36000 RDI: 0000000020000000
RBP: 00007f7cbcc01b08 R08: ffffffffffffffff R09: 0000000000000000
R10: 0000000000008031 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007f7cbcd75fa0 R15: 00007ffcc538c9d8
 </TASK>
rcu: rcu_preempt kthread starved for 10131 jiffies! g48641 f0x0 RCU_GP_WAIT_FQS(5) ->state=0x0 ->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:R  running task     stack:25528 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 1 to CPUs 0:
NMI backtrace for cpu 0
CPU: 0 PID: 10965 Comm: syz.4.1509 Not tainted 6.1.124-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
RIP: 0010:native_save_fl arch/x86/include/asm/irqflags.h:22 [inline]
RIP: 0010:arch_local_save_flags arch/x86/include/asm/irqflags.h:70 [inline]
RIP: 0010:arch_irqs_disabled arch/x86/include/asm/irqflags.h:130 [inline]
RIP: 0010:lock_acquire+0x234/0x5a0 kernel/locking/lockdep.c:5665
Code: ff ff ff 65 0f c1 05 7b d5 97 7e 83 f8 01 0f 85 a4 01 00 00 49 89 de 48 c1 eb 03 42 80 3c 2b 00 74 08 4c 89 f7 e8 3c 8f 77 00 <48> c7 44 24 60 00 00 00 00 9c 8f 44 24 60 42 80 3c 2b 00 74 08 4c
RSP: 0018:ffffc900038a76e0 EFLAGS: 00000046
RAX: 0000000000000001 RBX: 1ffff92000714ee8 RCX: ffffffff816b5ea2
RDX: dffffc0000000000 RSI: ffffffff8b0c14c0 RDI: ffffffff8b5e6840
RBP: ffffc900038a7828 R08: dffffc0000000000 R09: fffffbfff2249c4e
R10: 0000000000000000 R11: dffffc0000000001 R12: 1ffff92000714ee4
R13: dffffc0000000000 R14: ffffc900038a7740 R15: 0000000000000046
FS:  00007f0367acf6c0(0000) GS:ffff8880b8e00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f54ab5917e7 CR3: 000000007c682000 CR4: 00000000003506f0
Call Trace:
 <NMI>
 </NMI>
 <TASK>
 seqcount_lockdep_reader_access+0xf8/0x220 include/linux/seqlock.h:102
 ktime_get+0x31/0x270 kernel/time/timekeeping.c:846
 common_hrtimer_rearm+0x60/0x110 kernel/time/posix-timers.c:302
 posixtimer_rearm+0x1ad/0x3f0 kernel/time/posix-timers.c:328
 dequeue_signal+0x245/0x590 kernel/signal.c:704
 get_signal+0x5f2/0x17d0 kernel/signal.c:2751
 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:0x7f0366d85d27
Code: ff ff ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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 a8 ff ff ff f7 d8 64 89
RSP: 002b:00007f0367acf0e8 EFLAGS: 00000246
RAX: 00000000000000ca RBX: 00007f0366f76088 RCX: 00007f0366d85d29
RDX: 0000000000000000 RSI: 0000000000000080 RDI: 00007f0366f76088
RBP: 00007f0366f76080 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f0366f7608c
R13: 0000000000000000 R14: 00007ffdac12e320 R15: 00007ffdac12e408
 </TASK>

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/01/13 20:48 linux-6.1.y c63962be84ef 249ceea9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan INFO: rcu detected stall in shmem_fault
2024/12/17 16:40 linux-6.1.y 52f863f820fd f93b2b55 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan INFO: rcu detected stall in shmem_fault
* Struck through repros no longer work on HEAD.