syzbot


INFO: rcu detected stall in sys_mprotect (5)

Status: auto-closed as invalid on 2022/05/29 03:15
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 282d, last: 282d
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 1064d 1064d 0/24 closed as invalid on 2020/01/09 08:13
upstream INFO: rcu detected stall in sys_mprotect (2) 1 1064d 1064d 0/24 closed as invalid on 2020/01/08 05:23
upstream INFO: rcu detected stall in sys_mprotect (4) 1 347d 347d 0/24 closed as invalid on 2022/02/08 10:00
upstream INFO: rcu detected stall in sys_mprotect 3 1100d 1100d 0/24 closed as invalid on 2019/12/04 14:04

Sample crash report:
rcu: INFO: rcu_preempt detected stalls on CPUs/tasks:
rcu: 	0-...!: (1 ticks this GP) idle=5b1/1/0x4000000000000000 softirq=40448/40449 fqs=1 
rcu: 	Tasks blocked on level-0 rcu_node (CPUs 0-1): P7733/1:b..l P11107/1:b..l
	(detected by 1, t=10502 jiffies, g=56745, q=34)
Sending NMI from CPU 1 to CPUs 0:
NMI backtrace for cpu 0
CPU: 0 PID: 11104 Comm: sed Not tainted 5.17.0-rc5-syzkaller-00317-g52a025546731 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:__rb_erase_augmented include/linux/rbtree_augmented.h:214 [inline]
RIP: 0010:rb_erase+0x5bd/0x1210 lib/rbtree.c:443
Code: 00 74 80 48 89 14 24 e8 a1 58 bb fd 48 8b 14 24 e9 6e ff ff ff 48 b8 00 00 00 00 00 fc ff df 4c 89 ea 48 c1 ea 03 80 3c 02 00 <0f> 85 c1 0a 00 00 4d 8b 65 00 4c 89 e3 48 83 e3 fc 0f 84 0c 01 00
RSP: 0018:ffffc90000007d88 EFLAGS: 00000046
RAX: dffffc0000000000 RBX: ffff888073ebe340 RCX: 0000000000000000
RDX: 1ffff1100e7d7c68 RSI: ffff8880b9c2a750 RDI: ffff888073ebe350
RBP: ffff8880b9c2a750 R08: 0000000000000001 R09: 0000000000000001
R10: ffffffff840400ac R11: 0000000000000000 R12: ffff8880b9c2a758
R13: ffff888073ebe340 R14: 0000000000000000 R15: ffff8880b9c2a750
FS:  00007fe843b05800(0000) GS:ffff8880b9c00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fe843d28bf6 CR3: 0000000048b70000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <IRQ>
 rb_erase_cached include/linux/rbtree.h:126 [inline]
 timerqueue_del+0x7f/0x140 lib/timerqueue.c:57
 __remove_hrtimer+0xa1/0x2a0 kernel/time/hrtimer.c:1116
 __run_hrtimer kernel/time/hrtimer.c:1665 [inline]
 __hrtimer_run_queues+0x4ea/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:put_flush_tlb_info arch/x86/mm/tlb.c:980 [inline]
RIP: 0010:flush_tlb_mm_range+0x26a/0x410 arch/x86/mm/tlb.c:1021
Code: ee 03 83 c0 03 0f b6 0c 0e 38 c8 7c 08 84 c9 0f 85 0d 01 00 00 3b 2d 55 6e 5e 0c 72 4b 65 48 8b 05 8b 19 ce 7e 48 39 c3 74 7a <65> ff 0d 07 fb cc 7e bf 01 00 00 00 e8 95 64 1a 00 65 8b 05 2e f5
RSP: 0018:ffffc9000635fb28 EFLAGS: 00000206
RAX: 00000000000017af RBX: ffff88801d3f6000 RCX: 1ffffffff1ffb856
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000000
RBP: 0000000000000008 R08: 0000000000000001 R09: ffffffff8ffc8977
R10: 0000000000000001 R11: 0000000000000000 R12: ffff88801d3f6668
R13: 000000000000000c R14: ffff8880b9c39480 R15: 0000000000000000
 change_protection_range mm/mprotect.c:358 [inline]
 change_protection+0x4de/0x2000 mm/mprotect.c:375
 mprotect_fixup+0x47d/0x950 mm/mprotect.c:497
 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:0x7fe843e50297
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:00007ffdce185e68 EFLAGS: 00000206 ORIG_RAX: 000000000000000a
RAX: ffffffffffffffda RBX: 00007fe843e621e0 RCX: 00007fe843e50297
RDX: 0000000000000001 RSI: 0000000000001000 RDI: 000056227dd43000
RBP: 00007ffdce185f80 R08: 0000000000000000 R09: 00007fe843deb89e
R10: 000056227dd43f40 R11: 0000000000000206 R12: 00007fe843e621e0
R13: 0000000000000007 R14: 0000000600000007 R15: 000056227dd40488
 </TASK>
