syzbot


INFO: rcu detected stall in kernfs_fop_write_iter

Status: upstream: reported on 2024/10/28 10:26
Reported-by: syzbot+97d3bca228daaba4a8ed@syzkaller.appspotmail.com
First crash: 41d, last: 41d
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-6.1 INFO: rcu detected stall in kernfs_fop_write_iter (2) 2 124d 221d 0/3 auto-obsoleted due to no activity on 2024/11/14 04:13
upstream INFO: rcu detected stall in kernfs_fop_write_iter fs sctp 7 117d 213d 0/28 auto-obsoleted due to no activity on 2024/11/10 20:48
linux-6.1 INFO: rcu detected stall in kernfs_fop_write_iter 1 500d 500d 0/3 auto-obsoleted due to no activity on 2023/11/03 22:13

Sample crash report:
rcu: INFO: rcu_preempt detected stalls on CPUs/tasks:
rcu: 	0-...!: (0 ticks this GP) idle=a2f/1/0x4000000000000000 softirq=7871/7871 fqs=0 
	(detected by 1, t=10502 jiffies, g=8957, q=278)
Sending NMI from CPU 1 to CPUs 0:
NMI backtrace for cpu 0
CPU: 0 PID: 3544 Comm: udevd Not tainted 5.15.169-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
RIP: 0010:timerqueue_add+0x11/0x280 lib/timerqueue.c:36
Code: c1 7c 81 48 89 ef e8 ce 21 9c fd e9 74 ff ff ff cc cc cc cc cc cc cc cc cc 55 41 57 41 56 41 55 41 54 53 48 83 ec 30 49 89 f7 <49> 89 fc 48 bb 00 00 00 00 00 fc ff df e8 ed 57 52 fd 4c 89 fd 48
RSP: 0018:ffffc90000007cc0 EFLAGS: 00000086
RAX: 0000000000000000 RBX: 0000000000000002 RCX: 0000000000000001
RDX: 0000000000010000 RSI: ffff8880258e2340 RDI: ffff8880b902a350
RBP: ffff8880b902a244 R08: ffffffff816fa4ee R09: fffffbfff1bd2cb6
R10: 0000000000000000 R11: dffffc0000000001 R12: dffffc0000000000
R13: ffff8880b902a350 R14: ffff8880258e2340 R15: ffff8880258e2340
FS:  00007f698610ec80(0000) GS:ffff8880b9000000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fdaf37882d8 CR3: 000000007ceda000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <NMI>
 </NMI>
 <IRQ>
 enqueue_hrtimer+0x1a0/0x390 kernel/time/hrtimer.c:1092
 __run_hrtimer kernel/time/hrtimer.c:1705 [inline]
 __hrtimer_run_queues+0x6b6/0xcf0 kernel/time/hrtimer.c:1752
 hrtimer_interrupt+0x392/0x980 kernel/time/hrtimer.c:1814
 local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1097 [inline]
 __sysvec_apic_timer_interrupt+0x13b/0x4b0 arch/x86/kernel/apic/apic.c:1114
 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1108 [inline]
 sysvec_apic_timer_interrupt+0x9b/0xc0 arch/x86/kernel/apic/apic.c:1108
 </IRQ>
 <TASK>
 asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:676
RIP: 0010:uevent_net_broadcast_untagged lib/kobject_uevent.c:321 [inline]
RIP: 0010:kobject_uevent_net_broadcast+0x2a0/0x560 lib/kobject_uevent.c:409
Code: 0f 84 a5 01 00 00 45 31 ed 45 31 ff 48 8d 6b 10 48 89 e8 48 c1 e8 03 42 80 3c 20 00 74 08 48 89 ef e8 74 8a 9d fd 4c 8b 75 00 <4c> 89 f7 be 01 00 00 00 e8 83 a9 5a 04 89 c5 31 ff 89 c6 e8 d8 c3
RSP: 0018:ffffc90002ea7a60 EFLAGS: 00000246
RAX: 1ffff1100373b242 RBX: ffff88801b9d9200 RCX: ffff88807d2f9dc0
RDX: 0000000000000000 RSI: ffff8880758a6000 RDI: 0000000000000000
RBP: ffff88801b9d9210 R08: ffffffff842ca232 R09: ffffc90002ea77e0
R10: 0000000000000000 R11: dffffc0000000001 R12: dffffc0000000000
R13: 0000000000000000 R14: ffff88801b7aa000 R15: 0000000000000000
 kobject_uevent_env+0x567/0x8d0 lib/kobject_uevent.c:608
 kobject_synth_uevent+0x4eb/0xae0 lib/kobject_uevent.c:208
 uevent_store+0x20/0x60 drivers/base/core.c:2431
 kernfs_fop_write_iter+0x3a2/0x4f0 fs/kernfs/file.c:296
 call_write_iter include/linux/fs.h:2174 [inline]
 new_sync_write fs/read_write.c:507 [inline]
 vfs_write+0xacd/0xe50 fs/read_write.c:594
 ksys_write+0x1a2/0x2c0 fs/read_write.c:647
 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:0x7f6986239bf2
