syzbot


INFO: rcu detected stall in sys_getpid

Status: upstream: reported on 2025/04/25 12:49
Reported-by: syzbot+b1869ce894f0fe19498b@syzkaller.appspotmail.com
First crash: 60d, last: 60d
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-5.15 INFO: rcu detected stall in sys_getpid 1 362d 362d 0/3 auto-obsoleted due to no activity on 2024/10/04 19:18
linux-5.15 INFO: rcu detected stall in sys_getpid (2) origin:lts-only syz error 4 6d05h 205d 0/3 upstream: reported syz repro on 2024/11/30 21:19

Sample crash report:
rcu: INFO: rcu_preempt detected stalls on CPUs/tasks:
rcu: 	Tasks blocked on level-0 rcu_node (CPUs 0-1): P4589/1:b..l P4619/1:b..l P4263/1:b..l
	(detected by 1, t=10502 jiffies, g=11737, q=190 ncpus=2)
task:syz-executor    state:R  running task     stack:21920 pid:4263  ppid:4246   flags:0x00004002
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5244 [inline]
 __schedule+0x10e9/0x40d0 kernel/sched/core.c:6561
 preempt_schedule_common+0x82/0xd0 kernel/sched/core.c:6730
 preempt_schedule+0xa7/0xb0 kernel/sched/core.c:6754
 preempt_schedule_thunk+0x16/0x18 arch/x86/entry/thunk_64.S:34
 unwind_next_frame+0x1892/0x20b0 arch/x86/kernel/unwind_orc.c:629
 arch_stack_walk+0x10c/0x140 arch/x86/kernel/stacktrace.c:25
 stack_trace_save+0x98/0xe0 kernel/stacktrace.c:122
 save_stack+0xf3/0x1e0 mm/page_owner.c:127
 __reset_page_owner+0x51/0x1a0 mm/page_owner.c:148
 reset_page_owner include/linux/page_owner.h:24 [inline]
 free_pages_prepare mm/page_alloc.c:1459 [inline]
 free_pcp_prepare mm/page_alloc.c:1509 [inline]
 free_unref_page_prepare+0x8b4/0x9a0 mm/page_alloc.c:3384
 free_unref_page_list+0xbb/0x8e0 mm/page_alloc.c:3525
 release_pages+0x1f92/0x2200 mm/swap.c:1035
 __pagevec_release+0x6d/0xe0 mm/swap.c:1055
 pagevec_release include/linux/pagevec.h:71 [inline]
 folio_batch_release include/linux/pagevec.h:135 [inline]
 shmem_undo_range+0x75b/0x2050 mm/shmem.c:946
 shmem_truncate_range mm/shmem.c:1062 [inline]
 shmem_evict_inode+0x248/0xa40 mm/shmem.c:1171
 evict+0x485/0x870 fs/inode.c:705
 __dentry_kill+0x431/0x650 fs/dcache.c:611
 dentry_kill+0xb8/0x290 fs/dcache.c:-1
 dput+0xfa/0x1d0 fs/dcache.c:918
 __fput+0x5e0/0x920 fs/file_table.c:328
 task_work_run+0x1ca/0x250 kernel/task_work.c:203
 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline]
 exit_to_user_mode_loop+0xe6/0x110 kernel/entry/common.c:177
 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+0x16/0x40 kernel/entry/common.c:303
 do_syscall_64+0x58/0xa0 arch/x86/entry/common.c:87
 entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f5bf838fc97
RSP: 002b:00007ffd4ef04428 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6
RAX: 0000000000000000 RBX: 00007f5bf841089d RCX: 00007f5bf838fc97
RDX: 0000000000000000 RSI: 0000000000000009 RDI: 00007ffd4ef044e0
RBP: 00007ffd4ef044e0 R08: 0000000000000000 R09: 0000000000000000
R10: 00000000ffffffff R11: 0000000000000246 R12: 00007ffd4ef05570
R13: 00007f5bf841089d R14: 0000000000018877 R15: 00007ffd4ef055b0
 </TASK>
task:syz.4.95        state:R  running task     stack:26240 pid:4619  ppid:4255   flags:0x00004000
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5244 [inline]
 __schedule+0x10e9/0x40d0 kernel/sched/core.c:6561
 preempt_schedule_irq+0xb1/0x150 kernel/sched/core.c:6873
 irqentry_exit+0x63/0x70 kernel/entry/common.c:439
 asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:691
