[v6.1] INFO: task hung in perf_event_free_task

0 views
Skip to first unread message

syzbot

unread,
Sep 12, 2023, 3:14:57 AM9/12/23
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 59b13c2b647e Linux 6.1.52
git tree: linux-6.1.y
console output: https://syzkaller.appspot.com/x/log.txt?x=10571378680000
kernel config: https://syzkaller.appspot.com/x/.config?x=9e161b7571806ac8
dashboard link: https://syzkaller.appspot.com/bug?extid=037dd0ce48b026949f99
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=11f63b08680000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=17212e30680000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/2b52d49456df/disk-59b13c2b.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/2fb97549e4d0/vmlinux-59b13c2b.xz
kernel image: https://storage.googleapis.com/syzbot-assets/dde2c708485b/bzImage-59b13c2b.xz

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

INFO: task syz-executor151:5081 blocked for more than 143 seconds.
Not tainted 6.1.52-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor151 state:D stack:25536 pid:5081 ppid:3584 flags:0x00004006
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
perf_event_free_task+0x553/0x680 kernel/events/core.c:13074
copy_process+0x2c4d/0x4020 kernel/fork.c:2544
kernel_clone+0x222/0x920 kernel/fork.c:2674
__do_sys_clone kernel/fork.c:2815 [inline]
__se_sys_clone kernel/fork.c:2799 [inline]
__x64_sys_clone+0x231/0x280 kernel/fork.c:2799
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+0x63/0xcd
RIP: 0033:0x7f195dc9dd49
RSP: 002b:00007f195d457238 EFLAGS: 00000246 ORIG_RAX: 0000000000000038
RAX: ffffffffffffffda RBX: 00007f195dd29408 RCX: 00007f195dc9dd49
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 00000000d816e480
RBP: 00007f195dd29400 R08: 0000000000000000 R09: 00007f195d4576c0
R10: 0000000000000000 R11: 0000000000000246 R12: 00000000d816e480
R13: 0000000000000016 R14: 00007fff25080200 R15: 00007fff250802e8
</TASK>
INFO: task syz-executor151:9531 blocked for more than 143 seconds.
Not tainted 6.1.52-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor151 state:D stack:26280 pid:9531 ppid:3587 flags:0x00004006
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
perf_event_free_task+0x553/0x680 kernel/events/core.c:13074
copy_process+0x2c4d/0x4020 kernel/fork.c:2544
kernel_clone+0x222/0x920 kernel/fork.c:2674
__do_sys_clone kernel/fork.c:2815 [inline]
__se_sys_clone kernel/fork.c:2799 [inline]
__x64_sys_clone+0x231/0x280 kernel/fork.c:2799
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+0x63/0xcd
RIP: 0033:0x7f195dc9dd49
RSP: 002b:00007f195d457238 EFLAGS: 00000246 ORIG_RAX: 0000000000000038
RAX: ffffffffffffffda RBX: 00007f195dd29408 RCX: 00007f195dc9dd49
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 00000000d816e480
RBP: 00007f195dd29400 R08: 0000000000000000 R09: 00007f195d4576c0
R10: 0000000000000000 R11: 0000000000000246 R12: 00000000d816e480
R13: 0000000000000016 R14: 00007fff25080200 R15: 00007fff250802e8
</TASK>

Showing all locks held in the system:
1 lock held by rcu_tasks_kthre/12:
#0: ffffffff8d12a0f0 (rcu_tasks.tasks_gp_mutex){+.+.}-{3:3}, at: rcu_tasks_one_gp+0x29/0xd20 kernel/rcu/tasks.h:516
1 lock held by rcu_tasks_trace/13:
#0: ffffffff8d12a8f0 (rcu_tasks_trace.tasks_gp_mutex){+.+.}-{3:3}, at: rcu_tasks_one_gp+0x29/0xd20 kernel/rcu/tasks.h:516
1 lock held by khungtaskd/28:
#0: ffffffff8d129f20 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x0/0x30
2 locks held by getty/3312:
#0: ffff888028a6c098 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x21/0x70 drivers/tty/tty_ldisc.c:244
#1: ffffc900031262f0 (&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0x6a7/0x1db0 drivers/tty/n_tty.c:2188
2 locks held by kworker/0:5/3638:
#0: ffff888012472538 ((wq_completion)rcu_gp){+.+.}-{0:0}, at: process_one_work+0x77a/0x11f0
#1: ffffc90003f0fd20 ((work_completion)(&rew->rew_work)){+.+.}-{0:0}, at: process_one_work+0x7bd/0x11f0 kernel/workqueue.c:2267
2 locks held by syz-executor151/25209:
#0: ffffffff8d17e6a8 (event_mutex){+.+.}-{3:3}, at: perf_trace_destroy+0x2a/0x140 kernel/trace/trace_event_perf.c:239
#1: ffffffff8d12f4f8 (rcu_state.exp_mutex){+.+.}-{3:3}, at: exp_funnel_lock kernel/rcu/tree_exp.h:292 [inline]
#1: ffffffff8d12f4f8 (rcu_state.exp_mutex){+.+.}-{3:3}, at: synchronize_rcu_expedited+0x3b0/0x8a0 kernel/rcu/tree_exp.h:950
2 locks held by syz-executor151/25217:
#0: ffffffff91ce3c48 (&pmus_srcu){....}-{0:0}, at: rcu_lock_acquire+0x9/0x30 include/linux/rcupdate.h:306
#1: ffffffff8d17e6a8 (event_mutex){+.+.}-{3:3}, at: perf_trace_init+0x4f/0x2d0 kernel/trace/trace_event_perf.c:221
2 locks held by syz-executor151/25216:
#0: ffffffff91ce3c48 (&pmus_srcu){....}-{0:0}, at: rcu_lock_acquire+0x9/0x30 include/linux/rcupdate.h:306
#1: ffffffff8d17e6a8 (event_mutex){+.+.}-{3:3}, at: perf_trace_init+0x4f/0x2d0 kernel/trace/trace_event_perf.c:221

