syzbot


INFO: rcu detected stall in sys_mlockall

Status: upstream: reported on 2024/05/01 17:12
Reported-by: syzbot+87693bef726c64905100@syzkaller.appspotmail.com
First crash: 47d, last: 47d
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-5.15 INFO: rcu detected stall in sys_mlockall 1 5d14h 5d14h 0/3 upstream: reported on 2024/06/12 22:29
android-5-15 BUG: soft lockup in sys_mlockall 1 52d 52d 0/2 premoderation: reported on 2024/04/27 01:55

Sample crash report:
rcu: INFO: rcu_preempt detected stalls on CPUs/tasks:
rcu: 	Tasks blocked on level-0 rcu_node (CPUs 0-1): P3739/1:b..l
	(detected by 0, t=10503 jiffies, g=8229, q=53 ncpus=2)
task:syz-executor.1  state:R  running task     stack:24512 pid:3739  ppid:3569   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:rcu_read_unlock include/linux/rcupdate.h:820 [inline]
RIP: 0010:count_memcg_event_mm+0x330/0x410 include/linux/memcontrol.h:1099
Code: 66 7d bd ff 4c 8b 6c 24 18 eb 1f e8 5a 7d bd ff e8 15 96 bd 08 4d 85 f6 74 84 e8 4b 7d bd ff fb 49 be 00 00 00 00 00 fc ff df <e8> bb 9b bd 08 89 c3 31 ff 89 c6 e8 90 80 bd ff 85 db 74 10 e8 17
RSP: 0018:ffffc90002f7f8a0 EFLAGS: 00000246
RAX: ffffffff81cd1215 RBX: 0000000000000000 RCX: 0000000000040000
RDX: ffffc90005331000 RSI: 000000000003ffff RDI: 0000000000040000
RBP: ffffc90002f7f970 R08: ffffffff81cd1185 R09: fffffbfff209364b
R10: 0000000000000000 R11: dffffc0000000001 R12: 0000000000000046
R13: ffffffff81cd0f80 R14: dffffc0000000000 R15: 1ffff920005eff18
 handle_mm_fault+0x15b/0x5340 mm/memory.c:5254
 faultin_page mm/gup.c:1009 [inline]
 __get_user_pages+0x4f3/0x1190 mm/gup.c:1233
 populate_vma_page_range+0x217/0x2b0 mm/gup.c:1590
 __mm_populate+0x275/0x440 mm/gup.c:1704
 mm_populate include/linux/mm.h:2797 [inline]
 __do_sys_mlockall mm/mlock.c:721 [inline]
 __se_sys_mlockall+0x32f/0x3c0 mm/mlock.c:697
 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:0x7f5df727dea9
RSP: 002b:00007f5df80400c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000097
RAX: ffffffffffffffda RBX: 00007f5df73abf80 RCX: 00007f5df727dea9
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000001
RBP: 00007f5df72ca4a4 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 000000000000000b R14: 00007f5df73abf80 R15: 00007ffd311f6a88
 </TASK>
rcu: rcu_preempt kthread starved for 10533 jiffies! g8229 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:25528 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: 0 PID: 3788 Comm: syz-executor.0 Not tainted 6.1.89-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024
RIP: 0010:__raw_spin_unlock_irq include/linux/spinlock_api_smp.h:160 [inline]
RIP: 0010:_raw_spin_unlock_irq+0x25/0x40 kernel/locking/spinlock.c:202
Code: c1 bc f5 ff 90 53 48 89 fb 48 83 c7 18 48 8b 74 24 08 e8 0e 9e d5 f6 48 89 df e8 76 db d6 f6 e8 41 66 fc f6 fb bf 01 00 00 00 <e8> 26 68 c9 f6 65 8b 05 c7 83 6d 75 85 c0 74 02 5b c3 e8 f4 a8 6b
RSP: 0018:ffffc900044bfb30 EFLAGS: 00000286
RAX: 21050cb1cfa3e500 RBX: ffff88807a5cdc80 RCX: ffffffff91c93103
RDX: dffffc0000000000 RSI: ffffffff8aec01c0 RDI: 0000000000000001
RBP: ffffc900044bfc70 R08: dffffc0000000000 R09: ffffed100f4b9b91
R10: 0000000000000000 R11: dffffc0000000001 R12: 1ffff1100f4b9c23
R13: 000000001c000004 R14: 0000000000000021 R15: ffff88807a5ce118
FS:  00007fd59cbf66c0(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020003b40 CR3: 00000000596b6000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <IRQ>
 </IRQ>
 <TASK>
 spin_unlock_irq include/linux/spinlock.h:401 [inline]
 get_signal+0x154b/0x17d0 kernel/signal.c:2865
 arch_do_signal_or_restart+0xb0/0x1a10 arch/x86/kernel/signal.c:871
 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:0x7fd59e07dea7
Code: 14 25 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 00 00 90 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 b0 ff ff ff f7 d8 64 89
RSP: 002b:00007fd59cbf60c8 EFLAGS: 00000246
RAX: 00000000000000ca RBX: 00007fd59e1abf80 RCX: 00007fd59e07dea9
RDX: 0000000000000000 RSI: 0000800000000006 RDI: 0000000020001300
RBP: 00007fd59e0ca4a4 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 000000000000000b R14: 00007fd59e1abf80 R15: 00007ffcce17ffc8
 </TASK>

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/05/01 17:11 linux-6.1.y dcbc050cb0d3 3ba885bc .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan INFO: rcu detected stall in sys_mlockall
* Struck through repros no longer work on HEAD.