syzbot


INFO: rcu detected stall in sys_mprotect

Status: upstream: reported on 2024/04/26 17:12
Reported-by: syzbot+8ab131f54b6ff7ce72f3@syzkaller.appspotmail.com
First crash: 11d, last: 11d
Similar bugs (7)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream INFO: rcu detected stall in sys_mprotect (6) kernel 3 481d 532d 0/26 auto-obsoleted due to no activity on 2023/04/20 15:51
upstream INFO: rcu detected stall in sys_mprotect (3) kernel 3 1581d 1581d 0/26 closed as invalid on 2020/01/09 08:13
upstream INFO: rcu detected stall in sys_mprotect (2) kernel 1 1581d 1581d 0/26 closed as invalid on 2020/01/08 05:23
upstream INFO: rcu detected stall in sys_mprotect (5) kernel 1 799d 799d 0/26 auto-closed as invalid on 2022/05/29 03:15
upstream INFO: rcu detected stall in sys_mprotect (4) mm 1 864d 864d 0/26 closed as invalid on 2022/02/08 10:00
upstream INFO: rcu detected stall in sys_mprotect kernel 3 1617d 1617d 0/26 closed as invalid on 2019/12/04 14:04
upstream INFO: rcu detected stall in sys_mprotect (7) mm 9 112d 339d 0/26 auto-obsoleted due to no activity on 2024/04/15 19:55

Sample crash report:
rcu: INFO: rcu_preempt detected stalls on CPUs/tasks:
rcu: 	0-...!: (0 ticks this GP) idle=2f1/1/0x4000000000000000 softirq=12126/12126 fqs=0 
rcu: 	Tasks blocked on level-0 rcu_node (CPUs 0-1): P3677/1:b..l
	(detected by 1, t=10506 jiffies, g=15141, q=71)
Sending NMI from CPU 1 to CPUs 0:
NMI backtrace for cpu 0
CPU: 0 PID: 4721 Comm: sed Not tainted 5.15.156-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024
RIP: 0010:cpu_max_bits_warn include/linux/cpumask.h:108 [inline]
RIP: 0010:cpumask_check include/linux/cpumask.h:115 [inline]
RIP: 0010:cpumask_test_cpu include/linux/cpumask.h:344 [inline]
RIP: 0010:cpu_online include/linux/cpumask.h:895 [inline]
RIP: 0010:trace_hrtimer_start include/trace/events/timer.h:199 [inline]
RIP: 0010:debug_activate kernel/time/hrtimer.c:476 [inline]
RIP: 0010:enqueue_hrtimer+0x41/0x390 kernel/time/hrtimer.c:1084
Code: 00 00 fc ff df e8 8f cc 10 00 4c 89 f7 48 c7 c6 20 bc 8c 8a e8 d0 d7 9d 02 0f 1f 44 00 00 e8 76 cc 10 00 65 8b 2d e7 84 92 7e <bf> 07 00 00 00 89 ee e8 c3 cf 10 00 83 fd 07 0f 87 64 01 00 00 e8
RSP: 0018:ffffc90000007d28 EFLAGS: 00000046
RAX: ffffffff816f906a RBX: 0000000000000000 RCX: ffff8880195b3b80
RDX: 0000000000010002 RSI: 0000000000000004 RDI: 0000000000000001
RBP: 0000000000000000 R08: dffffc0000000000 R09: fffffbfff22d33cb
R10: 0000000000000000 R11: dffffc0000000001 R12: dffffc0000000000
R13: ffff8880b9a2a300 R14: ffff88801aa04b40 R15: dffffc0000000000
FS:  0000000000000000(0000) GS:ffff8880b9a00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f10d6441290 CR3: 0000000058a18000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <NMI>
 </NMI>
 <IRQ>
 __run_hrtimer kernel/time/hrtimer.c:1703 [inline]
 __hrtimer_run_queues+0x6b6/0xcf0 kernel/time/hrtimer.c:1750
 hrtimer_interrupt+0x392/0x980 kernel/time/hrtimer.c:1812
 local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1085 [inline]
 __sysvec_apic_timer_interrupt+0x139/0x470 arch/x86/kernel/apic/apic.c:1102
 sysvec_apic_timer_interrupt+0x8c/0xb0 arch/x86/kernel/apic/apic.c:1096
 </IRQ>
 <TASK>
 asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:638
