syzbot


INFO: rcu detected stall in sys_mlock2

Status: auto-obsoleted due to no activity on 2024/08/31 13:47
Subsystems: cgroups mm
[Documentation on labels]
First crash: 226d, last: 226d

Sample crash report:
rcu: INFO: rcu_preempt detected stalls on CPUs/tasks:
rcu: 	Tasks blocked on level-0 rcu_node (CPUs 0-1): P6679/1:b..l P12605/1:b..l
rcu: 	(detected by 0, t=10502 jiffies, g=63929, q=550 ncpus=2)
task:syz.0.1871      state:R  running task     stack:26048 pid:12605 tgid:12602 ppid:11537  flags:0x00000002
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5248 [inline]
 __schedule+0x1800/0x4a60 kernel/sched/core.c:6600
 preempt_schedule_irq+0xfb/0x1c0 kernel/sched/core.c:6922
 irqentry_exit+0x5e/0x90 kernel/entry/common.c:354
 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702
RIP: 0010:kasan_check_range+0x5/0x290 mm/kasan/generic.c:188
Code: 8d e8 0f dc e3 ff 90 0f 0b 66 2e 0f 1f 84 00 00 00 00 00 66 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 66 0f 1f 00 55 <41> 57 41 56 41 54 53 b0 01 48 85 f6 0f 84 a0 01 00 00 4c 8d 04 37
RSP: 0018:ffffc9000b29f310 EFLAGS: 00000246
RAX: 0000000000000000 RBX: 0000000000000001 RCX: ffffffff816f8e20
RDX: 0000000000000000 RSI: 0000000000000008 RDI: ffffffff8faf7ea8
RBP: ffffc9000b29f450 R08: ffffffff8faf7eaf R09: 1ffffffff1f5efd5
R10: dffffc0000000000 R11: fffffbfff1f5efd6 R12: 1ffff92001653e70
R13: ffffffff8201f058 R14: ffffffff8201f058 R15: dffffc0000000000
 instrument_atomic_read include/linux/instrumented.h:68 [inline]
 _test_bit include/asm-generic/bitops/instrumented-non-atomic.h:141 [inline]
 cpumask_test_cpu include/linux/cpumask.h:562 [inline]
 cpu_online include/linux/cpumask.h:1113 [inline]
 trace_lock_release include/trace/events/lock.h:69 [inline]
 lock_release+0xb0/0x9f0 kernel/locking/lockdep.c:5827
 rcu_lock_release include/linux/rcupdate.h:343 [inline]
 rcu_read_unlock include/linux/rcupdate.h:876 [inline]
 get_mem_cgroup_from_mm+0x1ad/0x2a0 mm/memcontrol.c:949
 __mem_cgroup_charge+0x16/0x80 mm/memcontrol.c:4669
 mem_cgroup_charge include/linux/memcontrol.h:685 [inline]
 folio_prealloc+0x52/0x170 mm/memory.c:1068
 alloc_anon_folio mm/memory.c:4499 [inline]
 do_anonymous_page mm/memory.c:4556 [inline]
 do_pte_missing mm/memory.c:3946 [inline]
 handle_pte_fault+0x252d/0x6eb0 mm/memory.c:5523
 __handle_mm_fault mm/memory.c:5666 [inline]
 handle_mm_fault+0x1021/0x1990 mm/memory.c:5831
 faultin_page mm/gup.c:1339 [inline]
 __get_user_pages+0x6ef/0x1590 mm/gup.c:1638
 populate_vma_page_range+0x264/0x330 mm/gup.c:2078
 __mm_populate+0x27a/0x460 mm/gup.c:2181
 do_mlock+0x61e/0x7b0 mm/mlock.c:653
 __do_sys_mlock2 mm/mlock.c:674 [inline]
 __se_sys_mlock2 mm/mlock.c:664 [inline]
 __x64_sys_mlock2+0xad/0xd0 mm/mlock.c:664
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f19d9575f19
RSP: 002b:00007f19d8fff048 EFLAGS: 00000246 ORIG_RAX: 0000000000000145
RAX: ffffffffffffffda RBX: 00007f19d9703f60 RCX: 00007f19d9575f19
RDX: 0000000000000000 RSI: 0000000000400000 RDI: 0000000020c00000
RBP: 00007f19d95e4bcd R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 000000000000000b R14: 00007f19d9703f60 R15: 00007fffcd76f808
 </TASK>
