syzbot


INFO: rcu detected stall in sys_mprotect (4)

Status: closed as invalid on 2022/02/08 10:00
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 343d, last: 343d
similar bugs (4):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream INFO: rcu detected stall in sys_mprotect (3) 3 1059d 1059d 0/24 closed as invalid on 2020/01/09 08:13
upstream INFO: rcu detected stall in sys_mprotect (2) 1 1060d 1060d 0/24 closed as invalid on 2020/01/08 05:23
upstream INFO: rcu detected stall in sys_mprotect (5) 1 278d 278d 0/24 auto-closed as invalid on 2022/05/29 03:15
upstream INFO: rcu detected stall in sys_mprotect 3 1095d 1095d 0/24 closed as invalid on 2019/12/04 14:04

Sample crash report:
rcu: INFO: rcu_preempt detected stalls on CPUs/tasks:
rcu: 	1-...!: (1 GPs behind) idle=e21/1/0x4000000000000000 softirq=63867/63868 fqs=17 
	(detected by 0, t=10502 jiffies, g=98301, q=368)
Sending NMI from CPU 0 to CPUs 1:
NMI backtrace for cpu 1
CPU: 1 PID: 19291 Comm: modprobe Not tainted 5.16.0-rc6-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:check_kcov_mode kernel/kcov.c:166 [inline]
RIP: 0010:__sanitizer_cov_trace_pc+0xd/0x60 kernel/kcov.c:200
Code: 00 00 e9 16 16 64 02 66 0f 1f 44 00 00 48 8b be b0 01 00 00 e8 b4 ff ff ff 31 c0 c3 90 65 8b 05 b9 cd 8a 7e 89 c1 48 8b 34 24 <81> e1 00 01 00 00 65 48 8b 14 25 40 70 02 00 a9 00 01 ff 00 74 0e
RSP: 0018:ffffc90000dc0e38 EFLAGS: 00000002
RAX: 0000000000010003 RBX: ffff888067aabb40 RCX: 0000000000010003
RDX: 0000000000000000 RSI: ffffffff81670dbc RDI: 0000000000000003
RBP: 0000000000000001 R08: 0000000000000000 R09: 0000000000000000
R10: ffffffff8167084c R11: 0000000000000000 R12: 1773ca02aee79405
R13: ffff8880b9d2a500 R14: ffff8880b9d2a400 R15: 0000000000000001
FS:  0000000000000000(0000) GS:ffff8880b9d00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f07db731028 CR3: 0000000028fdc000 CR4: 0000000000350ee0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000600
Call Trace:
 <IRQ>
 __run_hrtimer kernel/time/hrtimer.c:1651 [inline]
 __hrtimer_run_queues+0x94c/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:638
RIP: 0010:check_preemption_disabled+0x41/0x170 lib/smp_processor_id.c:56
Code: 0d a8 bc 76 65 8b 1d 7e 02 bd 76 81 e3 ff ff ff 7f 31 ff 89 de 0f 1f 44 00 00 85 db 74 11 0f 1f 44 00 00 44 89 e0 5b 5d 41 5c <41> 5d 41 5e c3 0f 1f 44 00 00 9c 5b 81 e3 00 02 00 00 31 ff 48 89
RSP: 0018:ffffc90002b6f928 EFLAGS: 00000202
RAX: 0000000000000001 RBX: 0000607f4606e040 RCX: 0000000000000004
RDX: 1ffffffff1750233 RSI: 0000000000000002 RDI: 0000000000000000
RBP: ffffc90002b6fa18 R08: 0000000000000000 R09: ffffffff8d915357
R10: fffffbfff1b22a6a R11: 0000000000000000 R12: 0000000000000014
R13: ffffffff8a0527e0 R14: ffff88801bee3890 R15: ffffc90002b6f9f0
 perf_trace_lock+0xeb/0x4d0 include/trace/events/lock.h:39
 trace_lock_release include/trace/events/lock.h:58 [inline]
 lock_release+0x4a8/0x720 kernel/locking/lockdep.c:5648
 __raw_spin_unlock include/linux/spinlock_api_smp.h:141 [inline]
 _raw_spin_unlock+0x12/0x40 kernel/locking/spinlock.c:186
 spin_unlock include/linux/spinlock.h:389 [inline]
 browse_rb mm/mmap.c:363 [inline]
 validate_mm+0x355/0x800 mm/mmap.c:423
 __vma_adjust+0x1097/0x2530 mm/mmap.c:1021
 vma_adjust include/linux/mm.h:2656 [inline]
 __split_vma+0x2b3/0x550 mm/mmap.c:2742
 split_vma+0x95/0xd0 mm/mmap.c:2771
 mprotect_fixup+0x71c/0x940 mm/mprotect.c:483
 do_mprotect_pkey+0x532/0x980 mm/mprotect.c:639
 __do_sys_mprotect mm/mprotect.c:665 [inline]
 __se_sys_mprotect mm/mprotect.c:662 [inline]
 __x64_sys_mprotect+0x74/0xb0 mm/mprotect.c:662
 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:0x7f07db753297
