syzbot


INFO: rcu detected stall in sys_newfstatat

Status: upstream: reported on 2024/04/08 00:26
Reported-by: syzbot+b4da8777e5518ae24a0d@syzkaller.appspotmail.com
First crash: 26d, last: 16d
Similar bugs (5)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream INFO: rcu detected stall in sys_newfstatat (4) tomoyo C error 7 22d 557d 0/26 upstream: reported C repro on 2022/10/25 00:38
linux-6.1 INFO: rcu detected stall in sys_newfstatat origin:upstream C 1 17d 320d 0/3 upstream: reported C repro on 2023/06/18 16:04
upstream INFO: rcu detected stall in sys_newfstatat cgroups mm 1 1613d 1613d 0/26 closed as invalid on 2019/12/04 14:04
upstream INFO: rcu detected stall in sys_newfstatat (2) kernfs 1 812d 812d 0/26 auto-closed as invalid on 2022/05/13 02:53
upstream INFO: rcu detected stall in sys_newfstatat (3) tomoyo 1 698d 698d 0/26 auto-closed as invalid on 2022/09/03 09:55

Sample crash report:
rcu: INFO: rcu_preempt detected stalls on CPUs/tasks:
rcu: 	0-...!: (1 GPs behind) idle=909/1/0x4000000000000000 softirq=9066/9068 fqs=1 
	(detected by 1, t=10506 jiffies, g=10129, q=247)
Sending NMI from CPU 1 to CPUs 0:
NMI backtrace for cpu 0
CPU: 0 PID: 2962 Comm: udevd Not tainted 5.15.156-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024
RIP: 0010:mark_lock+0xe6/0x340 kernel/locking/lockdep.c:4569
Code: e8 03 42 0f b6 04 28 84 c0 0f 85 0f 02 00 00 83 3d 2e c6 db 0f 00 74 39 31 db 48 83 c3 50 48 89 d8 48 c1 e8 03 42 80 3c 28 00 <74> 08 48 89 df e8 f0 07 67 00 41 bc 01 00 00 00 44 85 33 74 53 44
RSP: 0018:ffffc90000007a38 EFLAGS: 00000046
RAX: 1ffffffff1f1e0ba RBX: ffffffff8f8f05d0 RCX: ffffffff81631958
RDX: 0000000000000000 RSI: 0000000000000008 RDI: ffffffff8fbf60c8
RBP: 0000000000000000 R08: dffffc0000000000 R09: fffffbfff1f7ec1a
R10: 0000000000000000 R11: dffffc0000000001 R12: 0000000000000003
R13: dffffc0000000000 R14: 0000000000000001 R15: ffff88807d060b68
FS:  00007fde7b5f0c80(0000) GS:ffff8880b9a00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055555685d938 CR3: 000000001fd19000 CR4: 00000000003526f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <NMI>
 </NMI>
 <IRQ>
 mark_usage kernel/locking/lockdep.c:4483 [inline]
 __lock_acquire+0xb5c/0x1ff0 kernel/locking/lockdep.c:4966
 lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5623
 __raw_spin_lock_irq include/linux/spinlock_api_smp.h:128 [inline]
 _raw_spin_lock_irq+0xcf/0x110 kernel/locking/spinlock.c:170
 __run_hrtimer kernel/time/hrtimer.c:1690 [inline]
 __hrtimer_run_queues+0x662/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 ac 73 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:ffffc9000cc572c0 EFLAGS: 00000206
RAX: 0000000000000001 RBX: 1ffff9200198ae64 RCX: 1ffff9200198ae04
RDX: dffffc0000000000 RSI: ffffffff8a8b3c20 RDI: ffffffff8ad8f380
RBP: ffffc9000cc57410 R08: dffffc0000000000 R09: fffffbfff1f7ec19
R10: 0000000000000000 R11: dffffc0000000001 R12: 1ffff9200198ae60
R13: dffffc0000000000 R14: ffffc9000cc57320 R15: 0000000000000246
 rcu_lock_acquire+0x20/0x30 include/linux/rcupdate.h:312
 rcu_read_lock include/linux/rcupdate.h:739 [inline]
 get_mem_cgroup_from_objcg+0x16/0x120 mm/memcontrol.c:2809
 obj_cgroup_uncharge_pages mm/memcontrol.c:2989 [inline]
 refill_obj_stock+0x209/0x460 mm/memcontrol.c:3256
 memcg_slab_free_hook+0x160/0x200 mm/slab.h:364
 do_slab_free mm/slub.c:3432 [inline]
 ___cache_free+0x67/0x100 mm/slub.c:3506
 qlist_free_all+0x36/0x90 mm/kasan/quarantine.c:176
 kasan_quarantine_reduce+0x162/0x180 mm/kasan/quarantine.c:283
 __kasan_slab_alloc+0x2f/0xc0 mm/kasan/common.c:444
 kasan_slab_alloc include/linux/kasan.h:254 [inline]
 slab_post_alloc_hook+0x53/0x380 mm/slab.h:519
 slab_alloc_node mm/slub.c:3220 [inline]
 slab_alloc mm/slub.c:3228 [inline]
 __kmalloc+0x120/0x300 mm/slub.c:4403
 kmalloc include/linux/slab.h:596 [inline]
 tomoyo_realpath_from_path+0xd8/0x5e0 security/tomoyo/realpath.c:254
 tomoyo_get_realpath security/tomoyo/file.c:151 [inline]
 tomoyo_path_perm+0x273/0x6b0 security/tomoyo/file.c:822
 security_inode_getattr+0xcf/0x120 security/security.c:1348
 vfs_getattr+0x26/0x360 fs/stat.c:157
 vfs_statx+0x18f/0x3b0 fs/stat.c:225
 vfs_fstatat fs/stat.c:243 [inline]
 __do_sys_newfstatat fs/stat.c:411 [inline]
 __se_sys_newfstatat fs/stat.c:405 [inline]
 __x64_sys_newfstatat+0x12c/0x1b0 fs/stat.c:405
 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:0x7fde7b71b5f4