task:udevd           state:R  running task     stack:24864 pid:6679  tgid:6679  ppid:4544   flags:0x00000002
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5248 [inline]
 __schedule+0x1800/0x4a60 kernel/sched/core.c:6600
 preempt_schedule_common+0x84/0xd0 kernel/sched/core.c:6779
 preempt_schedule+0xe1/0xf0 kernel/sched/core.c:6803
 preempt_schedule_thunk+0x1a/0x30 arch/x86/entry/thunk.S:12
 __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:152 [inline]
 _raw_spin_unlock_irqrestore+0x130/0x140 kernel/locking/spinlock.c:194
 spin_unlock_irqrestore include/linux/spinlock.h:406 [inline]
 __wake_up_common_lock+0x18c/0x1e0 kernel/sched/wait.c:108
 sock_def_readable+0x20f/0x5b0 net/core/sock.c:3374
 unix_dgram_sendmsg+0x1490/0x1f80 net/unix/af_unix.c:2170
 sock_sendmsg_nosec net/socket.c:730 [inline]
 __sock_sendmsg+0x221/0x270 net/socket.c:745
 sock_write_iter+0x2dd/0x400 net/socket.c:1160
 new_sync_write fs/read_write.c:497 [inline]
 vfs_write+0xa72/0xc90 fs/read_write.c:590
 ksys_write+0x1a0/0x2c0 fs/read_write.c:643
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f22fdb16bf2
RSP: 002b:00007ffc8778e888 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f22fdb16bf2
RDX: 0000000000000000 RSI: 00007ffc8778e8df RDI: 000000000000000a
RBP: 00007ffc8778e8df R08: 0000000000000001 R09: 0000000000000000
R10: 000000000000010f R11: 0000000000000246 R12: 000000000000000a
R13: 00007f22fdeadae0 R14: 0000000000000000 R15: 00005644d9f62910
 </TASK>
rcu: rcu_preempt kthread starved for 10489 jiffies! g63929 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:26448 pid:17    tgid:17    ppid:2      flags:0x00004000
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5248 [inline]
 __schedule+0x1800/0x4a60 kernel/sched/core.c:6600
 __schedule_loop kernel/sched/core.c:6677 [inline]
 schedule+0x14b/0x320 kernel/sched/core.c:6692
 schedule_timeout+0x1be/0x310 kernel/time/timer.c:2581
 rcu_gp_fqs_loop+0x2df/0x1330 kernel/rcu/tree.c:2034
 rcu_gp_kthread+0xa7/0x3b0 kernel/rcu/tree.c:2236
 kthread+0x2f0/0x390 kernel/kthread.c:389
 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:144
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
 </TASK>
rcu: Stack dump where RCU GP kthread last ran:
Sending NMI from CPU 0 to CPUs 1:
NMI backtrace for cpu 1 skipped: idling at native_safe_halt arch/x86/include/asm/irqflags.h:48 [inline]
NMI backtrace for cpu 1 skipped: idling at arch_safe_halt arch/x86/include/asm/irqflags.h:106 [inline]
NMI backtrace for cpu 1 skipped: idling at acpi_safe_halt+0x21/0x30 drivers/acpi/processor_idle.c:112

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/07/02 13:39 linux-next 82e4255305c5 8373af66 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root INFO: rcu detected stall in sys_mlock2
* Struck through repros no longer work on HEAD.