RIP: 0010:lock_acquire+0x252/0x4f0 kernel/locking/lockdep.c:5627
Code: 2b 00 74 08 4c 89 f7 e8 ac 73 67 00 f6 44 24 61 02 0f 85 84 01 00 00 41 f7 c7 00 02 00 00 74 01 fb 48 c7 44 24 40 0e 36 e0 45 <4b> c7 44 25 00 00 00 00 00 43 c7 44 25 09 00 00 00 00 43 c7 44 25
RSP: 0018:ffffc90003427800 EFLAGS: 00000206
RAX: 0000000000000001 RBX: 1ffff92000684f0c RCX: ffffffff81636522
RDX: dffffc0000000000 RSI: ffffffff8a8b3c20 RDI: ffffffff8ad8f380
RBP: ffffc90003427950 R08: dffffc0000000000 R09: fffffbfff1f7ec19
R10: 0000000000000000 R11: dffffc0000000001 R12: 1ffff92000684f08
R13: dffffc0000000000 R14: ffffc90003427860 R15: 0000000000000246
 __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline]
 _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:154
 spin_lock include/linux/spinlock.h:363 [inline]
 browse_rb mm/mmap.c:356 [inline]
 validate_mm+0x36e/0x990 mm/mmap.c:423
 __vma_adjust+0x2cde/0x3150 mm/mmap.c:1021
 __split_vma+0x378/0x4a0
 mprotect_fixup+0x675/0x7d0 mm/mprotect.c:477
 do_mprotect_pkey+0x75b/0xa50 mm/mprotect.c:636
 __do_sys_mprotect mm/mprotect.c:662 [inline]
 __se_sys_mprotect mm/mprotect.c:659 [inline]
 __x64_sys_mprotect+0x7c/0x90 mm/mprotect.c:659
 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:0x7f10d645dbb7
Code: 00 00 00 b8 0b 00 00 00 0f 05 48 3d 01 f0 ff ff 73 01 c3 48 8d 0d b9 46 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 99 46 01 00 f7 d8 89 01 48 83
RSP: 002b:00007ffddcf977f8 EFLAGS: 00000246 ORIG_RAX: 000000000000000a
RAX: ffffffffffffffda RBX: 00000fffbb9f2f00 RCX: 00007f10d645dbb7
RDX: 0000000000000000 RSI: 000000000001c000 RDI: 00007f10d619c000
RBP: 00007ffddcf97bd0 R08: 0000000000000003 R09: 0000000000000000
R10: 0000000000000802 R11: 0000000000000246 R12: 00007f10d6440fc0
R13: 00007ffddcf97c58 R14: fffffffffffff000 R15: 0000000000000000
 </TASK>
task:kworker/u4:11   state:R  running task     stack:18680 pid: 3677 ppid:     2 flags:0x00004000
Workqueue: bat_events batadv_nc_worker
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5030 [inline]
 __schedule+0x12c4/0x45b0 kernel/sched/core.c:6376
 preempt_schedule_irq+0xf7/0x1c0 kernel/sched/core.c:6780
 irqentry_exit+0x53/0x80 kernel/entry/common.c:432
 asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:638
RIP: 0010:lock_acquire+0x252/0x4f0 kernel/locking/lockdep.c:5627
Code: 2b 00 74 08 4c 89 f7 e8 ac 73 67 00 f6 44 24 61 02 0f 85 84 01 00 00 41 f7 c7 00 02 00 00 74 01 fb 48 c7 44 24 40 0e 36 e0 45 <4b> c7 44 25 00 00 00 00 00 43 c7 44 25 09 00 00 00 00 43 c7 44 25
RSP: 0018:ffffc900041d7a80 EFLAGS: 00000206
RAX: 0000000000000001 RBX: 1ffff9200083af5c RCX: 1ffff9200083aefc
RDX: dffffc0000000000 RSI: ffffffff8a8b3c20 RDI: ffffffff8ad8f380
RBP: ffffc900041d7bd8 R08: dffffc0000000000 R09: fffffbfff1f7ec19
R10: 0000000000000000 R11: dffffc0000000001 R12: 1ffff9200083af58
R13: dffffc0000000000 R14: ffffc900041d7ae0 R15: 0000000000000246
 rcu_lock_acquire+0x2a/0x30 include/linux/rcupdate.h:312
 rcu_read_lock include/linux/rcupdate.h:739 [inline]
 batadv_nc_purge_orig_hash net/batman-adv/network-coding.c:412 [inline]
 batadv_nc_worker+0xc1/0x5b0 net/batman-adv/network-coding.c:723
 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:300
 </TASK>
rcu: rcu_preempt kthread timer wakeup didn't happen for 10505 jiffies! g15141 f0x0 RCU_GP_WAIT_FQS(5) ->state=0x402
rcu: 	Possible timer handling issue on cpu=0 timer-softirq=8225
rcu: rcu_preempt kthread starved for 10506 jiffies! g15141 f0x0 RCU_GP_WAIT_FQS(5) ->state=0x402 ->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:I stack:26168 pid:   15 ppid:     2 flags:0x00004000
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5030 [inline]
 __schedule+0x12c4/0x45b0 kernel/sched/core.c:6376
 schedule+0x11b/0x1f0 kernel/sched/core.c:6459
 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:300
 </TASK>
