syzbot


INFO: rcu detected stall in sys_unshare

Status: upstream: reported C repro on 2024/05/20 16:51
Bug presence: origin:upstream
[Documentation on labels]
Reported-by: syzbot+d9da5095305cfb770a90@syzkaller.appspotmail.com
First crash: 143d, last: 38d
Bug presence (1)
Date Name Commit Repro Result
2024/05/21 upstream (ToT) 8f6a15f095a6 C [report] INFO: rcu detected stall in corrupted
Similar bugs (10)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream INFO: rcu detected stall in sys_unshare (2) kernel 1 1738d 1738d 0/28 closed as invalid on 2020/01/08 05:23
upstream INFO: rcu detected stall in sys_unshare (5) net 1 1000d 1000d 0/28 closed as invalid on 2022/02/08 10:10
upstream INFO: rcu detected stall in sys_unshare (3) net 1 1224d 1224d 0/28 auto-closed as invalid on 2021/09/03 04:28
upstream INFO: rcu detected stall in sys_unshare (6) kernfs 1 969d 969d 0/28 auto-closed as invalid on 2022/05/15 15:21
upstream INFO: rcu detected stall in sys_unshare (9) bpf C inconclusive 8 4d00h 335d 0/28 upstream: reported C repro on 2023/11/11 00:17
upstream INFO: rcu detected stall in sys_unshare kernel 3 1773d 1774d 0/28 closed as invalid on 2019/12/04 14:04
upstream INFO: rcu detected stall in sys_unshare (4) kernel 1 1133d 1133d 0/28 auto-closed as invalid on 2021/12/03 09:38
upstream INFO: rcu detected stall in sys_unshare (7) bpf net 12 585d 717d 0/28 auto-obsoleted due to no activity on 2023/06/03 15:22
linux-6.1 INFO: rcu detected stall in sys_unshare origin:upstream missing-backport C 5 35d 312d 0/3 upstream: reported C repro on 2023/12/04 08:29
android-5-15 BUG: soft lockup in sys_unshare 1 159d 159d 0/2 auto-obsoleted due to no activity on 2024/08/03 08:28
Fix bisection attempts (2)
Created Duration User Patch Repo Result
2024/08/13 05:57 1h27m bisect fix linux-5.15.y OK (0) job log log
2024/07/01 17:31 1h55m bisect fix linux-5.15.y OK (0) job log log

Sample crash report:
rcu: INFO: rcu_preempt detected stalls on CPUs/tasks:
rcu: 	Tasks blocked on level-0 rcu_node (CPUs 0-1): P1066/1:b..l P3526/1:b..l
	(detected by 0, t=10502 jiffies, g=3625, q=8)