Code: 44 00 00 b8 0b 00 00 00 0f 05 48 3d 01 f0 ff ff 73 01 c3 48 8d 0d 21 1f 01 00 f7 d8 89 01 48 83 c8 ff c3 b8 0a 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8d 0d 01 1f 01 00 f7 d8 89 01 48 83
RSP: 002b:00007fff39886c48 EFLAGS: 00000206 ORIG_RAX: 000000000000000a
RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 00007f07db753297
RDX: 0000000000000000 RSI: 00000000000af000 RDI: 00007f07db67e000
RBP: 00007fff39886f50 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000802 R11: 0000000000000206 R12: 00007fff39886c50
R13: 0000000000000000 R14: 0000000000000001 R15: 00007f07db731000
 </TASK>
rcu: rcu_preempt kthread starved for 10468 jiffies! g98301 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:28616 pid:   14 ppid:     2 flags:0x00004000
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:4972 [inline]
 __schedule+0xa9a/0x4940 kernel/sched/core.c:6253
 schedule+0xd2/0x260 kernel/sched/core.c:6326
 schedule_timeout+0x14a/0x2a0 kernel/time/timer.c:1881
 rcu_gp_fqs_loop+0x186/0x810 kernel/rcu/tree.c:1955
 rcu_gp_kthread+0x1de/0x320 kernel/rcu/tree.c:2128
 kthread+0x405/0x4f0 kernel/kthread.c:327
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
 </TASK>
rcu: Stack dump where RCU GP kthread last ran:
NMI backtrace for cpu 0
CPU: 0 PID: 19302 Comm: syz-executor.3 Not tainted 5.16.0-rc6-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 <IRQ>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106
 nmi_cpu_backtrace.cold+0x47/0x144 lib/nmi_backtrace.c:111
 nmi_trigger_cpumask_backtrace+0x1b3/0x230 lib/nmi_backtrace.c:62
 trigger_single_cpu_backtrace include/linux/nmi.h:164 [inline]
 rcu_check_gp_kthread_starvation.cold+0x1fb/0x200 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+0x2125/0x2200 kernel/rcu/tree.c:2597
 update_process_times+0x16d/0x200 kernel/time/timer.c:1785
 tick_sched_handle+0x9b/0x180 kernel/time/tick-sched.c:226
 tick_sched_timer+0x1b0/0x2d0 kernel/time/tick-sched.c:1428
 __run_hrtimer kernel/time/hrtimer.c:1685 [inline]
 __hrtimer_run_queues+0x1c0/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:638
