[v6.1] INFO: rcu detected stall in sock_close

5 views
Skip to first unread message

syzbot

unread,
Jul 10, 2023, 3:19:54 AM7/10/23
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 61fd484b2cf6 Linux 6.1.38
git tree: linux-6.1.y
console output: https://syzkaller.appspot.com/x/log.txt?x=156765caa80000
kernel config: https://syzkaller.appspot.com/x/.config?x=6a21f730857cfa53
dashboard link: https://syzkaller.appspot.com/bug?extid=e7717d48d50b745ce01d
compiler: Debian clang version 15.0.7, GNU ld (GNU Binutils for Debian) 2.35.2
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=12fac9caa80000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1077fed8a80000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/eb0882a0450c/disk-61fd484b.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/483d02c4c64c/vmlinux-61fd484b.xz
kernel image: https://storage.googleapis.com/syzbot-assets/3b4bb7e6bcff/bzImage-61fd484b.xz

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

rcu: INFO: rcu_preempt detected stalls on CPUs/tasks:
rcu: 1-...!: (1 GPs behind) idle=2dbc/1/0x4000000000000000 softirq=7676/7678 fqs=4
(detected by 0, t=10502 jiffies, g=6801, q=109 ncpus=2)
Sending NMI from CPU 0 to CPUs 1:
NMI backtrace for cpu 1
CPU: 1 PID: 3573 Comm: syz-executor732 Not tainted 6.1.38-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/03/2023
RIP: 0010:native_save_fl arch/x86/include/asm/irqflags.h:35 [inline]
RIP: 0010:arch_local_save_flags arch/x86/include/asm/irqflags.h:70 [inline]
RIP: 0010:arch_irqs_disabled arch/x86/include/asm/irqflags.h:130 [inline]
RIP: 0010:lock_release+0x610/0xa20 kernel/locking/lockdep.c:5692
Code: eb 03 42 80 3c 3b 00 74 08 4c 89 f7 e8 d9 43 76 00 48 c7 84 24 90 00 00 00 00 00 00 00 9c 8f 84 24 90 00 00 00 42 80 3c 3b 00 <74> 08 4c 89 f7 e8 36 43 76 00 f6 84 24 91 00 00 00 02 75 6f 41 f7
RSP: 0018:ffffc900001e0b80 EFLAGS: 00000046
RAX: 0000000000000001 RBX: 1ffff9200003c182 RCX: ffffc900001e0c03
RDX: 0000000000000002 RSI: ffffffff8aebe4a0 RDI: ffffffff8b3cce60
RBP: ffffc900001e0cb0 R08: dffffc0000000000 R09: fffffbfff1ca6a76
R10: 0000000000000000 R11: dffffc0000000001 R12: 1ffff9200003c17c
R13: 0000000000000046 R14: ffffc900001e0c10 R15: dffffc0000000000
FS: 000055555573b300(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020000600 CR3: 00000000720d4000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<NMI>
</NMI>
<IRQ>
rcu_read_unlock include/linux/rcupdate.h:780 [inline]
advance_sched+0x7d4/0x940 net/sched/sch_taprio.c:755
__run_hrtimer kernel/time/hrtimer.c:1685 [inline]
__hrtimer_run_queues+0x5e5/0xe50 kernel/time/hrtimer.c:1749
hrtimer_interrupt+0x392/0x980 kernel/time/hrtimer.c:1811
local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1095 [inline]
__sysvec_apic_timer_interrupt+0x156/0x580 arch/x86/kernel/apic/apic.c:1112
sysvec_apic_timer_interrupt+0x8c/0xb0 arch/x86/kernel/apic/apic.c:1106
</IRQ>
<TASK>
asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:649
RIP: 0010:lock_release+0x637/0xa20 kernel/locking/lockdep.c:5693
Code: 3c 3b 00 74 08 4c 89 f7 e8 36 43 76 00 f6 84 24 91 00 00 00 02 75 6f 41 f7 c5 00 02 00 00 74 01 fb 48 c7 44 24 60 0e 36 e0 45 <4b> c7 04 27 00 00 00 00 4b c7 44 27 08 00 00 00 00 65 48 8b 04 25
RSP: 0018:ffffc90003d1fa80 EFLAGS: 00000206
RAX: 0000000000000001 RBX: 1ffff920007a3f62 RCX: ffffc90003d1fb03
RDX: 0000000000000050 RSI: ffffffff8aebe4a0 RDI: ffffffff8b3cce60
RBP: ffffc90003d1fbb8 R08: dffffc0000000000 R09: fffffbfff205285d
R10: 0000000000000000 R11: dffffc0000000001 R12: 1ffff920007a3f5c
R13: 0000000000000246 R14: ffffc90003d1fb10 R15: dffffc0000000000
sock_release_ownership include/net/sock.h:1841 [inline]
release_sock+0x114/0x1c0 net/core/sock.c:3475
packet_release+0x809/0xca0 net/packet/af_packet.c:3154
__sock_release net/socket.c:652 [inline]
sock_close+0xcd/0x230 net/socket.c:1370
__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+0xd9/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:86
entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f51abca9bb3
Code: c7 c2 c0 ff ff ff f7 d8 64 89 02 48 c7 c0 ff ff ff ff eb ba 0f 1f 00 64 8b 04 25 18 00 00 00 85 c0 75 14 b8 03 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 45 c3 0f 1f 40 00 48 83 ec 18 89 7c 24 0c e8
RSP: 002b:00007ffda2c9fa28 EFLAGS: 00000246 ORIG_RAX: 0000000000000003
RAX: 0000000000000000 RBX: 0000000000000004 RCX: 00007f51abca9bb3
RDX: 00007f51abce8049 RSI: 0000000020000040 RDI: 0000000000000003
RBP: 0000000000000000 R08: 000000000000000d R09: 000000000000000d
R10: 000000000000000d R11: 0000000000000246 R12: 00007ffda2c9fa40
R13: 00000000000f4240 R14: 0000000000000000 R15: 0000000000000000
</TASK>
INFO: NMI handler (nmi_cpu_backtrace_handler) took too long to run: 1.508 msecs
rcu: rcu_preempt kthread starved for 10494 jiffies! g6801 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:26712 pid:16 ppid:2 flags:0x00004000
Call Trace:
<TASK>
context_switch kernel/sched/core.c:5241 [inline]
__schedule+0x132c/0x4330 kernel/sched/core.c:6554
schedule+0xbf/0x180 kernel/sched/core.c:6630
schedule_timeout+0x1b9/0x300 kernel/time/timer.c:1935
rcu_gp_fqs_loop+0x2c2/0x1010 kernel/rcu/tree.c:1661
rcu_gp_kthread+0xa3/0x3a0 kernel/rcu/tree.c:1860
kthread+0x26e/0x300 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:
CPU: 0 PID: 46 Comm: kworker/u4:3 Not tainted 6.1.38-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/03/2023
Workqueue: events_unbound toggle_allocation_gate
RIP: 0010:csd_lock_wait kernel/smp.c:413 [inline]
RIP: 0010:smp_call_function_many_cond+0x1f62/0x33d0 kernel/smp.c:987
Code: 2f 44 89 ee 83 e6 01 31 ff e8 9a 11 0b 00 41 83 e5 01 49 bd 00 00 00 00 00 fc ff df 75 0a e8 25 0e 0b 00 e9 1b ff ff ff f3 90 <42> 0f b6 04 2b 84 c0 75 14 41 f7 07 01 00 00 00 0f 84 fe fe ff ff
RSP: 0018:ffffc90000b775a0 EFLAGS: 00000293
RAX: ffffffff817ecd3d RBX: 1ffff11017328031 RCX: ffff8880162cd940
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000000
RBP: ffffc90000b77980 R08: ffffffff817ecd06 R09: fffffbfff2052845
R10: 0000000000000000 R11: dffffc0000000001 R12: 0000000800000000
R13: dffffc0000000000 R14: 0000000000000001 R15: ffff8880b9940188
FS: 0000000000000000(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000560371bdc008 CR3: 000000000cc8e000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<IRQ>
</IRQ>
<TASK>
on_each_cpu_cond_mask+0x3b/0x80 kernel/smp.c:1155
on_each_cpu include/linux/smp.h:71 [inline]
text_poke_sync arch/x86/kernel/alternative.c:1316 [inline]
text_poke_bp_batch+0x2bb/0x940 arch/x86/kernel/alternative.c:1516
text_poke_flush arch/x86/kernel/alternative.c:1707 [inline]
text_poke_finish+0x16/0x30 arch/x86/kernel/alternative.c:1714
arch_jump_label_transform_apply+0x13/0x20 arch/x86/kernel/jump_label.c:146
static_key_enable_cpuslocked+0x12e/0x250 kernel/jump_label.c:177
static_key_enable+0x16/0x20 kernel/jump_label.c:190
toggle_allocation_gate+0xbf/0x480 mm/kfence/core.c:804
process_one_work+0x8aa/0x11f0 kernel/workqueue.c:2289
worker_thread+0xa5f/0x1210 kernel/workqueue.c:2436
kthread+0x26e/0x300 kernel/kthread.c:376
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306
</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 bug is already fixed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.

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

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

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

syzbot

unread,
Sep 20, 2023, 8:50:18 PM9/20/23
to syzkaller...@googlegroups.com
syzbot suspects this issue was fixed by commit:

commit 0b45af982a4df0b14fb8669ee2a871cfdfa6a39c
Author: Kuniyuki Iwashima <kun...@amazon.com>
Date: Sat Jul 29 00:07:05 2023 +0000

net/sched: taprio: Limit TCA_TAPRIO_ATTR_SCHED_CYCLE_TIME to INT_MAX.

bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=16547ed2680000
start commit: 61fd484b2cf6 Linux 6.1.38
git tree: linux-6.1.y
If the result looks correct, please mark the issue as fixed by replying with:

#syz fix: net/sched: taprio: Limit TCA_TAPRIO_ATTR_SCHED_CYCLE_TIME to INT_MAX.

For information about bisection process see: https://goo.gl/tpsmEJ#bisection
Reply all
Reply to author
Forward
0 new messages