syzbot


INFO: rcu detected stall in kernfs_fop_open (3)

Status: auto-closed as invalid on 2022/09/20 22:08
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 217d, last: 168d
similar bugs (2):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream INFO: rcu detected stall in kernfs_fop_open 1 1100d 1100d 0/24 closed as invalid on 2019/12/04 14:04
upstream INFO: rcu detected stall in kernfs_fop_open (2) 1 1064d 1064d 0/24 closed as invalid on 2020/01/09 08:13

Sample crash report:
rcu: INFO: rcu_preempt detected stalls on CPUs/tasks:
	(detected by 1, t=10504 jiffies, g=109693, q=241)
rcu: All QSes seen, last rcu_preempt kthread activity 10502 (4295037863-4295027361), jiffies_till_next_fqs=1, root ->qsmask 0x0
rcu: rcu_preempt kthread starved for 10502 jiffies! g109693 f0x2 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:28728 pid:   16 ppid:     2 flags:0x00004000
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5073 [inline]
 __schedule+0xa9a/0x4cc0 kernel/sched/core.c:6388
 schedule+0xd2/0x1f0 kernel/sched/core.c:6460
 schedule_timeout+0x14a/0x2a0 kernel/time/timer.c:1884
 rcu_gp_fqs_loop+0x186/0x810 kernel/rcu/tree.c:1971
 rcu_gp_kthread+0x1de/0x320 kernel/rcu/tree.c:2144
 kthread+0x2e9/0x3a0 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298
 </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: 22467 Comm: udevd Not tainted 5.18.0-rc5-syzkaller-00016-g107c948d1d3e #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:native_save_fl arch/x86/include/asm/irqflags.h:29 [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_is_held_type+0xea/0x140 kernel/locking/lockdep.c:5686
Code: c0 45 31 ed 44 39 f0 41 0f 94 c5 48 c7 c7 a0 5d cc 89 e8 89 0d 00 00 b8 ff ff ff ff 65 0f c1 05 74 b8 98 76 83 f8 01 75 29 9c <58> f6 c4 02 75 3d 48 f7 04 24 00 02 00 00 74 01 fb 48 83 c4 08 44
RSP: 0018:ffffc90000007bf0 EFLAGS: 00000046
RAX: 0000000000000001 RBX: 0000000000000003 RCX: 0000000000000001
RDX: 0000000000000000 RSI: 0000000000010003 RDI: 0000000000000000
RBP: ffffffff8bd82120 R08: 0000000000000000 R09: ffffffff8db84c57
R10: fffffbfff1b7098a R11: 0000000000000001 R12: ffff88802198bb00
R13: 0000000000000000 R14: 00000000ffffffff R15: ffff88802198c5b0
FS:  00007f8ce5ec5840(0000) GS:ffff8880b9c00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fce0eb9d090 CR3: 000000001da8a000 CR4: 0000000000350ef0
Call Trace:
 <IRQ>
 lock_is_held include/linux/lockdep.h:283 [inline]
 rcu_read_lock_sched_held+0x3a/0x70 kernel/rcu/update.c:125
 trace_lock_release include/trace/events/lock.h:58 [inline]
 lock_release+0x522/0x720 kernel/locking/lockdep.c:5652
 __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:149 [inline]
 _raw_spin_unlock_irqrestore+0x16/0x70 kernel/locking/spinlock.c:194
 debug_object_activate+0x287/0x3e0 lib/debugobjects.c:689
 debug_hrtimer_activate kernel/time/hrtimer.c:420 [inline]
 debug_activate kernel/time/hrtimer.c:475 [inline]
 enqueue_hrtimer+0x27/0x3e0 kernel/time/hrtimer.c:1084
 __run_hrtimer kernel/time/hrtimer.c:1702 [inline]
 __hrtimer_run_queues+0xb02/0xe50 kernel/time/hrtimer.c:1749
 hrtimer_interrupt+0x31c/0x790 kernel/time/hrtimer.c:1811
 local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1086 [inline]
 __sysvec_apic_timer_interrupt+0x146/0x530 arch/x86/kernel/apic/apic.c:1103
 sysvec_apic_timer_interrupt+0x8e/0xc0 arch/x86/kernel/apic/apic.c:1097
 </IRQ>
 <TASK>
 asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:645
