syzbot


INFO: rcu detected stall in __put_task_struct (2)

Status: closed as invalid on 2022/02/08 10:10
Subsystems: bpf
[Documentation on labels]
First crash: 871d, last: 871d
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream INFO: rcu detected stall in __put_task_struct lsm 1 996d 996d 0/26 auto-closed as invalid on 2021/11/01 17:33

Sample crash report:
rcu: INFO: rcu_preempt detected stalls on CPUs/tasks:
rcu: 	0-...!: (0 ticks this GP) idle=5cf/1/0x4000000000000000 softirq=164144/164145 fqs=4 
	(detected by 1, t=10502 jiffies, g=280433, q=108)
Sending NMI from CPU 1 to CPUs 0:
NMI backtrace for cpu 0
CPU: 0 PID: 18798 Comm: syz-executor.4 Not tainted 5.16.0-rc4-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:debug_smp_processor_id+0x5/0x20 lib/smp_processor_id.c:60
Code: 48 c7 c7 a0 cd 79 8a e8 f9 01 00 00 65 ff 0d 1e ed f0 75 5b 5d c3 cc cc cc cc cc cc cc cc cc cc cc cc cc cc cc 0f 1f 44 00 00 <48> c7 c7 20 49 d5 8a 48 c7 c6 60 49 d5 8a eb 0b 66 2e 0f 1f 84 00
RSP: 0018:ffffc90000007518 EFLAGS: 00000086
RAX: 0000000000000001 RBX: 1ffff92000000ea8 RCX: ffff888077e23a00
RDX: 0000000000000000 RSI: 0000000000000008 RDI: ffffffff8dfe8da8
RBP: ffffc900000075c8 R08: dffffc0000000000 R09: fffffbfff1bfd1b6
R10: fffffbfff1bfd1b6 R11: 0000000000000000 R12: 0000000000000000
R13: 1ffff92000000ecc R14: dffffc0000000000 R15: 0000000000000000
FS:  00007fa120781700(0000) GS:ffff8880b9a00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000000 CR3: 0000000154647000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <IRQ>
 rcu_dynticks_curr_cpu_in_eqs kernel/rcu/tree.c:330 [inline]
 rcu_is_watching+0x12/0xa0 kernel/rcu/tree.c:1121
 rcu_read_lock_held_common kernel/rcu/update.c:108 [inline]
 rcu_read_lock_sched_held+0x6b/0x130 kernel/rcu/update.c:123
 trace_lock_acquire+0x59/0x190 include/trace/events/lock.h:13
 lock_acquire+0xa5/0x4d0 kernel/locking/lockdep.c:5608
 __raw_spin_lock_irq include/linux/spinlock_api_smp.h:119 [inline]
 _raw_spin_lock_irq+0xcf/0x110 kernel/locking/spinlock.c:170
 __run_hrtimer kernel/time/hrtimer.c:1689 [inline]
 __hrtimer_run_queues+0x546/0xa60 kernel/time/hrtimer.c:1749
 hrtimer_interrupt+0x3b3/0x1040 kernel/time/hrtimer.c:1811
 local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1086 [inline]
 __sysvec_apic_timer_interrupt+0xf9/0x270 arch/x86/kernel/apic/apic.c:1103
 sysvec_apic_timer_interrupt+0x3e/0xb0 arch/x86/kernel/apic/apic.c:1097
 asm_sysvec_apic_timer_interrupt+0x12/0x20
RIP: 0010:creds_are_invalid kernel/cred.c:832 [inline]
RIP: 0010:__validate_creds include/linux/cred.h:188 [inline]
RIP: 0010:exit_creds+0x70/0x320 kernel/cred.c:170
Code: ef e8 94 dc 77 00 48 c7 45 00 00 00 00 00 4d 8d 7c 24 10 4c 89 fd 48 c1 ed 03 42 8a 44 2d 00 84 c0 0f 85 d5 01 00 00 41 8b 1f <bf> 64 65 73 43 89 de e8 34 0c 2c 00 81 fb 64 65 73 43 0f 85 32 02
RSP: 0018:ffffc90000007bb0 EFLAGS: 00000246
RAX: ffffffff81588e00 RBX: 0000000043736564 RCX: ffff888077e23a00
RDX: 0000000080000100 RSI: 0000000000000100 RDI: ffff88803f1b3a00
RBP: 1ffff110044f9b62 R08: dffffc0000000000 R09: fffffbfff1bfd1b6
R10: fffffbfff1bfd1b6 R11: 0000000000000000 R12: ffff8880227cdb00
R13: dffffc0000000000 R14: ffff88803f1b3a00 R15: ffff8880227cdb10
 __put_task_struct+0x105/0x2c0 kernel/fork.c:753
 rcu_do_batch kernel/rcu/tree.c:2506 [inline]
 rcu_core+0x9b8/0x1610 kernel/rcu/tree.c:2741
 __do_softirq+0x392/0x7a3 kernel/softirq.c:558
 __irq_exit_rcu+0xec/0x170 kernel/softirq.c:637
 irq_exit_rcu+0x5/0x20 kernel/softirq.c:649
 sysvec_apic_timer_interrupt+0x91/0xb0 arch/x86/kernel/apic/apic.c:1097
 </IRQ>
 <TASK>
 asm_sysvec_apic_timer_interrupt+0x12/0x20