task:syz-executor.1  state:R  running task     stack:28552 pid:11107 ppid:  3624 flags:0x00004000
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:4995 [inline]
 __schedule+0xa94/0x4910 kernel/sched/core.c:6304
 preempt_schedule_common+0x45/0xc0 kernel/sched/core.c:6470
 preempt_schedule_thunk+0x16/0x18 arch/x86/entry/thunk_64.S:35
 __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:152 [inline]
 _raw_spin_unlock_irqrestore+0x57/0x70 kernel/locking/spinlock.c:194
 spin_unlock_irqrestore include/linux/spinlock.h:404 [inline]
 __wake_up_common_lock+0xde/0x130 kernel/sched/wait.c:140
 sock_def_readable+0xec/0x4e0 net/core/sock.c:3147
 __netlink_sendskb net/netlink/af_netlink.c:1264 [inline]
 netlink_broadcast_deliver net/netlink/af_netlink.c:1396 [inline]
 do_one_broadcast net/netlink/af_netlink.c:1474 [inline]
 netlink_broadcast+0x86d/0xd50 net/netlink/af_netlink.c:1514
 uevent_net_broadcast_untagged lib/kobject_uevent.c:331 [inline]
 kobject_uevent_net_broadcast lib/kobject_uevent.c:409 [inline]
 kobject_uevent_env+0xaa8/0x1600 lib/kobject_uevent.c:593
 disk_event_uevent+0x17b/0x1e0 block/disk-events.c:181
 disk_force_media_change+0x1e/0xc0 block/disk-events.c:305
 loop_configure+0x75b/0x1970 drivers/block/loop.c:1024
 lo_ioctl+0x278/0x17b0 drivers/block/loop.c:1544
 blkdev_ioctl+0x37a/0x800 block/ioctl.c:588
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:874 [inline]
 __se_sys_ioctl fs/ioctl.c:860 [inline]
 __x64_sys_ioctl+0x193/0x200 fs/ioctl.c:860
 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:0x7fcaa33fae07
RSP: 002b:00007fcaa1d6ff28 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007fcaa34449c8 RCX: 00007fcaa33fae07
RDX: 0000000000000003 RSI: 0000000000004c00 RDI: 0000000000000004
RBP: 0000000000000004 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000003
R13: 0000000000000003 R14: 00000000200001c8 R15: 0000000000000003
 </TASK>
task:kworker/u4:11   state:R  running task     stack:26176 pid: 7733 ppid:     2 flags:0x00004000
Workqueue: bat_events batadv_nc_worker
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:4995 [inline]
 __schedule+0xa94/0x4910 kernel/sched/core.c:6304
 preempt_schedule_irq+0x4e/0x90 kernel/sched/core.c:6719
 irqentry_exit+0x31/0x80 kernel/entry/common.c:425
 asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:638
RIP: 0010:lock_acquire+0x1ef/0x510 kernel/locking/lockdep.c:5607
Code: c8 a5 7e 83 f8 01 0f 85 b4 02 00 00 9c 58 f6 c4 02 0f 85 9f 02 00 00 48 83 7c 24 08 00 74 01 fb 48 b8 00 00 00 00 00 fc ff df <48> 01 c3 48 c7 03 00 00 00 00 48 c7 43 08 00 00 00 00 48 8b 84 24
RSP: 0018:ffffc9000444fba8 EFLAGS: 00000206
RAX: dffffc0000000000 RBX: 1ffff92000889f77 RCX: 4e75ada79c931d47
RDX: 1ffff11005950163 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 0000000000000000 R08: 0000000000000000 R09: ffffffff8ffc8947
R10: fffffbfff1ff9128 R11: 0000000000000001 R12: 0000000000000002
R13: 0000000000000000 R14: ffffffff8bb81ae0 R15: 0000000000000000
 rcu_lock_acquire include/linux/rcupdate.h:268 [inline]
 rcu_read_lock include/linux/rcupdate.h:694 [inline]
 batadv_nc_purge_orig_hash net/batman-adv/network-coding.c:408 [inline]
 batadv_nc_worker+0x12d/0xfa0 net/batman-adv/network-coding.c:719
 process_one_work+0x9ac/0x1650 kernel/workqueue.c:2307
 worker_thread+0x657/0x1110 kernel/workqueue.c:2454
 kthread+0x2e9/0x3a0 kernel/kthread.c:377
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
 </TASK>