rcu: Stack dump where RCU GP kthread last ran:
Sending NMI from CPU 1 to CPUs 0:
NMI backtrace for cpu 0
CPU: 0 PID: 4721 Comm: sed Not tainted 5.15.156-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024
RIP: 0010:enqueue_hrtimer+0x14b/0x390 kernel/time/hrtimer.c:1087
Code: 00 bf 20 00 00 00 89 ee e8 e2 ce 10 00 48 83 fd 1f 0f 87 05 01 00 00 e8 73 cb 10 00 bb 01 00 00 00 89 e9 d3 e3 43 80 3c 27 00 <74> 08 4c 89 ef e8 1b 90 5a 00 49 8b 6d 00 48 83 c5 44 48 89 e8 48
RSP: 0018:ffffc90000007d28 EFLAGS: 00000046
RAX: ffffffff816f916d RBX: 0000000000000002 RCX: 0000000000000001
RDX: 0000000000010002 RSI: 0000000000000001 RDI: 0000000000000020
RBP: 0000000000000001 R08: ffffffff816f915e R09: fffffbfff1bc8b5e
R10: 0000000000000000 R11: dffffc0000000001 R12: dffffc0000000000
R13: ffff8880b9a2a300 R14: ffff88801aa04b40 R15: 1ffff11017345460
FS:  0000000000000000(0000) GS:ffff8880b9a00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f10d6441290 CR3: 0000000058a18000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <NMI>
 </NMI>
 <IRQ>
 __run_hrtimer kernel/time/hrtimer.c:1703 [inline]
 __hrtimer_run_queues+0x6b6/0xcf0 kernel/time/hrtimer.c:1750
 hrtimer_interrupt+0x392/0x980 kernel/time/hrtimer.c:1812
 local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1085 [inline]
 __sysvec_apic_timer_interrupt+0x139/0x470 arch/x86/kernel/apic/apic.c:1102
 sysvec_apic_timer_interrupt+0x8c/0xb0 arch/x86/kernel/apic/apic.c:1096
 </IRQ>
 <TASK>
 asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:638
RIP: 0010:lock_acquire+0x252/0x4f0 kernel/locking/lockdep.c:5627
Code: 2b 00 74 08 4c 89 f7 e8 ac 73 67 00 f6 44 24 61 02 0f 85 84 01 00 00 41 f7 c7 00 02 00 00 74 01 fb 48 c7 44 24 40 0e 36 e0 45 <4b> c7 44 25 00 00 00 00 00 43 c7 44 25 09 00 00 00 00 43 c7 44 25
RSP: 0018:ffffc90003427800 EFLAGS: 00000206
RAX: 0000000000000001 RBX: 1ffff92000684f0c RCX: ffffffff81636522
RDX: dffffc0000000000 RSI: ffffffff8a8b3c20 RDI: ffffffff8ad8f380
RBP: ffffc90003427950 R08: dffffc0000000000 R09: fffffbfff1f7ec19
R10: 0000000000000000 R11: dffffc0000000001 R12: 1ffff92000684f08
R13: dffffc0000000000 R14: ffffc90003427860 R15: 0000000000000246
 __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline]
 _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:154
 spin_lock include/linux/spinlock.h:363 [inline]
 browse_rb mm/mmap.c:356 [inline]
 validate_mm+0x36e/0x990 mm/mmap.c:423
 __vma_adjust+0x2cde/0x3150 mm/mmap.c:1021
 __split_vma+0x378/0x4a0
 mprotect_fixup+0x675/0x7d0 mm/mprotect.c:477
 do_mprotect_pkey+0x75b/0xa50 mm/mprotect.c:636
 __do_sys_mprotect mm/mprotect.c:662 [inline]
 __se_sys_mprotect mm/mprotect.c:659 [inline]
 __x64_sys_mprotect+0x7c/0x90 mm/mprotect.c:659
 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:0x7f10d645dbb7
Code: 00 00 00 b8 0b 00 00 00 0f 05 48 3d 01 f0 ff ff 73 01 c3 48 8d 0d b9 46 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 99 46 01 00 f7 d8 89 01 48 83
RSP: 002b:00007ffddcf977f8 EFLAGS: 00000246 ORIG_RAX: 000000000000000a
RAX: ffffffffffffffda RBX: 00000fffbb9f2f00 RCX: 00007f10d645dbb7
RDX: 0000000000000000 RSI: 000000000001c000 RDI: 00007f10d619c000
RBP: 00007ffddcf97bd0 R08: 0000000000000003 R09: 0000000000000000
R10: 0000000000000802 R11: 0000000000000246 R12: 00007f10d6440fc0
R13: 00007ffddcf97c58 R14: fffffffffffff000 R15: 0000000000000000
 </TASK>

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/04/26 17:11 linux-5.15.y c52b9710c83d 059e9963 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: rcu detected stall in sys_mprotect
* Struck through repros no longer work on HEAD.