RIP: 0010:__rcu_read_unlock+0x0/0x650 kernel/rcu/tree_plugin.h:415
Code: 60 00 eb b2 44 89 f9 80 e1 07 80 c1 03 38 c1 7c b0 4c 89 ff e8 b1 a6 60 00 eb a6 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 <55> 48 89 e5 41 57 41 56 41 55 41 54 53 48 83 e4 e0 48 81 ec c0 00
RSP: 0018:ffffc9000adaf780 EFLAGS: 00000246
RAX: ffffffff81915000 RBX: 0000000000000000 RCX: 0000000000040000
RDX: ffffc9000aab4000 RSI: 00000000000003be RDI: 00000000000003bf
RBP: dffffc0000000000 R08: ffffffff81914ff8 R09: fffffbfff1ff35dd
R10: fffffbfff1ff35dd R11: 0000000000000000 R12: dffffc0000000000
R13: 0000000000000000 R14: 00007fa12182cae9 R15: 0000000000000000
 rcu_read_unlock include/linux/rcupdate.h:720 [inline]
 is_bpf_text_address+0x247/0x270 kernel/bpf/core.c:717
 kernel_text_address+0x9e/0xd0 kernel/extable.c:124
 __kernel_text_address+0x9/0x40 kernel/extable.c:78
 unwind_get_return_address+0x48/0x80 arch/x86/kernel/unwind_orc.c:318
 arch_stack_walk+0xf8/0x140 arch/x86/kernel/stacktrace.c:26
 stack_trace_save+0x11b/0x1e0 kernel/stacktrace.c:122
 kasan_save_stack mm/kasan/common.c:38 [inline]
 kasan_set_track mm/kasan/common.c:46 [inline]
 set_alloc_info mm/kasan/common.c:434 [inline]
 __kasan_slab_alloc+0xb6/0xf0 mm/kasan/common.c:467
 kasan_slab_alloc include/linux/kasan.h:259 [inline]
 slab_post_alloc_hook mm/slab.h:519 [inline]
 slab_alloc_node mm/slub.c:3234 [inline]
 slab_alloc mm/slub.c:3242 [inline]
 kmem_cache_alloc+0x1c9/0x310 mm/slub.c:3247
 kmem_cache_zalloc include/linux/slab.h:714 [inline]
 __alloc_file+0x26/0x2f0 fs/file_table.c:101
 alloc_empty_file+0xa9/0x1b0 fs/file_table.c:150
 alloc_file+0x58/0x4f0 fs/file_table.c:192
 alloc_file_pseudo+0x272/0x300 fs/file_table.c:232
 sock_alloc_file+0xb4/0x240 net/socket.c:462
 sock_map_fd net/socket.c:486 [inline]
 __sys_socket+0x198/0x380 net/socket.c:1561
 __do_sys_socket net/socket.c:1566 [inline]
 __se_sys_socket net/socket.c:1564 [inline]
 __x64_sys_socket+0x76/0x80 net/socket.c:1564
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x44/0xd0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x7fa12182cae9
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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 bc ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fa120781188 EFLAGS: 00000246 ORIG_RAX: 0000000000000029
RAX: ffffffffffffffda RBX: 00007fa121940028 RCX: 00007fa12182cae9
RDX: 0000000000000000 RSI: 0000000000000003 RDI: 0000000000000010
RBP: 00007fa121886ff7 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fff4518aa4f R14: 00007fa120781300 R15: 0000000000022000
 </TASK>
rcu: rcu_preempt kthread starved for 10494 jiffies! g280433 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:26576 pid:   14 ppid:     2 flags:0x00004000
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:4972 [inline]
 __schedule+0xb72/0x1460 kernel/sched/core.c:6253
 schedule+0x12b/0x1f0 kernel/sched/core.c:6326
 schedule_timeout+0x1b9/0x300 kernel/time/timer.c:1881
 rcu_gp_fqs_loop+0x1fd/0x770 kernel/rcu/tree.c:1955
 rcu_gp_kthread+0xa5/0x350 kernel/rcu/tree.c:2128
 kthread+0x468/0x490 kernel/kthread.c:327
 ret_from_fork+0x1f/0x30
 </TASK>