RIP: 0010:check_region_inline mm/kasan/generic.c:172 [inline]
RIP: 0010:kasan_check_range+0x1c/0x290 mm/kasan/generic.c:189
Code: ff c3 00 00 cc cc 00 00 cc cc 00 00 cc cc b0 01 48 85 f6 0f 84 a4 01 00 00 41 57 41 56 53 49 89 f8 49 01 f0 0f 82 57 02 00 00 <49> 89 f8 49 c1 e8 2f 41 81 f8 ff ff 01 00 0f 82 43 02 00 00 49 bf
RSP: 0018:ffffc90005ccfd80 EFLAGS: 00000292
RAX: 0000000000000001 RBX: 0000000000000000 RCX: ffffffff8162d679
RDX: 0000000000000000 RSI: 0000000000000008 RDI: ffffffff8dfe7a68
RBP: ffffc90005ccfec0 R08: ffffffff8dfe7a70 R09: 0000000000000000
R10: fffffbfff1bfcf4e R11: 1ffffffff1bfcf4d R12: 0000000000000001
R13: 1ffff92000b99fc0 R14: 0000000000000000 R15: dffffc0000000000
 instrument_atomic_read include/linux/instrumented.h:72 [inline]
 _test_bit include/asm-generic/bitops/instrumented-non-atomic.h:141 [inline]
 cpumask_test_cpu include/linux/cpumask.h:444 [inline]
 cpu_online include/linux/cpumask.h:1030 [inline]
 trace_lock_acquire include/trace/events/lock.h:24 [inline]
 lock_acquire+0xd9/0x490 kernel/locking/lockdep.c:5633
 rcu_lock_acquire include/linux/rcupdate.h:350 [inline]
 rcu_read_lock include/linux/rcupdate.h:791 [inline]
 __task_pid_nr_ns+0x44/0x460 kernel/pid.c:497
 task_tgid_vnr include/linux/sched.h:1628 [inline]
 __ia32_sys_getpid+0x19/0x20 kernel/sys.c:953
 do_syscall_x64 arch/x86/entry/common.c:51 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:81
 entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f010f785927
RSP: 002b:00007ffdaf48cf88 EFLAGS: 00000206 ORIG_RAX: 0000000000000027
RAX: ffffffffffffffda RBX: 00007ffdaf48d0f0 RCX: 00007f010f785927
RDX: 00007ffdaf48cfc0 RSI: 00007ffdaf48d0f0 RDI: 0000000000000021
RBP: 0000000000000000 R08: 00007f010f9b6038 R09: 00007f010f9a2000
R10: 00007f010ebff008 R11: 0000000000000206 R12: 0000000000000004
R13: 0000000000000137 R14: ffffffff817126cc R15: 00000000000019f8
 </TASK>
task:syz.2.85        state:R  running task     stack:25856 pid:4589  ppid:4259   flags:0x00004004
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5244 [inline]
 __schedule+0x10e9/0x40d0 kernel/sched/core.c:6561
 preempt_schedule_common+0x82/0xd0 kernel/sched/core.c:6730
 preempt_schedule+0xa7/0xb0 kernel/sched/core.c:6754
 preempt_schedule_thunk+0x16/0x18 arch/x86/entry/thunk_64.S:34
 __raw_spin_unlock_irq include/linux/spinlock_api_smp.h:160 [inline]
 _raw_spin_unlock_irq+0x3c/0x40 kernel/locking/spinlock.c:202
 spin_unlock_irq include/linux/spinlock.h:401 [inline]
 loop_queue_work drivers/block/loop.c:894 [inline]
 loop_queue_rq+0x9d9/0xac0 drivers/block/loop.c:1874
 __blk_mq_issue_directly block/blk-mq.c:2631 [inline]
 __blk_mq_try_issue_directly+0x4ab/0x7a0 block/blk-mq.c:2684
 blk_mq_try_issue_directly+0x28/0x1f0 block/blk-mq.c:2708
 blk_mq_submit_bio+0x1221/0x1f80 block/blk-mq.c:3045
 __submit_bio+0x1a7/0x290 block/blk-core.c:591
 __submit_bio_noacct_mq block/blk-core.c:668 [inline]
 submit_bio_noacct_nocheck+0x7b4/0xa70 block/blk-core.c:697
 submit_bio_wait+0x101/0x200 block/bio.c:1319
 xfs_rw_bdev+0x2c8/0x2f0 fs/xfs/xfs_bio_io.c:53
 xlog_do_io+0x17a/0x350 fs/xfs/xfs_log_recover.c:140
 xlog_write_log_records+0x2ca/0x3c0 fs/xfs/xfs_log_recover.c:1578
 xlog_clear_stale_blocks+0x200/0x420 fs/xfs/xfs_log_recover.c:1695
 xlog_find_tail+0x7ac/0xa00 fs/xfs/xfs_log_recover.c:1365
 xlog_recover+0x48/0x450 fs/xfs/xfs_log_recover.c:3371
 xfs_log_mount+0x2ba/0x460 fs/xfs/xfs_log.c:716
 xfs_mountfs+0xc42/0x1d10 fs/xfs/xfs_mount.c:819
 xfs_fs_fill_super+0x10f0/0x1350 fs/xfs/xfs_super.c:1681
 get_tree_bdev+0x3f1/0x610 fs/super.c:1366
 vfs_get_tree+0x88/0x270 fs/super.c:1573
 do_new_mount+0x24a/0xa40 fs/namespace.c:3057
 do_mount fs/namespace.c:3400 [inline]
 __do_sys_mount fs/namespace.c:3608 [inline]
 __se_sys_mount+0x2d6/0x3c0 fs/namespace.c:3585
 do_syscall_x64 arch/x86/entry/common.c:51 [inline]
 do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:81
 entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f222239010a
