syzbot


INFO: rcu detected stall in shmem_file_read_iter

Status: auto-obsoleted due to no activity on 2024/10/12 13:39
Reported-by: syzbot+a69de010557b83bf5a59@syzkaller.appspotmail.com
First crash: 155d, last: 140d
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream INFO: rcu detected stall in shmem_file_read_iter mm 1 603d 603d 0/28 auto-obsoleted due to no activity on 2023/06/27 05:37
upstream INFO: rcu detected stall in shmem_file_read_iter (2) fs 1 101d 101d 0/28 auto-obsoleted due to no activity on 2024/11/10 10:10

Sample crash report:
rcu: INFO: rcu_preempt detected stalls on CPUs/tasks:
rcu: 	Tasks blocked on level-0 rcu_node (CPUs 0-1): P4269/1:b..l
	(detected by 0, t=10502 jiffies, g=64937, q=75)
task:kworker/u4:12   state:R  running task     stack:21312 pid: 4269 ppid:     2 flags:0x00004000
Workqueue: loop0 loop_rootcg_workfn
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5030 [inline]
 __schedule+0x12c4/0x45b0 kernel/sched/core.c:6376
 preempt_schedule_irq+0xf7/0x1c0 kernel/sched/core.c:6780
 irqentry_exit+0x53/0x80 kernel/entry/common.c:432
 asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:638
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:ffffc90002fb71e8 EFLAGS: 00000206
RAX: bb070ac8d33b9100 RBX: 0000000000000003 RCX: ffff88801c723b80
RDX: ffff88801c723b80 RSI: ffffffff8a8b3ca0 RDI: ffffffff8ad8f740
RBP: 0000000000000000 R08: ffffffff842f9ebd R09: fffffbfff1f7f219
R10: 0000000000000000 R11: dffffc0000000001 R12: 0000000000000246
R13: ffff88801c723b80 R14: 00000000ffffffff R15: ffff888069469c50
 lock_is_held include/linux/lockdep.h:287 [inline]
 xa_entry include/linux/xarray.h:1182 [inline]
 xas_descend+0xe2/0x3a0 lib/xarray.c:204
 xas_load+0xba/0x140 lib/xarray.c:240
 mapping_get_entry mm/filemap.c:1826 [inline]
 pagecache_get_page+0x20f/0x1010 mm/filemap.c:1894
 shmem_getpage_gfp+0x36c/0x3190 mm/shmem.c:1841
 shmem_getpage mm/shmem.c:151 [inline]
 shmem_file_read_iter+0x2a1/0xc10 mm/shmem.c:2566
 do_iter_readv_writev+0x594/0x7a0
 do_iter_read+0x1ec/0x760 fs/read_write.c:790
 lo_read_simple drivers/block/loop.c:392 [inline]
 do_req_filebacked drivers/block/loop.c:663 [inline]
 loop_handle_cmd drivers/block/loop.c:2234 [inline]
 loop_process_work+0x1d18/0x2af0 drivers/block/loop.c:2274
 process_one_work+0x8a1/0x10c0 kernel/workqueue.c:2310
 worker_thread+0xaca/0x1280 kernel/workqueue.c:2457
 kthread+0x3f6/0x4f0 kernel/kthread.c:334
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:300
 </TASK>
rcu: rcu_preempt kthread starved for 10537 jiffies! g64937 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:27064 pid:   15 ppid:     2 flags:0x00004000
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5030 [inline]
 __schedule+0x12c4/0x45b0 kernel/sched/core.c:6376
 schedule+0x11b/0x1f0 kernel/sched/core.c:6459
 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:300
 </TASK>