rcu: Stack dump where RCU GP kthread last ran:
NMI backtrace for cpu 1
CPU: 1 PID: 8 Comm: kworker/u4:0 Not tainted 5.16.0-rc4-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Workqueue: events_unbound toggle_allocation_gate
Call Trace:
 <IRQ>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x1dc/0x2d8 lib/dump_stack.c:106
 nmi_cpu_backtrace+0x45f/0x490 lib/nmi_backtrace.c:111
 nmi_trigger_cpumask_backtrace+0x16a/0x280 lib/nmi_backtrace.c:62
 trigger_single_cpu_backtrace include/linux/nmi.h:164 [inline]
 rcu_check_gp_kthread_starvation+0x1ff/0x270 kernel/rcu/tree_stall.h:481
 print_other_cpu_stall kernel/rcu/tree_stall.h:586 [inline]
 check_cpu_stall kernel/rcu/tree_stall.h:729 [inline]
 rcu_pending kernel/rcu/tree.c:3878 [inline]
 rcu_sched_clock_irq+0x23d5/0x2bc0 kernel/rcu/tree.c:2597
 update_process_times+0x197/0x200 kernel/time/timer.c:1785
 tick_sched_handle kernel/time/tick-sched.c:226 [inline]
 tick_sched_timer+0x27d/0x420 kernel/time/tick-sched.c:1428
 __run_hrtimer kernel/time/hrtimer.c:1685 [inline]
 __hrtimer_run_queues+0x4cb/0xa60 kernel/time/hrtimer.c:1749
 hrtimer_interrupt+0x3b3/0x1040 kernel/time/hrtimer.c:1811
 local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1086 [inline]
 __sysvec_apic_timer_interrupt+0xf9/0x270 arch/x86/kernel/apic/apic.c:1103
 sysvec_apic_timer_interrupt+0x8c/0xb0 arch/x86/kernel/apic/apic.c:1097
 </IRQ>
 <TASK>
 asm_sysvec_apic_timer_interrupt+0x12/0x20
RIP: 0010:csd_lock_wait kernel/smp.c:440 [inline]
RIP: 0010:smp_call_function_many_cond+0xbb2/0xda0 kernel/smp.c:969
Code: 83 e6 01 31 ff e8 fe b7 0b 00 41 83 e7 01 49 bf 00 00 00 00 00 fc ff df 75 0e e8 d9 b3 0b 00 eb 4c 0f 1f 80 00 00 00 00 f3 90 <42> 0f b6 04 3b 84 c0 75 11 41 f7 45 00 01 00 00 00 74 2b e8 b6 b3
RSP: 0018:ffffc90000cd7820 EFLAGS: 00000293
RAX: ffffffff8178e3ca RBX: 1ffff1101734831d RCX: ffff888012015700
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000000
RBP: ffffc90000cd7960 R08: ffffffff8178e392 R09: ffffffff844a3b20
R10: 0000000000000009 R11: ffff888012015700 R12: 0000000000000000
R13: ffff8880b9a418e8 R14: ffff8880b9b3a640 R15: dffffc0000000000
 on_each_cpu_cond_mask+0x3b/0x80 kernel/smp.c:1135
 on_each_cpu include/linux/smp.h:71 [inline]
 text_poke_sync arch/x86/kernel/alternative.c:1112 [inline]
 text_poke_bp_batch+0x310/0x940 arch/x86/kernel/alternative.c:1297
 text_poke_flush arch/x86/kernel/alternative.c:1451 [inline]
 text_poke_finish+0x16/0x30 arch/x86/kernel/alternative.c:1458
 arch_jump_label_transform_apply+0x13/0x20 arch/x86/kernel/jump_label.c:146
 static_key_enable_cpuslocked+0x12d/0x250 kernel/jump_label.c:177
 static_key_enable+0x16/0x20 kernel/jump_label.c:190
 toggle_allocation_gate+0xbf/0x460 mm/kfence/core.c:732
 process_one_work+0x853/0x1140 kernel/workqueue.c:2298
 worker_thread+0xac1/0x1320 kernel/workqueue.c:2445
 kthread+0x468/0x490 kernel/kthread.c:327
 ret_from_fork+0x1f/0x30
 </TASK>
----------------
Code disassembly (best guess):
   0:	48 c7 c7 a0 cd 79 8a 	mov    $0xffffffff8a79cda0,%rdi
   7:	e8 f9 01 00 00       	callq  0x205
   c:	65 ff 0d 1e ed f0 75 	decl   %gs:0x75f0ed1e(%rip)        # 0x75f0ed31
  13:	5b                   	pop    %rbx
  14:	5d                   	pop    %rbp
  15:	c3                   	retq
  16:	cc                   	int3
  17:	cc                   	int3
  18:	cc                   	int3
  19:	cc                   	int3
  1a:	cc                   	int3
  1b:	cc                   	int3
  1c:	cc                   	int3
  1d:	cc                   	int3
  1e:	cc                   	int3
  1f:	cc                   	int3
  20:	cc                   	int3
  21:	cc                   	int3
  22:	cc                   	int3
  23:	cc                   	int3
  24:	cc                   	int3
  25:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)
* 2a:	48 c7 c7 20 49 d5 8a 	mov    $0xffffffff8ad54920,%rdi <-- trapping instruction
  31:	48 c7 c6 60 49 d5 8a 	mov    $0xffffffff8ad54960,%rsi
  38:	eb 0b                	jmp    0x45
  3a:	66                   	data16
  3b:	2e                   	cs
  3c:	0f                   	.byte 0xf
  3d:	1f                   	(bad)
  3e:	84 00                	test   %al,(%rax)

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/12/06 20:46 upstream 0fcfb00b28c0 579a8754 .config console log report info ci-upstream-kasan-gce-smack-root INFO: rcu detected stall in __put_task_struct
* Struck through repros no longer work on HEAD.