RIP: 0010:csd_lock_wait kernel/smp.c:440 [inline]
RIP: 0010:smp_call_function_many_cond+0x452/0xc20 kernel/smp.c:969
Code: 0b 00 85 ed 74 4d 48 b8 00 00 00 00 00 fc ff df 4d 89 f4 4c 89 f5 49 c1 ec 03 83 e5 07 49 01 c4 83 c5 03 e8 40 78 0b 00 f3 90 <41> 0f b6 04 24 40 38 c5 7c 08 84 c0 0f 85 33 06 00 00 8b 43 08 31
RSP: 0018:ffffc9000308f708 EFLAGS: 00000246
RAX: 0000000000040000 RBX: ffff8880b9d3fca0 RCX: ffffc90005072000
RDX: 0000000000040000 RSI: ffffffff816c2a00 RDI: 0000000000000003
RBP: 0000000000000003 R08: 0000000000000000 R09: 0000000000000001
R10: ffffffff816c2a26 R11: 0000000000000000 R12: ffffed10173a7f95
R13: 0000000000000001 R14: ffff8880b9d3fca8 R15: 0000000000000001
 on_each_cpu_cond_mask+0x56/0xa0 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+0x1b3/0x560 arch/x86/kernel/alternative.c:1297
 text_poke_bp+0xad/0x110 arch/x86/kernel/alternative.c:1497
 arch_static_call_transform+0x4d/0x90 arch/x86/kernel/static_call.c:107
 __static_call_update+0xcf/0x620 kernel/static_call.c:136
 tracepoint_update_call kernel/tracepoint.c:317 [inline]
 tracepoint_add_func+0xa18/0xe50 kernel/tracepoint.c:358
 tracepoint_probe_register_prio kernel/tracepoint.c:511 [inline]
 tracepoint_probe_register+0xa1/0xf0 kernel/tracepoint.c:531
 trace_event_reg+0x28f/0x350 kernel/trace/trace_events.c:513
 perf_trace_event_reg kernel/trace/trace_event_perf.c:129 [inline]
 perf_trace_event_init+0x54a/0xa20 kernel/trace/trace_event_perf.c:204
 perf_trace_init+0x1a0/0x2f0 kernel/trace/trace_event_perf.c:228
 perf_tp_event_init+0xa2/0x120 kernel/events/core.c:9794
 perf_try_init_event+0x12a/0x560 kernel/events/core.c:11252
 perf_init_event kernel/events/core.c:11316 [inline]
 perf_event_alloc.part.0+0xf21/0x3b10 kernel/events/core.c:11607
 perf_event_alloc kernel/events/core.c:12030 [inline]
 __do_sys_perf_event_open+0x4ae/0x3130 kernel/events/core.c:12128
 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:0x7fef8587ce99
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:00007fef841f2168 EFLAGS: 00000246 ORIG_RAX: 000000000000012a
RAX: ffffffffffffffda RBX: 00007fef8598ff60 RCX: 00007fef8587ce99
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000020000200
RBP: 00007fef858d6ff1 R08: 0000000000000000 R09: 0000000000000000
R10: ffffffffffffffff R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffe62e9ceef R14: 00007fef841f2300 R15: 0000000000022000
 </TASK>
----------------
Code disassembly (best guess):
   0:	00 00                	add    %al,(%rax)
   2:	e9 16 16 64 02       	jmpq   0x264161d
   7:	66 0f 1f 44 00 00    	nopw   0x0(%rax,%rax,1)
   d:	48 8b be b0 01 00 00 	mov    0x1b0(%rsi),%rdi
  14:	e8 b4 ff ff ff       	callq  0xffffffcd
  19:	31 c0                	xor    %eax,%eax
  1b:	c3                   	retq
  1c:	90                   	nop
  1d:	65 8b 05 b9 cd 8a 7e 	mov    %gs:0x7e8acdb9(%rip),%eax        # 0x7e8acddd
  24:	89 c1                	mov    %eax,%ecx
  26:	48 8b 34 24          	mov    (%rsp),%rsi
* 2a:	81 e1 00 01 00 00    	and    $0x100,%ecx <-- trapping instruction
  30:	65 48 8b 14 25 40 70 	mov    %gs:0x27040,%rdx
  37:	02 00
  39:	a9 00 01 ff 00       	test   $0xff0100,%eax
  3e:	74 0e                	je     0x4e

Crashes (1):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-kasan-gce-root 2021/12/25 01:48 upstream b927dfc67d05 6caa12e4 .config log report info INFO: rcu detected stall in sys_mprotect
* Struck through repros no longer work on HEAD.