syzbot


INFO: rcu detected stall in shmem_file_write_iter

Status: auto-obsoleted due to no activity on 2024/03/27 04:51
Subsystems: mm
[Documentation on labels]
First crash: 224d, last: 181d
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream INFO: rcu detected stall in shmem_file_write_iter (2) mm 83 2d00h 30d 0/27 upstream: reported on 2024/05/26 22:55

Sample crash report:
rcu: INFO: rcu_preempt detected stalls on CPUs/tasks:
rcu: 	Tasks blocked on level-0 rcu_node (CPUs 0-1): P28632/2:b..l
rcu: 	(detected by 1, t=10503 jiffies, g=111573, q=193 ncpus=2)
task:syz-executor.5  state:R  running task     stack:25296 pid:28632 tgid:28631 ppid:19042  flags:0x00004002
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5376 [inline]
 __schedule+0x1961/0x4ab0 kernel/sched/core.c:6688
 preempt_schedule_irq+0xfb/0x1b0 kernel/sched/core.c:7008
 irqentry_exit+0x5a/0x80 kernel/entry/common.c:432
 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:649
RIP: 0010:lock_acquire+0x25a/0x530 kernel/locking/lockdep.c:5758
Code: 2b 00 74 08 4c 89 f7 e8 54 58 7d 00 f6 44 24 61 02 0f 85 8a 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:ffffc9000b17f620 EFLAGS: 00000206
RAX: 0000000000000001 RBX: 1ffff9200162fed0 RCX: 0000000000000001
RDX: dffffc0000000000 RSI: ffffffff8b6ab6e0 RDI: ffffffff8bbde160
RBP: ffffc9000b17f770 R08: ffffffff90dd7367 R09: 1ffffffff21bae6c
R10: dffffc0000000000 R11: fffffbfff21bae6d R12: 1ffff9200162fecc
R13: dffffc0000000000 R14: ffffc9000b17f680 R15: 0000000000000246
 rcu_lock_acquire include/linux/rcupdate.h:301 [inline]
 rcu_read_lock include/linux/rcupdate.h:747 [inline]
 percpu_ref_tryget_many include/linux/percpu-refcount.h:241 [inline]
 percpu_ref_tryget+0x31/0x170 include/linux/percpu-refcount.h:266
 css_tryget include/linux/cgroup_refcnt.h:45 [inline]
 get_mem_cgroup_from_mm+0x103/0x2a0 mm/memcontrol.c:1086
 __mem_cgroup_charge+0x16/0x80 mm/memcontrol.c:7224
 mem_cgroup_charge include/linux/memcontrol.h:684 [inline]
 shmem_alloc_and_add_folio+0x393/0xde0 mm/shmem.c:1679
 shmem_get_folio_gfp+0x7c3/0x1ee0 mm/shmem.c:2054
 shmem_get_folio mm/shmem.c:2136 [inline]
 shmem_write_begin+0x170/0x4c0 mm/shmem.c:2719
 generic_perform_write+0x31b/0x630 mm/filemap.c:3927
 shmem_file_write_iter+0xfc/0x120 mm/shmem.c:2895
 call_write_iter include/linux/fs.h:2020 [inline]
 new_sync_write fs/read_write.c:491 [inline]
 vfs_write+0x792/0xb20 fs/read_write.c:584
 ksys_write+0x1a0/0x2c0 fs/read_write.c:637
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0x45/0x110 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x63/0x6b
RIP: 0033:0x7ff7cd27ba2f
RSP: 002b:00007ff7ce017e70 EFLAGS: 00000293 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 0000000001000000 RCX: 00007ff7cd27ba2f
RDX: 0000000001000000 RSI: 00007ff7c39ff000 RDI: 0000000000000003
RBP: 0000000000000000 R08: 0000000000000000 R09: 00000000000095cb
R10: 0000000000000002 R11: 0000000000000293 R12: 0000000000000003
R13: 00007ff7ce017f3c R14: 00007ff7ce017f40 R15: 00007ff7c39ff000
 </TASK>
