[v5.15] INFO: rcu detected stall in sock_close (2)

4 views
Skip to first unread message

syzbot

unread,
Jan 24, 2024, 9:38:32 AMJan 24
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: ddcaf4999061 Linux 5.15.147
git tree: linux-5.15.y
console output: https://syzkaller.appspot.com/x/log.txt?x=14b92a1de80000
kernel config: https://syzkaller.appspot.com/x/.config?x=8c65db3d25098c3c
dashboard link: https://syzkaller.appspot.com/bug?extid=bf65bbd8619749b37df4
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/33608a58aade/disk-ddcaf499.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/f475952349f9/vmlinux-ddcaf499.xz
kernel image: https://storage.googleapis.com/syzbot-assets/0875b18fba29/bzImage-ddcaf499.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+bf65bb...@syzkaller.appspotmail.com

rcu: INFO: rcu_preempt detected stalls on CPUs/tasks:
rcu: Tasks blocked on level-0 rcu_node (CPUs 0-1): P18274/1:b..l
(detected by 1, t=10502 jiffies, g=194341, q=183)
task:syz-executor.3 state:R running task stack:20856 pid:18274 ppid: 18268 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:426
asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:638
RIP: 0010:rcu_is_watching+0x67/0xa0 kernel/rcu/tree.c:1125
Code: f4 5e 00 48 c7 c3 c8 a6 03 00 49 03 1e 48 89 d8 48 c1 e8 03 42 0f b6 04 38 84 c0 75 1a 8b 03 65 ff 0d 55 84 97 7e 74 08 24 01 <5b> 41 5e 41 5f c3 e8 f6 9b 95 ff eb f1 89 d9 80 e1 07 80 c1 03 38
RSP: 0018:ffffc90005a0f7a0 EFLAGS: 00000202
RAX: 000000000001fa01 RBX: ffff8880b9a3a6c8 RCX: ffff888022f81dc0
RDX: ffff888022f81dc0 RSI: ffffffff8ad87de0 RDI: ffffffff8ad87da0
RBP: 0000000000000000 R08: ffffffff818ccac9 R09: fffffbfff1f79e19
R10: 0000000000000000 R11: dffffc0000000001 R12: dffffc0000000000
R13: 0000000000000000 R14: ffffffff8c34d7f0 R15: dffffc0000000000
rcu_read_unlock include/linux/rcupdate.h:725 [inline]
is_bpf_text_address+0x1d2/0x260 kernel/bpf/core.c:723
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+0x4b/0x80 mm/kasan/common.c:46
kasan_set_free_info+0x1f/0x40 mm/kasan/generic.c:360
____kasan_slab_free+0xd8/0x120 mm/kasan/common.c:366
kasan_slab_free include/linux/kasan.h:230 [inline]
slab_free_hook mm/slub.c:1705 [inline]
slab_free_freelist_hook+0xdd/0x160 mm/slub.c:1731
slab_free mm/slub.c:3499 [inline]
kfree+0xf1/0x270 mm/slub.c:4559
security_sk_free+0x40/0x80 security/security.c:2283
sk_prot_free net/core/sock.c:1884 [inline]
__sk_destruct+0x56a/0x840 net/core/sock.c:1974
inet_release+0x174/0x1f0 net/ipv4/af_inet.c:431
__sock_release net/socket.c:649 [inline]
sock_close+0xcd/0x230 net/socket.c:1336
__fput+0x3bf/0x890 fs/file_table.c:280
task_work_run+0x129/0x1a0 kernel/task_work.c:164
tracehook_notify_resume include/linux/tracehook.h:189 [inline]
exit_to_user_mode_loop+0x106/0x130 kernel/entry/common.c:175
exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:208
__syscall_exit_to_user_mode_work kernel/entry/common.c:290 [inline]
syscall_exit_to_user_mode+0x5d/0x250 kernel/entry/common.c:301
do_syscall_64+0x49/0xb0 arch/x86/entry/common.c:86
entry_SYSCALL_64_after_hwframe+0x61/0xcb
RIP: 0033:0x7ff2de4f1c9a
RSP: 002b:00007ffc163bf060 EFLAGS: 00000293 ORIG_RAX: 0000000000000003
RAX: 0000000000000000 RBX: 0000000000000003 RCX: 00007ff2de4f1c9a
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000003
RBP: 00007ffc163bf0dc R08: 00000000000003b8 R09: 0079746972756365
R10: 00007ff2de5f16a0 R11: 0000000000000293 R12: 0000000000000032
R13: 000000000017f353 R14: 000000000017f182 R15: 000000000000001a
</TASK>
rcu: rcu_preempt kthread starved for 10541 jiffies! g194341 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: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:1884
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:319
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298
</TASK>
rcu: Stack dump where RCU GP kthread last ran:
NMI backtrace for cpu 1
CPU: 1 PID: 18202 Comm: syz-executor.0 Not tainted 5.15.147-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/17/2023
Call Trace:
<IRQ>
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x1e3/0x2cb 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:1788
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:1685 [inline]
__hrtimer_run_queues+0x55b/0xcf0 kernel/time/hrtimer.c:1749
hrtimer_interrupt+0x392/0x980 kernel/time/hrtimer.c:1811
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:native_safe_halt arch/x86/include/asm/irqflags.h:51 [inline]
RIP: 0010:arch_safe_halt arch/x86/include/asm/irqflags.h:89 [inline]
RIP: 0010:kvm_wait+0x1b4/0x200 arch/x86/kernel/kvm.c:918
Code: e0 48 c1 e8 03 42 0f b6 04 28 84 c0 75 42 45 0f b6 34 24 e8 1e c5 4e 00 44 3a 74 24 1c 75 10 66 90 0f 00 2d fe 86 50 09 fb f4 <e9> c8 fe ff ff fb e9 c2 fe ff ff 44 89 e1 80 e1 07 38 c1 0f 8c 54
RSP: 0018:ffffc900057ae9a0 EFLAGS: 00000246
RAX: 2ef429402bf64800 RBX: 1ffff92000af5d38 RCX: ffffffff8162ee48
RDX: dffffc0000000000 RSI: ffffffff8a8b0f80 RDI: ffffffff8ad87e00
RBP: ffffc900057aea70 R08: dffffc0000000000 R09: fffffbfff1f79e19
R10: 0000000000000000 R11: dffffc0000000001 R12: ffffffff8c9de480
R13: dffffc0000000000 R14: 0000000000000003 R15: ffffc900057ae9e0
pv_wait arch/x86/include/asm/paravirt.h:597 [inline]
pv_wait_head_or_lock kernel/locking/qspinlock_paravirt.h:470 [inline]
__pv_queued_spin_lock_slowpath+0x6bc/0xc40 kernel/locking/qspinlock.c:508
pv_queued_spin_lock_slowpath arch/x86/include/asm/paravirt.h:585 [inline]
queued_spin_lock_slowpath+0x42/0x50 arch/x86/include/asm/qspinlock.h:51
queued_spin_lock include/asm-generic/qspinlock.h:85 [inline]
do_raw_spin_lock+0x269/0x370 kernel/locking/spinlock_debug.c:115
spin_lock include/linux/spinlock.h:363 [inline]
preload_this_cpu_lock mm/vmalloc.c:1500 [inline]
alloc_vmap_area+0x23c/0x19a0 mm/vmalloc.c:1542
__get_vm_area_node+0x16e/0x2f0 mm/vmalloc.c:2423
__vmalloc_node_range+0xe3/0x8c0 mm/vmalloc.c:3019
__vmalloc_node mm/vmalloc.c:3079 [inline]
vzalloc+0x75/0x80 mm/vmalloc.c:3149
alloc_counters+0xcf/0x7d0 net/ipv4/netfilter/arp_tables.c:659
copy_entries_to_user net/ipv4/netfilter/arp_tables.c:680 [inline]
get_entries net/ipv4/netfilter/arp_tables.c:866 [inline]
do_arpt_get_ctl+0xe59/0x1680 net/ipv4/netfilter/arp_tables.c:1452
nf_getsockopt+0x28e/0x2b0 net/netfilter/nf_sockopt.c:116
ip_getsockopt+0x136c/0x1ec0 net/ipv4/ip_sockglue.c:1787
tcp_getsockopt+0x26d/0x6c20 net/ipv4/tcp.c:4293
__sys_getsockopt+0x2a6/0x550 net/socket.c:2242
__do_sys_getsockopt net/socket.c:2257 [inline]
__se_sys_getsockopt net/socket.c:2254 [inline]
__x64_sys_getsockopt+0xb1/0xc0 net/socket.c:2254
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x61/0xcb
RIP: 0033:0x7f016201f94a
Code: c4 c1 e0 1a 0d 00 00 04 00 89 01 e9 e0 fe ff ff e8 3b 05 00 00 66 2e 0f 1f 84 00 00 00 00 00 90 49 89 ca b8 37 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 06 c3 0f 1f 44 00 00 48 c7 c2 b0 ff ff ff f7
RSP: 002b:00007ffcfbcd9c88 EFLAGS: 00000212 ORIG_RAX: 0000000000000037
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007f016201f94a
RDX: 0000000000000061 RSI: 0000000000000000 RDI: 0000000000000003
RBP: 00007ffcfbcd9cf0 R08: 00007ffcfbcd9c9c R09: 00007ffcfbcda087
R10: 00007ffcfbcd9cf0 R11: 0000000000000212 R12: 00007ffcfbcd9c9c
R13: 000000000017f375 R14: 000000000017f348 R15: 0000000000000002
</TASK>


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup

syzbot

unread,
Feb 1, 2024, 12:24:29 AMFeb 1
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: e5c3b988b827 Linux 6.1.76
git tree: linux-6.1.y
console output: https://syzkaller.appspot.com/x/log.txt?x=17f77cb0180000
kernel config: https://syzkaller.appspot.com/x/.config?x=45ee9ee9d909cb91
dashboard link: https://syzkaller.appspot.com/bug?extid=cb82013d79330d8896b7
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/93a0fde8a62e/disk-e5c3b988.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/7a1e8963a758/vmlinux-e5c3b988.xz
kernel image: https://storage.googleapis.com/syzbot-assets/5e4977e2b2a0/bzImage-e5c3b988.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+cb8201...@syzkaller.appspotmail.com

rcu: INFO: rcu_preempt detected stalls on CPUs/tasks:
rcu: Tasks blocked on level-0 rcu_node (CPUs 0-1): P3575/1:b..l
(detected by 1, t=10502 jiffies, g=51925, q=68 ncpus=2)
task:syz-executor.4 state:R running task stack:20312 pid:3575 ppid:3568 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:433
asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:653
RIP: 0010:__ref_is_percpu include/linux/percpu-refcount.h:174 [inline]
RIP: 0010:percpu_ref_put_many include/linux/percpu-refcount.h:332 [inline]
RIP: 0010:percpu_ref_put+0xd0/0x250 include/linux/percpu-refcount.h:351
Code: 6a ee 8a be f9 02 00 00 48 c7 c2 c0 6a ee 8a e8 b6 43 e8 ff 49 bf 00 00 00 00 00 fc ff df 48 89 d8 48 c1 e8 03 42 80 3c 38 00 <74> 08 48 89 df e8 f6 7c 5f 00 48 8b 2b 48 89 ee 48 83 e6 03 31 ff
RSP: 0018:ffffc90003f2fc28 EFLAGS: 00000246
RAX: 1ffff1100e82512c RBX: ffff888074128960 RCX: ffff88807a689dc0
RDX: 0000000000000000 RSI: ffffffff8b3d0760 RDI: ffffffff8b3d0720
RBP: 0000000000000001 R08: ffffffff81825270 R09: fffffbfff2092045
R10: 0000000000000000 R11: dffffc0000000001 R12: ffff888021efa4c0
R13: ffff888021efa948 R14: ffffffff8182523f R15: dffffc0000000000
cgroup_bpf_put include/linux/cgroup.h:922 [inline]
cgroup_sk_free+0x3c/0xa0 kernel/cgroup/cgroup.c:6995
sk_prot_free net/core/sock.c:2076 [inline]
__sk_destruct+0x43f/0x5f0 net/core/sock.c:2168
inet_release+0x174/0x1f0 net/ipv4/af_inet.c:432
__sock_release net/socket.c:654 [inline]
sock_close+0xcd/0x230 net/socket.c:1400
__fput+0x3b7/0x890 fs/file_table.c:320
task_work_run+0x246/0x300 kernel/task_work.c:179
resume_user_mode_work include/linux/resume_user_mode.h:49 [inline]
exit_to_user_mode_loop+0xde/0x100 kernel/entry/common.c:171
exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:204
__syscall_exit_to_user_mode_work kernel/entry/common.c:286 [inline]
syscall_exit_to_user_mode+0x60/0x270 kernel/entry/common.c:297
do_syscall_64+0x49/0xb0 arch/x86/entry/common.c:87
entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f411da7cc9a
RSP: 002b:00007fff077ba9d0 EFLAGS: 00000293 ORIG_RAX: 0000000000000003
RAX: 0000000000000000 RBX: 00000000ffffffff RCX: 00007f411da7cc9a
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000003
RBP: 00007fff077baa4c R08: 00007fff077ba31c R09: 0079746972756365
R10: 00007fff077ba380 R11: 0000000000000293 R12: 0000000000000032
R13: 00000000000c6234 R14: 00000000000c6226 R15: 0000000000000006
</TASK>
rcu: rcu_preempt kthread starved for 10527 jiffies! g51925 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:26680 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:1935
rcu_gp_fqs_loop+0x2d2/0x1120 kernel/rcu/tree.c:1706
rcu_gp_kthread+0xa3/0x3a0 kernel/rcu/tree.c:1905
kthread+0x28d/0x320 kernel/kthread.c:376
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306
</TASK>
rcu: Stack dump where RCU GP kthread last ran:
Sending NMI from CPU 1 to CPUs 0:
NMI backtrace for cpu 0 skipped: idling at native_safe_halt arch/x86/include/asm/irqflags.h:51 [inline]
NMI backtrace for cpu 0 skipped: idling at arch_safe_halt arch/x86/include/asm/irqflags.h:89 [inline]
NMI backtrace for cpu 0 skipped: idling at acpi_safe_halt drivers/acpi/processor_idle.c:112 [inline]
NMI backtrace for cpu 0 skipped: idling at acpi_idle_do_entry+0x10f/0x340 drivers/acpi/processor_idle.c:572
Reply all
Reply to author
Forward
0 new messages