=============================================

NMI backtrace for cpu 1
CPU: 1 PID: 28 Comm: khungtaskd Not tainted 6.1.52-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/04/2023
Call Trace:
<TASK>
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106
nmi_cpu_backtrace+0x4e1/0x560 lib/nmi_backtrace.c:111
nmi_trigger_cpumask_backtrace+0x1b0/0x3f0 lib/nmi_backtrace.c:62
trigger_all_cpu_backtrace include/linux/nmi.h:148 [inline]
check_hung_uninterruptible_tasks kernel/hung_task.c:220 [inline]
watchdog+0xf18/0xf60 kernel/hung_task.c:377
kthread+0x26e/0x300 kernel/kthread.c:376
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306
</TASK>
Sending NMI from CPU 1 to CPUs 0:
NMI backtrace for cpu 0
CPU: 0 PID: 33 Comm: kworker/u4:2 Not tainted 6.1.52-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/04/2023
Workqueue: phy10 ieee80211_iface_work
RIP: 0010:memset+0x3/0x40 mm/kasan/shadow.c:43
Code: 08 31 db eb d7 cc cc 89 f6 48 8b 0c 24 31 d2 e9 d3 ec ff ff 0f 1f 00 89 f6 48 8b 0c 24 ba 01 00 00 00 e9 c0 ec ff ff 55 41 56 <53> 48 89 d3 41 89 f6 48 89 fd 48 8b 4c 24 18 48 89 d6 ba 01 00 00
RSP: 0018:ffffc90000aa7648 EFLAGS: 00000246
RAX: ffff888014e91dc0 RBX: ffff888014e91dc0 RCX: ffffc90000aa7750
RDX: 0000000000000060 RSI: 0000000000000000 RDI: ffffc90000aa76c0
RBP: dffffc0000000000 R08: dffffc0000000000 R09: ffffc90000aa7840
R10: 0000000000000000 R11: dffffc0000000001 R12: 0000000000000000
R13: ffffffff8177e890 R14: ffffc90000aa76c0 R15: 0000000000000000
FS: 0000000000000000(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fff250803e4 CR3: 0000000071482000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<NMI>
</NMI>
<TASK>
__unwind_start+0x32/0x720 arch/x86/kernel/unwind_orc.c:645
unwind_start arch/x86/include/asm/unwind.h:64 [inline]
arch_stack_walk+0xdb/0x140 arch/x86/kernel/stacktrace.c:24
stack_trace_save+0x113/0x1c0 kernel/stacktrace.c:122
kasan_save_stack mm/kasan/common.c:45 [inline]
kasan_set_track+0x4b/0x70 mm/kasan/common.c:52
kasan_save_free_info+0x27/0x40 mm/kasan/generic.c:516
____kasan_slab_free+0xd6/0x120 mm/kasan/common.c:236
kasan_slab_free include/linux/kasan.h:177 [inline]
slab_free_hook mm/slub.c:1724 [inline]
slab_free_freelist_hook mm/slub.c:1750 [inline]
slab_free mm/slub.c:3661 [inline]
__kmem_cache_free+0x25c/0x3c0 mm/slub.c:3674
skb_free_head net/core/skbuff.c:760 [inline]
skb_release_data+0x5de/0x7a0 net/core/skbuff.c:789
skb_release_all net/core/skbuff.c:854 [inline]
__kfree_skb net/core/skbuff.c:868 [inline]
kfree_skb_reason+0x16f/0x390 net/core/skbuff.c:891
kfree_skb include/linux/skbuff.h:1217 [inline]
ieee80211_iface_work+0x260/0xce0 net/mac80211/iface.c:1688
process_one_work+0x8aa/0x11f0 kernel/workqueue.c:2292
worker_thread+0xa5f/0x1210 kernel/workqueue.c:2439
kthread+0x26e/0x300 kernel/kthread.c:376
ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306
</TASK>
INFO: NMI handler (nmi_cpu_backtrace_handler) took too long to run: 1.341 msecs


---
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 overwrite 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
Reply all
Reply to author
Forward
0 new messages