syzbot


INFO: rcu detected stall in sys_mprotect

Status: upstream: reported on 2024/05/24 04:55
Reported-by: syzbot+5abe6470e48cf6572688@syzkaller.appspotmail.com
First crash: 25d, last: 6d00h
Similar bugs (9)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream INFO: rcu detected stall in sys_mprotect (6) kernel 3 523d 574d 0/27 auto-obsoleted due to no activity on 2023/04/20 15:51
upstream INFO: rcu detected stall in sys_mprotect (3) kernel 3 1623d 1623d 0/27 closed as invalid on 2020/01/09 08:13
upstream INFO: rcu detected stall in sys_mprotect (2) kernel 1 1623d 1623d 0/27 closed as invalid on 2020/01/08 05:23
linux-5.15 INFO: rcu detected stall in sys_mprotect 1 53d 53d 0/3 upstream: reported on 2024/04/26 17:12
upstream INFO: rcu detected stall in sys_mprotect (5) kernel 1 841d 841d 0/27 auto-closed as invalid on 2022/05/29 03:15
upstream INFO: rcu detected stall in sys_mprotect (4) mm 1 907d 907d 0/27 closed as invalid on 2022/02/08 10:00
upstream INFO: rcu detected stall in sys_mprotect kernel 3 1659d 1659d 0/27 closed as invalid on 2019/12/04 14:04
upstream INFO: rcu detected stall in sys_mprotect (7) mm 9 154d 381d 0/27 auto-obsoleted due to no activity on 2024/04/15 19:55
android-5-15 BUG: soft lockup in sys_mprotect 1 20d 20d 0/2 premoderation: reported on 2024/05/29 08:16

Sample crash report:
rcu: INFO: rcu_preempt detected stalls on CPUs/tasks:
rcu: 	Tasks blocked on level-0 rcu_node (CPUs 0-1): P5565/1:b..l
	(detected by 1, t=10503 jiffies, g=18033, q=174 ncpus=2)
task:modprobe        state:R  running task     stack:23880 pid:5565  ppid:9      flags:0x00004002
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5245 [inline]
 __schedule+0x142d/0x4550 kernel/sched/core.c:6558
 preempt_schedule_irq+0xf7/0x1c0 kernel/sched/core.c:6870
 irqentry_exit+0x53/0x80 kernel/entry/common.c:439
 asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:653
RIP: 0010:lock_acquire+0x26f/0x5a0 kernel/locking/lockdep.c:5666
Code: 2b 00 74 08 4c 89 f7 e8 cf aa 77 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:ffffc900037bf8c0 EFLAGS: 00000206
RAX: 0000000000000001 RBX: 1ffff920006f7f24 RCX: 1ffff920006f7ec4
RDX: dffffc0000000000 RSI: ffffffff8aec13c0 RDI: ffffffff8b3d4520
RBP: ffffc900037bfa10 R08: dffffc0000000000 R09: fffffbfff2093a45
R10: 0000000000000000 R11: dffffc0000000001 R12: 1ffff920006f7f20
R13: dffffc0000000000 R14: ffffc900037bf920 R15: 0000000000000246
 rcu_lock_acquire include/linux/rcupdate.h:350 [inline]
 rcu_read_lock include/linux/rcupdate.h:791 [inline]
 get_obj_cgroup_from_current+0xf1/0x280 mm/memcontrol.c:3016
 memcg_slab_pre_alloc_hook mm/slab.h:485 [inline]
 slab_pre_alloc_hook+0x90/0x300 mm/slab.h:715
 slab_alloc_node mm/slub.c:3318 [inline]
 slab_alloc mm/slub.c:3406 [inline]
 __kmem_cache_alloc_lru mm/slub.c:3413 [inline]
 kmem_cache_alloc+0x4e/0x2d0 mm/slub.c:3422
 anon_vma_chain_alloc mm/rmap.c:141 [inline]
 anon_vma_clone+0x94/0x4d0 mm/rmap.c:287
 __split_vma+0x1bf/0x530 mm/mmap.c:2367
 mprotect_fixup+0x753/0x840 mm/mprotect.c:623
 do_mprotect_pkey+0x8b6/0xbe0 mm/mprotect.c:792
 __do_sys_mprotect mm/mprotect.c:819 [inline]
 __se_sys_mprotect mm/mprotect.c:816 [inline]
 __x64_sys_mprotect+0x7c/0x90 mm/mprotect.c:816
 do_syscall_x64 arch/x86/entry/common.c:51 [inline]
 do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81
 entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f990a812bb7