task:syz-executor679 state:R  running task     stack:25880 pid: 3526 ppid:  3520 flags:0x00004002
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 fc 7c 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:ffffc90002cd7200 EFLAGS: 00000206
RAX: 0000000000000001 RBX: 1ffff9200059ae4c RCX: 1ffff9200059adec
RDX: dffffc0000000000 RSI: ffffffff8a8b3c20 RDI: ffffffff8ad8f680
RBP: ffffc90002cd7360 R08: dffffc0000000000 R09: fffffbfff1f7f019
R10: 0000000000000000 R11: dffffc0000000001 R12: 1ffff9200059ae48
R13: dffffc0000000000 R14: ffffc90002cd7260 R15: 0000000000000246
 rcu_lock_acquire+0x2a/0x30 include/linux/rcupdate.h:312
 rcu_read_lock include/linux/rcupdate.h:739 [inline]
 is_bpf_text_address+0x1d/0x260 kernel/bpf/core.c:721
 kernel_text_address kernel/extable.c:151 [inline]
 __kernel_text_address+0x94/0x100 kernel/extable.c:105
 unwind_get_return_address+0x49/0x80 arch/x86/kernel/unwind_orc.c:323
 arch_stack_walk+0xf3/0x140 arch/x86/kernel/stacktrace.c:26
 stack_trace_save+0x113/0x1c0 kernel/stacktrace.c:122
 kasan_save_stack mm/kasan/common.c:38 [inline]
 kasan_set_track mm/kasan/common.c:46 [inline]
 set_alloc_info mm/kasan/common.c:434 [inline]
 ____kasan_kmalloc+0xba/0xf0 mm/kasan/common.c:513
 kasan_kmalloc include/linux/kasan.h:264 [inline]
 kmem_cache_alloc_trace+0x143/0x290 mm/slub.c:3247
 kmalloc include/linux/slab.h:591 [inline]
 kzalloc include/linux/slab.h:721 [inline]
 rxrpc_alloc_peer+0x78/0x340 net/rxrpc/peer_object.c:217
 rxrpc_service_prealloc_one+0x1d8/0xf50 net/rxrpc/call_accept.c:73
 rxrpc_kernel_charge_accept+0xce/0x100 net/rxrpc/call_accept.c:487
 afs_charge_preallocation+0xb6/0x2b0 fs/afs/rxrpc.c:732
 afs_open_socket+0x455/0x600 fs/afs/rxrpc.c:92
 afs_net_init+0x7b5/0x990 fs/afs/main.c:126
 ops_init+0x35d/0x610 net/core/net_namespace.c:138
 setup_net+0x358/0x9e0 net/core/net_namespace.c:332
 copy_net_ns+0x392/0x5d0 net/core/net_namespace.c:476
 create_new_namespaces+0x425/0x7a0 kernel/nsproxy.c:110
 unshare_nsproxy_namespaces+0x11e/0x170 kernel/nsproxy.c:226
 ksys_unshare+0x580/0xb20 kernel/fork.c:3101
 __do_sys_unshare kernel/fork.c:3175 [inline]
 __se_sys_unshare kernel/fork.c:3173 [inline]
 __x64_sys_unshare+0x34/0x40 kernel/fork.c:3173
 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:0x7fa0404312f7
RSP: 002b:00007ffe32f72888 EFLAGS: 00000246 ORIG_RAX: 0000000000000110
RAX: ffffffffffffffda RBX: 00007ffe32f728b8 RCX: 00007fa0404312f7
RDX: 00007fa04042fe79 RSI: 00007ffe32f72930 RDI: 0000000040000000
RBP: 00000000000f4240 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 000055555733f370
R13: 0000000000000004 R14: 0000000000000004 R15: 00007ffe32f728f0
 </TASK>
task:kworker/1:2     state:R  running task     stack:26336 pid: 1066 ppid:     2 flags:0x00004000
Workqueue: events_power_efficient gc_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:seqcount_lockdep_reader_access+0x1dc/0x220 include/linux/seqlock.h:106
Code: f9 4d 85 ed 75 16 e8 03 83 05 f9 eb 15 e8 fc 82 05 f9 e8 e7 23 a3 01 4d 85 ed 74 ea e8 ed 82 05 f9 fb 48 c7 04 24 0e 36 e0 45 <4b> c7 04 3c 00 00 00 00 66 43 c7 44 3c 09 00 00 43 c6 44 3c 0b 00
RSP: 0018:ffffc90004b9fa40 EFLAGS: 00000293
RAX: ffffffff887ad9d3 RBX: 0000000000000000 RCX: ffff88801bebbb80
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffffc90004b9faf0 R08: ffffffff887ad9a9 R09: fffffbfff1f7f02b
R10: 0000000000000000 R11: dffffc0000000001 R12: dffffc0000000000
R13: 0000000000000200 R14: 0000000000000046 R15: 1ffff92000973f48
 nf_conntrack_get_ht include/net/netfilter/nf_conntrack.h:338 [inline]
 gc_worker+0x30f/0x14b0 net/netfilter/nf_conntrack_core.c:1472
 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 starved for 10582 jiffies! g3625 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:27000 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:
