syzbot


INFO: rcu detected stall in sock_close

Status: fixed on 2023/09/23 10:26
Bug presence: origin:upstream
[Documentation on labels]
Reported-by: syzbot+e7717d48d50b745ce01d@syzkaller.appspotmail.com
Fix commit: 0b45af982a4d net/sched: taprio: Limit TCA_TAPRIO_ATTR_SCHED_CYCLE_TIME to INT_MAX.
First crash: 500d, last: 500d
Fix bisection: fixed by (bisect log) :
commit 0b45af982a4df0b14fb8669ee2a871cfdfa6a39c
Author: Kuniyuki Iwashima <kuniyu@amazon.com>
Date: Sat Jul 29 00:07:05 2023 +0000

  net/sched: taprio: Limit TCA_TAPRIO_ATTR_SCHED_CYCLE_TIME to INT_MAX.

  
Bug presence (2)
Date Name Commit Repro Result
2023/07/10 upstream (ToT) 06c2afb862f9 C [report] INFO: rcu detected stall in process_one_work
2023/08/28 upstream (ToT) 2dde18cd1d8f C Didn't crash
Similar bugs (12)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-5.15 INFO: rcu detected stall in sock_close (2) 1 302d 302d 0/3 auto-obsoleted due to no activity on 2024/05/03 14:38
upstream INFO: rcu detected stall in sock_close (4) net 2 391d 429d 0/28 auto-obsoleted due to no activity on 2024/01/24 15:51
linux-6.1 INFO: rcu detected stall in sock_close (3) 1 192d 192d 0/3 auto-obsoleted due to no activity on 2024/08/21 03:02
upstream INFO: rcu detected stall in sock_close cgroups mm 6 1814d 1815d 0/28 closed as invalid on 2019/12/04 14:04
linux-6.1 INFO: rcu detected stall in sock_close (2) 1 294d 294d 0/3 auto-obsoleted due to no activity on 2024/05/11 05:25
upstream INFO: rcu detected stall in sock_close (3) tipc C done done 5 1101d 1596d 0/28 closed as invalid on 2022/02/08 10:42
linux-5.15 INFO: rcu detected stall in sock_close C error 2 480d 534d 0/3 auto-obsoleted due to no activity on 2023/11/07 13:02
linux-5.15 INFO: rcu detected stall in sock_close (3) origin:upstream C 8 2d07h 185d 0/3 upstream: reported C repro on 2024/05/20 00:06
upstream INFO: rcu detected stall in sock_close (2) cgroups mm 1 1779d 1779d 0/28 closed as invalid on 2020/01/09 08:13
android-5-10 BUG: soft lockup in sock_close C 80 7d14h 241d 0/2 upstream: reported C repro on 2024/03/25 07:28
android-5-15 BUG: soft lockup in sock_close origin:downstream C done 322 18d 239d 0/2 upstream: reported C repro on 2024/03/26 23:21
android-6-1 BUG: soft lockup in sock_close origin:downstream C error 3 24d 239d 0/2 upstream: reported C repro on 2024/03/27 04:09

Sample crash report:
rcu: INFO: rcu_preempt detected stalls on CPUs/tasks:
rcu: 	1-...!: (1 GPs behind) idle=2dbc/1/0x4000000000000000 softirq=7676/7678 fqs=4
	(detected by 0, t=10502 jiffies, g=6801, q=109 ncpus=2)