RIP: 0010:__preempt_count_add arch/x86/include/asm/preempt.h:80 [inline]
RIP: 0010:preempt_count_add+0x38/0x140 kernel/sched/core.c:5532
Code: 00 fc ff df 48 89 c1 53 83 e0 07 89 fb 48 c1 e9 03 83 c0 03 0f b6 14 11 38 d0 7c 08 84 d2 0f 85 e1 00 00 00 8b 15 78 e5 08 0f <65> 01 1d f1 0b b1 7e 85 d2 75 11 65 8b 05 e6 0b b1 7e 0f b6 c0 3d
RSP: 0018:ffffc9000a97f578 EFLAGS: 00000297
RAX: 0000000000000003 RBX: 0000000000000001 RCX: 1ffffffff20b4928
RDX: 0000000000000000 RSI: ffffffff81d1b9bd RDI: 0000000000000001
RBP: ffffc9000a97f648 R08: ffffffff8e421262 R09: ffffc9000a97f634
R10: fffff5200152fecb R11: ffffc9000a97fdb0 R12: ffffc9000a97f6b8
R13: ffffc9000a97f600 R14: ffff88802198bb00 R15: 0000000000000001
 unwind_next_frame+0xaa/0x1cc0 arch/x86/kernel/unwind_orc.c:428
 arch_stack_walk+0x7d/0xe0 arch/x86/kernel/stacktrace.c:25
 stack_trace_save+0x8c/0xc0 kernel/stacktrace.c:122
 kasan_save_stack+0x1e/0x40 mm/kasan/common.c:38
 kasan_set_track mm/kasan/common.c:45 [inline]
 set_alloc_info mm/kasan/common.c:436 [inline]
 __kasan_slab_alloc+0x90/0xc0 mm/kasan/common.c:469
 kasan_slab_alloc include/linux/kasan.h:224 [inline]
 slab_post_alloc_hook mm/slab.h:749 [inline]
 slab_alloc_node mm/slub.c:3217 [inline]
 slab_alloc mm/slub.c:3225 [inline]
 __kmem_cache_alloc_lru mm/slub.c:3232 [inline]
 kmem_cache_alloc+0x204/0x3b0 mm/slub.c:3242
 kmem_cache_zalloc include/linux/slab.h:704 [inline]
 seq_open+0x57/0x180 fs/seq_file.c:63
 kernfs_fop_open+0x6b0/0xe00 fs/kernfs/file.c:679
 do_dentry_open+0x4a1/0x11e0 fs/open.c:824
 do_open fs/namei.c:3476 [inline]
 path_openat+0x1c71/0x2910 fs/namei.c:3609
 do_filp_open+0x1aa/0x400 fs/namei.c:3636
 do_sys_openat2+0x16d/0x4c0 fs/open.c:1213
 do_sys_open fs/open.c:1229 [inline]
 __do_sys_openat fs/open.c:1245 [inline]
 __se_sys_openat fs/open.c:1240 [inline]
 __x64_sys_openat+0x13f/0x1f0 fs/open.c:1240
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x7f8ce5b25697
Code: 25 00 00 41 00 3d 00 00 41 00 74 37 64 8b 04 25 18 00 00 00 85 c0 75 5b 44 89 e2 48 89 ee bf 9c ff ff ff b8 01 01 00 00 0f 05 <48> 3d 00 f0 ff ff 0f 87 85 00 00 00 48 83 c4 68 5d 41 5c c3 0f 1f
RSP: 002b:00007ffed6bccb20 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 000056330b0e6440 RCX: 00007f8ce5b25697
RDX: 0000000000080000 RSI: 00007ffed6bccc58 RDI: 00000000ffffff9c
RBP: 00007ffed6bccc58 R08: 0000000000000008 R09: 0000000000000001
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000080000
R13: 000056330b0e6440 R14: 0000000000000001 R15: 000056330af38160
 </TASK>
----------------
Code disassembly (best guess):
   0:	c0 45 31 ed          	rolb   $0xed,0x31(%rbp)
   4:	44 39 f0             	cmp    %r14d,%eax
   7:	41 0f 94 c5          	sete   %r13b
   b:	48 c7 c7 a0 5d cc 89 	mov    $0xffffffff89cc5da0,%rdi
  12:	e8 89 0d 00 00       	callq  0xda0
  17:	b8 ff ff ff ff       	mov    $0xffffffff,%eax
  1c:	65 0f c1 05 74 b8 98 	xadd   %eax,%gs:0x7698b874(%rip)        # 0x7698b898
  23:	76
  24:	83 f8 01             	cmp    $0x1,%eax
  27:	75 29                	jne    0x52
  29:	9c                   	pushfq
* 2a:	58                   	pop    %rax <-- trapping instruction
  2b:	f6 c4 02             	test   $0x2,%ah
  2e:	75 3d                	jne    0x6d
  30:	48 f7 04 24 00 02 00 	testq  $0x200,(%rsp)
  37:	00
  38:	74 01                	je     0x3b
  3a:	fb                   	sti
  3b:	48 83 c4 08          	add    $0x8,%rsp
  3f:	44                   	rex.R

Crashes (2):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-kasan-gce-root 2022/05/04 04:29 upstream 107c948d1d3e dc9e5259 .config log report info INFO: rcu detected stall in kernfs_fop_open
ci-upstream-linux-next-kasan-gce-root 2022/06/22 22:06 linux-next ac0ba5454ca8 912f5df7 .config log report info INFO: rcu detected stall in kernfs_fop_open
* Struck through repros no longer work on HEAD.