Code: 89 c7 48 89 44 24 08 e8 7b 34 fa ff 48 8b 44 24 08 48 83 c4 28 c3 c3 64 8b 04 25 18 00 00 00 85 c0 75 20 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 76 6f 48 8b 15 07 a2 0d 00 f7 d8 64 89 02 48 83
RSP: 002b:00007fff5535e048 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 000055b590c0ef20 RCX: 00007f6986239bf2
RDX: 0000000000000007 RSI: 000055b590bf3690 RDI: 000000000000000c
RBP: 0000000000000007 R08: 000055b590bf3690 R09: 00000000000001e0
R10: 000000000000010f R11: 0000000000000246 R12: 0000000000000007
R13: 000055b590bf3690 R14: 00007fff5535e428 R15: 0000000000000000
 </TASK>
rcu: rcu_preempt kthread starved for 10502 jiffies! g8957 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:26816 pid:   15 ppid:     2 flags:0x00004000
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5027 [inline]
 __schedule+0x12c4/0x45b0 kernel/sched/core.c:6373
 schedule+0x11b/0x1f0 kernel/sched/core.c:6456
 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:287
 </TASK>
rcu: Stack dump where RCU GP kthread last ran:
NMI backtrace for cpu 1
CPU: 1 PID: 1107 Comm: kworker/1:2 Not tainted 5.15.169-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
Workqueue: events fqdir_free_fn
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:1688 [inline]
 __hrtimer_run_queues+0x55b/0xcf0 kernel/time/hrtimer.c:1752
 hrtimer_interrupt+0x392/0x980 kernel/time/hrtimer.c:1814
 local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1097 [inline]
 __sysvec_apic_timer_interrupt+0x13b/0x4b0 arch/x86/kernel/apic/apic.c:1114
 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1108 [inline]
 sysvec_apic_timer_interrupt+0x9b/0xc0 arch/x86/kernel/apic/apic.c:1108
 </IRQ>
 <TASK>
 asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:676
RIP: 0010:csd_lock_wait kernel/smp.c:440 [inline]
RIP: 0010:smp_call_function_single+0x292/0x530 kernel/smp.c:758
Code: 0f 85 24 02 00 00 44 8b 6c 24 48 44 89 ee 83 e6 01 31 ff e8 a0 ea 0b 00 41 83 e5 01 75 0a e8 35 e7 0b 00 e9 eb 00 00 00 f3 90 <42> 0f b6 04 23 84 c0 75 15 f7 44 24 48 01 00 00 00 0f 84 cd 00 00
RSP: 0018:ffffc90004a3fa60 EFLAGS: 00000293
RAX: ffffffff81748cce RBX: 1ffff92000947f55 RCX: ffff888021738000
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000000
RBP: ffffc90004a3fb50 R08: ffffffff81748ca0 R09: ffffed1017207679
R10: 0000000000000000 R11: dffffc0000000001 R12: dffffc0000000000
R13: 0000000000000001 R14: ffffc90004a3faa8 R15: 0000000000000000
 rcu_barrier+0x262/0x4e0 kernel/rcu/tree.c:4078
 fqdir_free_fn+0x2e/0x130 net/ipv4/inet_fragment.c:166
 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:287
 </TASK>

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/10/28 10:25 linux-5.15.y 74cdd62cb470 65e8686b .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: rcu detected stall in kernfs_fop_write_iter
* Struck through repros no longer work on HEAD.