Sending NMI from CPU 0 to CPUs 1:
NMI backtrace for cpu 1
CPU: 1 PID: 3573 Comm: syz-executor732 Not tainted 6.1.38-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/03/2023
RIP: 0010:native_save_fl arch/x86/include/asm/irqflags.h:35 [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_release+0x610/0xa20 kernel/locking/lockdep.c:5692
Code: eb 03 42 80 3c 3b 00 74 08 4c 89 f7 e8 d9 43 76 00 48 c7 84 24 90 00 00 00 00 00 00 00 9c 8f 84 24 90 00 00 00 42 80 3c 3b 00 <74> 08 4c 89 f7 e8 36 43 76 00 f6 84 24 91 00 00 00 02 75 6f 41 f7
RSP: 0018:ffffc900001e0b80 EFLAGS: 00000046
RAX: 0000000000000001 RBX: 1ffff9200003c182 RCX: ffffc900001e0c03
RDX: 0000000000000002 RSI: ffffffff8aebe4a0 RDI: ffffffff8b3cce60
RBP: ffffc900001e0cb0 R08: dffffc0000000000 R09: fffffbfff1ca6a76
R10: 0000000000000000 R11: dffffc0000000001 R12: 1ffff9200003c17c
R13: 0000000000000046 R14: ffffc900001e0c10 R15: dffffc0000000000
FS:  000055555573b300(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020000600 CR3: 00000000720d4000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <NMI>
 </NMI>
 <IRQ>
 rcu_read_unlock include/linux/rcupdate.h:780 [inline]
 advance_sched+0x7d4/0x940 net/sched/sch_taprio.c:755
 __run_hrtimer kernel/time/hrtimer.c:1685 [inline]
 __hrtimer_run_queues+0x5e5/0xe50 kernel/time/hrtimer.c:1749
 hrtimer_interrupt+0x392/0x980 kernel/time/hrtimer.c:1811
 local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1095 [inline]
 __sysvec_apic_timer_interrupt+0x156/0x580 arch/x86/kernel/apic/apic.c:1112
 sysvec_apic_timer_interrupt+0x8c/0xb0 arch/x86/kernel/apic/apic.c:1106
 </IRQ>
 <TASK>
 asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:649
RIP: 0010:lock_release+0x637/0xa20 kernel/locking/lockdep.c:5693
Code: 3c 3b 00 74 08 4c 89 f7 e8 36 43 76 00 f6 84 24 91 00 00 00 02 75 6f 41 f7 c5 00 02 00 00 74 01 fb 48 c7 44 24 60 0e 36 e0 45 <4b> c7 04 27 00 00 00 00 4b c7 44 27 08 00 00 00 00 65 48 8b 04 25
RSP: 0018:ffffc90003d1fa80 EFLAGS: 00000206
RAX: 0000000000000001 RBX: 1ffff920007a3f62 RCX: ffffc90003d1fb03
RDX: 0000000000000050 RSI: ffffffff8aebe4a0 RDI: ffffffff8b3cce60
RBP: ffffc90003d1fbb8 R08: dffffc0000000000 R09: fffffbfff205285d
R10: 0000000000000000 R11: dffffc0000000001 R12: 1ffff920007a3f5c
R13: 0000000000000246 R14: ffffc90003d1fb10 R15: dffffc0000000000
 sock_release_ownership include/net/sock.h:1841 [inline]
 release_sock+0x114/0x1c0 net/core/sock.c:3475
 packet_release+0x809/0xca0 net/packet/af_packet.c:3154
 __sock_release net/socket.c:652 [inline]
 sock_close+0xcd/0x230 net/socket.c:1370
 __fput+0x3b7/0x890 fs/file_table.c:320
 task_work_run+0x246/0x300 kernel/task_work.c:179
 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline]
 exit_to_user_mode_loop+0xd9/0x100 kernel/entry/common.c:171
 exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:204
 __syscall_exit_to_user_mode_work kernel/entry/common.c:286 [inline]
 syscall_exit_to_user_mode+0x60/0x270 kernel/entry/common.c:297
 do_syscall_64+0x49/0xb0 arch/x86/entry/common.c:86
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f51abca9bb3
Code: c7 c2 c0 ff ff ff f7 d8 64 89 02 48 c7 c0 ff ff ff ff eb ba 0f 1f 00 64 8b 04 25 18 00 00 00 85 c0 75 14 b8 03 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 45 c3 0f 1f 40 00 48 83 ec 18 89 7c 24 0c e8
RSP: 002b:00007ffda2c9fa28 EFLAGS: 00000246 ORIG_RAX: 0000000000000003
RAX: 0000000000000000 RBX: 0000000000000004 RCX: 00007f51abca9bb3
RDX: 00007f51abce8049 RSI: 0000000020000040 RDI: 0000000000000003
RBP: 0000000000000000 R08: 000000000000000d R09: 000000000000000d
R10: 000000000000000d R11: 0000000000000246 R12: 00007ffda2c9fa40
R13: 00000000000f4240 R14: 0000000000000000 R15: 0000000000000000
 </TASK>
INFO: NMI handler (nmi_cpu_backtrace_handler) took too long to run: 1.508 msecs
rcu: rcu_preempt kthread starved for 10494 jiffies! g6801 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:26712 pid:16    ppid:2      flags:0x00004000
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5241 [inline]
 __schedule+0x132c/0x4330 kernel/sched/core.c:6554
 schedule+0xbf/0x180 kernel/sched/core.c:6630
 schedule_timeout+0x1b9/0x300 kernel/time/timer.c:1935
 rcu_gp_fqs_loop+0x2c2/0x1010 kernel/rcu/tree.c:1661
 rcu_gp_kthread+0xa3/0x3a0 kernel/rcu/tree.c:1860
 kthread+0x26e/0x300 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306
 </TASK>
rcu: Stack dump where RCU GP kthread last ran:
CPU: 0 PID: 46 Comm: kworker/u4:3 Not tainted 6.1.38-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/03/2023
Workqueue: events_unbound toggle_allocation_gate
RIP: 0010:csd_lock_wait kernel/smp.c:413 [inline]
RIP: 0010:smp_call_function_many_cond+0x1f62/0x33d0 kernel/smp.c:987
Code: 2f 44 89 ee 83 e6 01 31 ff e8 9a 11 0b 00 41 83 e5 01 49 bd 00 00 00 00 00 fc ff df 75 0a e8 25 0e 0b 00 e9 1b ff ff ff f3 90 <42> 0f b6 04 2b 84 c0 75 14 41 f7 07 01 00 00 00 0f 84 fe fe ff ff
RSP: 0018:ffffc90000b775a0 EFLAGS: 00000293
RAX: ffffffff817ecd3d RBX: 1ffff11017328031 RCX: ffff8880162cd940
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000000
RBP: ffffc90000b77980 R08: ffffffff817ecd06 R09: fffffbfff2052845
R10: 0000000000000000 R11: dffffc0000000001 R12: 0000000800000000
R13: dffffc0000000000 R14: 0000000000000001 R15: ffff8880b9940188
FS:  0000000000000000(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000560371bdc008 CR3: 000000000cc8e000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <IRQ>
 </IRQ>
 <TASK>
 on_each_cpu_cond_mask+0x3b/0x80 kernel/smp.c:1155
 on_each_cpu include/linux/smp.h:71 [inline]
 text_poke_sync arch/x86/kernel/alternative.c:1316 [inline]
 text_poke_bp_batch+0x2bb/0x940 arch/x86/kernel/alternative.c:1516
 text_poke_flush arch/x86/kernel/alternative.c:1707 [inline]
 text_poke_finish+0x16/0x30 arch/x86/kernel/alternative.c:1714
 arch_jump_label_transform_apply+0x13/0x20 arch/x86/kernel/jump_label.c:146
 static_key_enable_cpuslocked+0x12e/0x250 kernel/jump_label.c:177
 static_key_enable+0x16/0x20 kernel/jump_label.c:190
 toggle_allocation_gate+0xbf/0x480 mm/kfence/core.c:804
 process_one_work+0x8aa/0x11f0 kernel/workqueue.c:2289
 worker_thread+0xa5f/0x1210 kernel/workqueue.c:2436
 kthread+0x26e/0x300 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306
 </TASK>

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/07/10 07:18 linux-6.1.y 61fd484b2cf6 668cb1fa .config console log report syz C [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan INFO: rcu detected stall in sock_close
* Struck through repros no longer work on HEAD.