rcu: rcu_preempt kthread starved for 10500 jiffies! g56745 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:28880 pid:   14 ppid:     2 flags:0x00004000
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:4995 [inline]
 __schedule+0xa94/0x4910 kernel/sched/core.c:6304
 schedule+0xd2/0x260 kernel/sched/core.c:6377
 schedule_timeout+0x14a/0x2a0 kernel/time/timer.c:1881
 rcu_gp_fqs_loop+0x186/0x810 kernel/rcu/tree.c:1963
 rcu_gp_kthread+0x1de/0x320 kernel/rcu/tree.c:2136
 kthread+0x2e9/0x3a0 kernel/kthread.c:377
 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 1
CPU: 1 PID: 11113 Comm: syz-executor.0 Not tainted 5.17.0-rc5-syzkaller-00317-g52a025546731 #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+0x1e6/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:458
 print_other_cpu_stall kernel/rcu/tree_stall.h:563 [inline]
 check_cpu_stall kernel/rcu/tree_stall.h:706 [inline]
 rcu_pending kernel/rcu/tree.c:3919 [inline]
 rcu_sched_clock_irq+0x2068/0x2110 kernel/rcu/tree.c:2617
 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+0x4eb/0xc90 kernel/smp.c:969
Code: 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 dc 8c 0b 00 f3 90 41 0f b6 04 24 <40> 38 c5 7c 08 84 c0 0f 85 e9 05 00 00 8b 43 08 31 ff 83 e0 01 41
RSP: 0018:ffffc900063dfa08 EFLAGS: 00000246
RAX: 0000000000000000 RBX: ffffe8ffffc0b880 RCX: ffffc9000309b000
RDX: 0000000000040000 RSI: ffffffff816c5524 RDI: 0000000000000003
RBP: 0000000000000003 R08: 0000000000000000 R09: 0000000000000000
R10: ffffffff816c554a R11: 0000000000000000 R12: fffff91ffff81711
R13: 0000000000000000 R14: ffffe8ffffc0b888 R15: 0000000000000001
 clock_was_set+0x599/0x790 kernel/time/hrtimer.c:974
 timekeeping_inject_offset+0x4b4/0x620 kernel/time/timekeeping.c:1374
 do_adjtimex+0x28f/0xa90 kernel/time/timekeeping.c:2408
 do_clock_adjtime kernel/time/posix-timers.c:1109 [inline]
 __do_sys_clock_adjtime+0x163/0x270 kernel/time/posix-timers.c:1121
 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:0x7fb36c2b2049
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 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fb36ac27168 EFLAGS: 00000246 ORIG_RAX: 0000000000000131
RAX: ffffffffffffffda RBX: 00007fb36c3c4f60 RCX: 00007fb36c2b2049
RDX: 0000000000000000 RSI: 0000000020000000 RDI: 0000000000000000
RBP: 00007fb36c30c08d R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffc2770ab7f R14: 00007fb36ac27300 R15: 0000000000022000
 </TASK>
----------------
Code disassembly (best guess):
   0:	00 74 80 48          	add    %dh,0x48(%rax,%rax,4)
   4:	89 14 24             	mov    %edx,(%rsp)
   7:	e8 a1 58 bb fd       	callq  0xfdbb58ad
   c:	48 8b 14 24          	mov    (%rsp),%rdx
  10:	e9 6e ff ff ff       	jmpq   0xffffff83
  15:	48 b8 00 00 00 00 00 	movabs $0xdffffc0000000000,%rax
  1c:	fc ff df
  1f:	4c 89 ea             	mov    %r13,%rdx
  22:	48 c1 ea 03          	shr    $0x3,%rdx
  26:	80 3c 02 00          	cmpb   $0x0,(%rdx,%rax,1)
* 2a:	0f 85 c1 0a 00 00    	jne    0xaf1 <-- trapping instruction
  30:	4d 8b 65 00          	mov    0x0(%r13),%r12
  34:	4c 89 e3             	mov    %r12,%rbx
  37:	48 83 e3 fc          	and    $0xfffffffffffffffc,%rbx
  3b:	0f                   	.byte 0xf
  3c:	84 0c 01             	test   %cl,(%rcx,%rax,1)

Crashes (1):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-kasan-gce-selinux-root 2022/02/28 03:10 upstream 52a025546731 45a13a73 .config log report info INFO: rcu detected stall in sys_mprotect
* Struck through repros no longer work on HEAD.