rcu: Stack dump where RCU GP kthread last ran:
NMI backtrace for cpu 0
CPU: 0 PID: 9869 Comm: syz.3.1451 Not tainted 5.15.161-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024
Call Trace:
 <IRQ>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x1e3/0x2d0 lib/dump_stack.c:106
 nmi_cpu_backtrace+0x46a/0x4a0 lib/nmi_backtrace.c:111
 nmi_trigger_cpumask_backtrace+0x181/0x2a0 lib/nmi_backtrace.c:62
 trigger_single_cpu_backtrace include/linux/nmi.h:166 [inline]
 rcu_check_gp_kthread_starvation+0x1d2/0x240 kernel/rcu/tree_stall.h:487
 print_other_cpu_stall+0x137a/0x14d0 kernel/rcu/tree_stall.h:592
 check_cpu_stall kernel/rcu/tree_stall.h:745 [inline]
 rcu_pending kernel/rcu/tree.c:3932 [inline]
 rcu_sched_clock_irq+0xa38/0x1150 kernel/rcu/tree.c:2619
 update_process_times+0x196/0x200 kernel/time/timer.c:1818
 tick_sched_handle kernel/time/tick-sched.c:254 [inline]
 tick_sched_timer+0x386/0x550 kernel/time/tick-sched.c:1473
 __run_hrtimer kernel/time/hrtimer.c:1686 [inline]
 __hrtimer_run_queues+0x55b/0xcf0 kernel/time/hrtimer.c:1750
 hrtimer_interrupt+0x392/0x980 kernel/time/hrtimer.c:1812
 local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1085 [inline]
 __sysvec_apic_timer_interrupt+0x139/0x470 arch/x86/kernel/apic/apic.c:1102
 sysvec_apic_timer_interrupt+0x8c/0xb0 arch/x86/kernel/apic/apic.c:1096
 </IRQ>
 <TASK>
 asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:638
RIP: 0010:lock_acquire+0x252/0x4f0 kernel/locking/lockdep.c:5627
Code: 2b 00 74 08 4c 89 f7 e8 0c 7e 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:ffffc900026f7900 EFLAGS: 00000206
RAX: 0000000000000001 RBX: 1ffff920004def2c RCX: ffffffff81636252
RDX: dffffc0000000000 RSI: ffffffff8a8b3ca0 RDI: ffffffff8ad8f740
RBP: ffffc900026f7a58 R08: dffffc0000000000 R09: fffffbfff1f7f21f
R10: 0000000000000000 R11: dffffc0000000001 R12: 1ffff920004def28
R13: dffffc0000000000 R14: ffffc900026f7960 R15: 0000000000000246
 __might_fault+0xb4/0x110 mm/memory.c:5328
 __copy_from_user include/linux/uaccess.h:109 [inline]
 check_xstate_in_sigframe arch/x86/kernel/fpu/signal.c:33 [inline]
 __fpu_restore_sig arch/x86/kernel/fpu/signal.c:317 [inline]
 fpu__restore_sig+0x1db/0x1100 arch/x86/kernel/fpu/signal.c:466
 restore_sigcontext+0x638/0x710 arch/x86/kernel/signal.c:139
 __do_sys_rt_sigreturn+0x190/0x250 arch/x86/kernel/signal.c:674
 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:0x7fb7f879dbd9
Code: 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 01 48
RSP: 002b:00007ffdb7af0ed8 EFLAGS: 00000246
RAX: fffffffffffffffc RBX: 000000000006cafe RCX: 00007fb7f879dbd9
RDX: 0000000000000000 RSI: 0000000000000080 RDI: 00007fb7f892c044
RBP: 000000000006cacc R08: 0000000000000010 R09: 0000001ab7af120f
R10: 00007ffdb7af0fc0 R11: 0000000000000246 R12: 00007fb7f892c044
R13: 0000000000000032 R14: 00007ffdb7af0fe0 R15: 00007ffdb7af0fc0
 </TASK>

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/07/04 13:38 linux-5.15.y 4878aadf2d15 3f2748a3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: rcu detected stall in shmem_file_read_iter
2024/06/18 17:38 linux-5.15.y 4878aadf2d15 639d6cdf .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: rcu detected stall in shmem_file_read_iter
* Struck through repros no longer work on HEAD.