NMI backtrace for cpu 0
CPU: 0 PID: 3544 Comm: syz-executor679 Not tainted 5.15.159-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024
Call Trace:
 <IRQ>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x1e3/0x2d0 lib/dump_stack.c:106
 nmi_cpu_backtrace+0x46a/0x4a0 lib/nmi_backtrace.c:111
 nmi_trigger_cpumask_backtrace+0x181/0x2a0 lib/nmi_backtrace.c:62
 trigger_single_cpu_backtrace include/linux/nmi.h:166 [inline]
 rcu_check_gp_kthread_starvation+0x1d2/0x240 kernel/rcu/tree_stall.h:487
 print_other_cpu_stall+0x137a/0x14d0 kernel/rcu/tree_stall.h:592
 check_cpu_stall kernel/rcu/tree_stall.h:745 [inline]
 rcu_pending kernel/rcu/tree.c:3932 [inline]
 rcu_sched_clock_irq+0xa38/0x1150 kernel/rcu/tree.c:2619
 update_process_times+0x196/0x200 kernel/time/timer.c:1818
 tick_sched_handle kernel/time/tick-sched.c:254 [inline]
 tick_sched_timer+0x386/0x550 kernel/time/tick-sched.c:1473
 __run_hrtimer kernel/time/hrtimer.c:1686 [inline]
 __hrtimer_run_queues+0x55b/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:get_current arch/x86/include/asm/current.h:15 [inline]
RIP: 0010:__sanitizer_cov_trace_pc+0x4/0x60 kernel/kcov.c:196
Code: 00 00 00 0f 1f 00 53 48 89 fb e8 17 00 00 00 48 8b 3d e8 0c 64 0c 48 89 de 5b e9 f7 f6 48 00 cc cc cc cc cc cc cc 48 8b 04 24 <65> 48 8b 0d f4 12 82 7e 65 8b 15 f5 12 82 7e f7 c2 00 01 ff 00 74
RSP: 0018:ffffc90002d57d58 EFLAGS: 00000206
RAX: ffffffff8150f74a RBX: 0000000000000000 RCX: ffff888070da0000
RDX: ffff888070da0000 RSI: 0000000000000000 RDI: 00007ffe32f72888
RBP: ffffc90002d57e50 R08: ffffffff8150f73c R09: fffff520005aafbb
R10: 0000000000000000 R11: dffffc0000000001 R12: 1ffff920005aafb4
R13: ffff888070da0000 R14: 00007ffe32f72888 R15: 1ffff1100e1b412e
 do_sigaltstack kernel/signal.c:4201 [inline]
 restore_altstack+0x22a/0x400 kernel/signal.c:4243
 __do_sys_rt_sigreturn+0x19d/0x250 arch/x86/kernel/signal.c:677
 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:0x7fa04042fe79
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 18 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 01 48
RSP: 002b:00007ffe32f72888 EFLAGS: 00000246
RAX: 0000000000000000 RBX: 0000000000000003 RCX: 00007fa04042fe79
RDX: 000000002006b000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 00000000000f4240 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 000055555733f370
R13: 0000000000000000 R14: 00007ffe32f72900 R15: 00007ffe32f728f0
 </TASK>

Crashes (5):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/05/20 16:50 linux-5.15.y 83655231580b c0f1611a .config console log report syz C [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: rcu detected stall in sys_unshare
2024/09/03 05:30 linux-5.15.y fa93fa65db6e 8045124c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: rcu detected stall in sys_unshare
2024/09/02 04:06 linux-5.15.y fa93fa65db6e 1eda0d14 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: rcu detected stall in sys_unshare
2024/08/17 23:30 linux-5.15.y 7e89efd3ae1c dbc93b08 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: rcu detected stall in sys_unshare
2024/05/23 09:22 linux-5.15.y 83655231580b 4c2072ee .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: rcu detected stall in sys_unshare
* Struck through repros no longer work on HEAD.