rcu: rcu_preempt kthread starved for 10543 jiffies! g111573 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:25552 pid:17    tgid:17    ppid:2      flags:0x00004000
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5376 [inline]
 __schedule+0x1961/0x4ab0 kernel/sched/core.c:6688
 __schedule_loop kernel/sched/core.c:6763 [inline]
 schedule+0x149/0x260 kernel/sched/core.c:6778
 schedule_timeout+0x1bd/0x300 kernel/time/timer.c:2167
 rcu_gp_fqs_loop+0x30a/0x1500 kernel/rcu/tree.c:1631
 rcu_gp_kthread+0xa7/0x3b0 kernel/rcu/tree.c:1830
 kthread+0x2d3/0x370 kernel/kthread.c:388
 ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:147
 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:242
 </TASK>
rcu: Stack dump where RCU GP kthread last ran:
CPU: 1 PID: 28645 Comm: syz-executor.0 Not tainted 6.7.0-rc7-syzkaller-00016-gf5837722ffec #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023
RIP: 0010:__raw_spin_unlock_irq include/linux/spinlock_api_smp.h:160 [inline]
RIP: 0010:_raw_spin_unlock_irq+0x29/0x50 kernel/locking/spinlock.c:202
Code: 00 f3 0f 1e fa 53 48 89 fb 48 83 c7 18 48 8b 74 24 08 e8 5a 1c 4b f6 48 89 df e8 52 57 4c f6 e8 cd 20 73 f6 fb bf 01 00 00 00 <e8> 72 7c 3e f6 65 8b 05 23 8a e1 74 85 c0 74 02 5b c3 e8 f0 57 de
RSP: 0018:ffffc9000d287c50 EFLAGS: 00000282
RAX: 8b25a40a9dd8bc00 RBX: ffff88804268a500 RCX: ffffffff925cf303
RDX: dffffc0000000000 RSI: ffffffff8b6aa560 RDI: 0000000000000001
RBP: ffffc9000d287d90 R08: ffffffff8f00c16f R09: 1ffffffff1e0182d
R10: dffffc0000000000 R11: fffffbfff1e0182e R12: 1ffff110084d1533
R13: 000000001c000004 R14: 0000000000000021 R15: ffff88804268a998
FS:  00007f97924186c0(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f058ed93184 CR3: 00000000405ce000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <IRQ>
 </IRQ>
 <TASK>
 spin_unlock_irq include/linux/spinlock.h:401 [inline]
 get_signal+0x1569/0x1840 kernel/signal.c:2907
 arch_do_signal_or_restart+0x96/0x860 arch/x86/kernel/signal.c:309
 exit_to_user_mode_loop+0x6a/0x100 kernel/entry/common.c:168
 exit_to_user_mode_prepare+0xb1/0x150 kernel/entry/common.c:204
 __syscall_exit_to_user_mode_work kernel/entry/common.c:285 [inline]
 syscall_exit_to_user_mode+0x69/0x2a0 kernel/entry/common.c:296
 do_syscall_64+0x52/0x110 arch/x86/entry/common.c:89
 entry_SYSCALL_64_after_hwframe+0x63/0x6b
RIP: 0033:0x7f979167cce7
Code: 14 25 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 00 00 90 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 b0 ff ff ff f7 d8 64 89
RSP: 002b:00007f9792418178 EFLAGS: 00000246
RAX: 00000000000000ca RBX: 00007f979179c058 RCX: 00007f979167cce9
RDX: 0000000000000000 RSI: 0000000000000080 RDI: 00007f979179c058
RBP: 00007f979179c050 R08: 00007f97924186c0 R09: 00007f97924186c0
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f979179c05c
R13: 000000000000006e R14: 00007ffd0ab22a40 R15: 00007ffd0ab22b28
 </TASK>

Crashes (4):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/12/28 04:44 upstream f5837722ffec fb427a07 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root INFO: rcu detected stall in shmem_file_write_iter
2023/12/25 02:18 upstream 861deac3b092 fb427a07 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root INFO: rcu detected stall in shmem_file_write_iter
2023/11/15 09:56 upstream c42d9eeef8e5 cb976f63 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root INFO: rcu detected stall in shmem_file_write_iter
2023/11/15 07:39 upstream c42d9eeef8e5 cb976f63 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root INFO: rcu detected stall in shmem_file_write_iter
* Struck through repros no longer work on HEAD.