RSP: 002b:00007ffe381e2f48 EFLAGS: 00000206 ORIG_RAX: 000000000000000a
RAX: ffffffffffffffda RBX: 00007f990a7f55c0 RCX: 00007f990a812bb7
RDX: 0000000000000001 RSI: 0000000000004000 RDI: 00007f990a71f000
RBP: 00007ffe381e3060 R08: 00007ffe381e0000 R09: 00007f990a826ab0
R10: 00007f990a585ab8 R11: 0000000000000206 R12: 00007f990a7f55c0
R13: 00007f990a81aeda R14: 00007f990a722bf8 R15: 00007f990a722b70
 </TASK>
rcu: rcu_preempt kthread starved for 10533 jiffies! g18033 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:27256 pid:16    ppid:2      flags:0x00004000
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5245 [inline]
 __schedule+0x142d/0x4550 kernel/sched/core.c:6558
 schedule+0xbf/0x180 kernel/sched/core.c:6634
 schedule_timeout+0x1b9/0x300 kernel/time/timer.c:1965
 rcu_gp_fqs_loop+0x2d2/0x1150 kernel/rcu/tree.c:1706
 rcu_gp_kthread+0xa3/0x3b0 kernel/rcu/tree.c:1905
 kthread+0x28d/0x320 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308
 </TASK>
rcu: Stack dump where RCU GP kthread last ran:
CPU: 1 PID: 5572 Comm: syz-executor.3 Not tainted 6.1.93-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024
RIP: 0010:lock_is_held_type+0x137/0x180
Code: 75 40 48 c7 04 24 00 00 00 00 9c 8f 04 24 f7 04 24 00 02 00 00 75 46 41 f7 c4 00 02 00 00 74 01 fb 65 48 8b 04 25 28 00 00 00 <48> 3b 44 24 08 75 3c 89 e8 48 83 c4 10 5b 41 5c 41 5d 41 5e 41 5f
RSP: 0018:ffffc90003fdf998 EFLAGS: 00000206
RAX: 6c81de763572ba00 RBX: ffff88805163bb80 RCX: ffff88805163bb80
RDX: 0000000000000000 RSI: ffffffff8aec13c0 RDI: ffffffff8b3d4520
RBP: 0000000000000000 R08: ffffffff81cdcfec R09: ffffc90003fdfbe0
R10: 0000000000000000 R11: dffffc0000000001 R12: 0000000000000246
R13: ffff88805163bb80 R14: 00000000ffffffff R15: ffffffff8d12ad20
FS:  00007f92349b96c0(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000001b32557000 CR3: 000000007df8e000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <IRQ>
 </IRQ>
 <TASK>
 lock_is_held include/linux/lockdep.h:283 [inline]
 __might_resched+0xa1/0x780 kernel/sched/core.c:9904
 __might_fault+0x69/0x110 mm/memory.c:5832
 clear_rseq_cs kernel/rseq.c:228 [inline]
 rseq_ip_fixup kernel/rseq.c:262 [inline]
 __rseq_handle_notify_resume+0x5ba/0x1500 kernel/rseq.c:300
 rseq_handle_notify_resume include/linux/sched.h:2329 [inline]
 rseq_signal_deliver include/linux/sched.h:2338 [inline]
 setup_rt_frame arch/x86/kernel/signal.c:773 [inline]
 handle_signal arch/x86/kernel/signal.c:828 [inline]
 arch_do_signal_or_restart+0x27c/0x1a10 arch/x86/kernel/signal.c:873
 exit_to_user_mode_loop+0x6a/0x100 kernel/entry/common.c:174
 exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:210
 __syscall_exit_to_user_mode_work kernel/entry/common.c:292 [inline]
 syscall_exit_to_user_mode+0x60/0x270 kernel/entry/common.c:303
 do_syscall_64+0x47/0xb0 arch/x86/entry/common.c:87
 entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f9233c7b9a7
Code: 73 01 c3 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 b8 02 01 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f92349b8ef8 EFLAGS: 00000202
RAX: 0000000000000000 RBX: 00007f92349b8f80 RCX: 00007f9233c7b9a7
RDX: 00000000000001ff RSI: 0000000020000000 RDI: 00000000ffffff9c
RBP: 0000000020000180 R08: 0000000000000000 R09: 0000000000000450
R10: 0000000000000000 R11: 0000000000000202 R12: 0000000020000000
R13: 00007f92349b8f40 R14: 0000000000000456 R15: 0000000020000200
 </TASK>
sched: RT throttling activated

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/06/13 02:27 linux-6.1.y ae9f2a70d69e 2aa5052f .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan INFO: rcu detected stall in sys_mprotect
2024/06/11 10:43 linux-6.1.y 88690811da69 b7d9eb04 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan INFO: rcu detected stall in sys_mprotect
2024/05/24 04:54 linux-6.1.y 4078fa637fcd 8f98448e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-arm64 INFO: rcu detected stall in sys_mprotect
* Struck through repros no longer work on HEAD.