RSP: 002b:00007f222326ee68 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007f222326eef0 RCX: 00007f222239010a
RDX: 0000200000000080 RSI: 0000200000009840 RDI: 00007f222326eeb0
RBP: 0000200000000080 R08: 00007f222326eef0 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000200000009840
R13: 00007f222326eeb0 R14: 000000000000980a R15: 0000200000000000
 </TASK>
rcu: rcu_preempt kthread starved for 9866 jiffies! g11737 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:27200 pid:16    ppid:2      flags:0x00004000
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5244 [inline]
 __schedule+0x10e9/0x40d0 kernel/sched/core.c:6561
 schedule+0xb9/0x180 kernel/sched/core.c:6637
 schedule_timeout+0x15c/0x280 kernel/time/timer.c:1965
 rcu_gp_fqs_loop+0x2f2/0x1310 kernel/rcu/tree.c:1706
 rcu_gp_kthread+0x95/0x380 kernel/rcu/tree.c:1905
 kthread+0x29d/0x330 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
 </TASK>
rcu: Stack dump where RCU GP kthread last ran:
CPU: 1 PID: 0 Comm: swapper/1 Not tainted 6.1.135-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025
RIP: 0010:default_idle+0xb/0x10 arch/x86/kernel/process.c:736
Code: 48 89 df e8 87 55 b9 f7 e9 4c ff ff ff e8 4d 14 f6 ff 00 00 cc cc 00 00 cc cc 00 00 cc cc 00 66 90 0f 00 2d 37 c3 4d 00 fb f4 <c3> 0f 1f 40 00 41 57 41 56 53 49 be 00 00 00 00 00 fc ff df 65 48
RSP: 0018:ffffc90000177de8 EFLAGS: 000002c6
RAX: 7b78468d4e5ca700 RBX: ffffffff8a18e0d7 RCX: 7b78468d4e5ca700
RDX: 0000000000000001 RSI: ffffffff8a6bff00 RDI: ffffffff8abf0ea0
RBP: ffffc90000177f20 R08: dffffc0000000000 R09: ffffed10171e6aee
R10: ffffed10171e6aee R11: 1ffff110171e6aed R12: 0000000000000001
R13: dffffc0000000000 R14: ffff88813feb1dc0 R15: 1ffffffff1bfcf8e
FS:  0000000000000000(0000) GS:ffff8880b8f00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fb354f0b6c0 CR3: 000000007e4ec000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 default_idle_call+0x84/0xc0 kernel/sched/idle.c:109
 cpuidle_idle_call kernel/sched/idle.c:191 [inline]
 do_idle+0x1fc/0x570 kernel/sched/idle.c:303
 cpu_startup_entry+0x3f/0x60 kernel/sched/idle.c:401
 start_secondary+0xe4/0xf0 arch/x86/kernel/smpboot.c:281
 secondary_startup_64_no_verify+0xcf/0xdb
 </TASK>

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/04/25 12:48 linux-6.1.y 535ec20c5027 e3715315 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan INFO: rcu detected stall in sys_getpid
* Struck through repros no longer work on HEAD.