Code: 64 c7 00 09 00 00 00 83 c8 ff c3 48 89 f2 b9 00 01 00 00 48 89 fe bf 9c ff ff ff e9 00 00 00 00 41 89 ca b8 06 01 00 00 0f 05 <45> 31 c0 3d 00 f0 ff ff 76 10 48 8b 15 03 a8 0d 00 f7 d8 41 83 c8
RSP: 002b:00007fff2c6d8d68 EFLAGS: 00000202 ORIG_RAX: 0000000000000106
RAX: ffffffffffffffda RBX: 000055db66d4f970 RCX: 00007fde7b71b5f4
RDX: 00007fff2c6d8d80 RSI: 00007fde7b7b8130 RDI: 000000000000000d
RBP: 000055db66da8a20 R08: 0000000000090800 R09: 000055db66d365b0
R10: 0000000000001000 R11: 0000000000000202 R12: 00007fff2c6d8d80
R13: 00000000000000ff R14: 000055db65d6b1c4 R15: 0000000000000000
 </TASK>
rcu: rcu_preempt kthread starved for 10500 jiffies! g10129 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:27000 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 1
CPU: 1 PID: 4455 Comm: syz-executor.0 Not tainted 5.15.156-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/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:csd_lock_wait kernel/smp.c:440 [inline]
RIP: 0010:smp_call_function_many_cond+0xa93/0xd90 kernel/smp.c:969
Code: 04 03 84 c0 0f 85 84 00 00 00 45 8b 7d 00 44 89 fe 83 e6 01 31 ff e8 4c cf 0b 00 41 83 e7 01 75 07 e8 e1 cb 0b 00 eb 41 f3 90 <48> b8 00 00 00 00 00 fc ff df 0f b6 04 03 84 c0 75 11 41 f7 45 00
RSP: 0018:ffffc900033a7220 EFLAGS: 00000246
RAX: ffffffff81749124 RBX: 1ffff11017348509 RCX: 0000000000040000
RDX: ffffc90003b6d000 RSI: 000000000003ffff RDI: 0000000000040000
RBP: ffffc900033a7360 R08: ffffffff817490f4 R09: fffffbfff1f7ec1a
R10: 0000000000000000 R11: dffffc0000000001 R12: 0000000000000000
R13: ffff8880b9a42848 R14: ffff8880b9b3b3c0 R15: 0000000000000001
 on_each_cpu_cond_mask+0x3b/0x80 kernel/smp.c:1135
 __purge_vmap_area_lazy+0x294/0x1740 mm/vmalloc.c:1683
 _vm_unmap_aliases+0x453/0x4e0 mm/vmalloc.c:2107
 change_page_attr_set_clr+0x308/0x1050 arch/x86/mm/pat/set_memory.c:1740
 change_page_attr_clear arch/x86/mm/pat/set_memory.c:1797 [inline]
 set_memory_ro+0xa1/0xe0 arch/x86/mm/pat/set_memory.c:1943
 bpf_jit_binary_lock_ro include/linux/filter.h:891 [inline]
 bpf_int_jit_compile+0xbf57/0xc6e0 arch/x86/net/bpf_jit_comp.c:2372
 bpf_prog_select_runtime+0x6e2/0x9b0 kernel/bpf/core.c:1930
 bpf_prog_load+0x131c/0x1b60 kernel/bpf/syscall.c:2357
 __sys_bpf+0x343/0x670 kernel/bpf/syscall.c:4651
 __do_sys_bpf kernel/bpf/syscall.c:4755 [inline]
 __se_sys_bpf kernel/bpf/syscall.c:4753 [inline]
 __x64_sys_bpf+0x78/0x90 kernel/bpf/syscall.c:4753
 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:0x7f8467180ea9
Code: 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 01 48
RSP: 002b:00007f84656d20c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000141
RAX: ffffffffffffffda RBX: 00007f84672af050 RCX: 00007f8467180ea9
RDX: 0000000000000080 RSI: 0000000020000300 RDI: 0000000000000005
RBP: 00007f84671cd4a4 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 000000000000006e R14: 00007f84672af050 R15: 00007ffe76c16018
 </TASK>

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/04/18 04:52 linux-5.15.y c52b9710c83d acc528cb .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: rcu detected stall in sys_newfstatat
2024/04/08 00:25 linux-5.15.y 9465fef4ae35 ca620dd8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: rcu detected stall in sys_newfstatat
* Struck through repros no longer work on HEAD.