INFO: task hung in perf_event_free_task (4)

5 views
Skip to first unread message

syzbot

unread,
Sep 12, 2022, 8:14:36 AM9/12/22
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 3f8a27f9e27b Linux 4.19.211
git tree: linux-4.19.y
console output: https://syzkaller.appspot.com/x/log.txt?x=10af9c4f080000
kernel config: https://syzkaller.appspot.com/x/.config?x=9b9277b418617afe
dashboard link: https://syzkaller.appspot.com/bug?extid=b6011b28757c99f01c61
compiler: gcc version 10.2.1 20210110 (Debian 10.2.1-6)

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

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

Bluetooth: hci3: command 0x040f tx timeout
INFO: task syz-executor.3:21119 blocked for more than 140 seconds.
Not tainted 4.19.211-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
syz-executor.3 D27312 21119 12585 0x00000004
Call Trace:
context_switch kernel/sched/core.c:2828 [inline]
__schedule+0x887/0x2040 kernel/sched/core.c:3517
schedule+0x8d/0x1b0 kernel/sched/core.c:3561
perf_event_free_task+0x4cf/0x660 kernel/events/core.c:11372
copy_process.part.0+0x3710/0x8260 kernel/fork.c:2137
copy_process kernel/fork.c:1710 [inline]
_do_fork+0x22f/0xf30 kernel/fork.c:2219
do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7fc2a80313c9
Code: Bad RIP value.
RSP: 002b:00007fc2a6943118 EFLAGS: 00000246 ORIG_RAX: 0000000000000038
RAX: ffffffffffffffda RBX: 00007fc2a81441f0 RCX: 00007fc2a80313c9
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 00007fc2a808c33f R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffccc866a3f R14: 00007fc2a6943300 R15: 0000000000022000

Showing all locks held in the system:
1 lock held by khungtaskd/1571:
#0: 000000005a325981 (rcu_read_lock){....}, at: debug_show_all_locks+0x53/0x265 kernel/locking/lockdep.c:4441
1 lock held by in:imklog/7811:
#0: 0000000089379bce (&f->f_pos_lock){+.+.}, at: __fdget_pos+0x26f/0x310 fs/file.c:767
IPVS: ftp: loaded support on port[0] = 21
4 locks held by kworker/u4:6/8836:
#0: 00000000bf2ccdf2 ((wq_completion)"%s""netns"){+.+.}, at: process_one_work+0x767/0x1570 kernel/workqueue.c:2124
#1: 0000000023a6ee1b (net_cleanup_work){+.+.}, at: process_one_work+0x79c/0x1570 kernel/workqueue.c:2128
IPVS: ftp: loaded support on port[0] = 21
#2: 000000007f828005 (pernet_ops_rwsem){++++}, at: cleanup_net+0xa8/0x8b0 net/core/net_namespace.c:521
#3: 00000000e036aa4a (rcu_preempt_state.exp_mutex){+.+.}, at: exp_funnel_lock kernel/rcu/tree_exp.h:297 [inline]
#3: 00000000e036aa4a (rcu_preempt_state.exp_mutex){+.+.}, at: _synchronize_rcu_expedited+0x4dc/0x6f0 kernel/rcu/tree_exp.h:667
1 lock held by agetty/12527:
#0: 00000000fbdc932b (&tty->ldisc_sem){++++}, at: tty_ldisc_ref_wait+0x22/0x80 drivers/tty/tty_ldisc.c:272
2 locks held by kworker/1:6/31752:
#0: 000000009a892a4d ((wq_completion)"rcu_gp"){+.+.}, at: process_one_work+0x767/0x1570 kernel/workqueue.c:2124
#1: 0000000054b7babd ((work_completion)(&rew.rew_work)){+.+.}, at: process_one_work+0x79c/0x1570 kernel/workqueue.c:2128
1 lock held by syz-executor.0/29487:
#0: 0000000015edd2a6 (rtnl_mutex){+.+.}, at: tun_detach drivers/net/tun.c:759 [inline]
#0: 0000000015edd2a6 (rtnl_mutex){+.+.}, at: tun_chr_close+0x3a/0x180 drivers/net/tun.c:3323
1 lock held by syz-executor.4/29502:
#0: 0000000015edd2a6 (rtnl_mutex){+.+.}, at: rtnl_lock net/core/rtnetlink.c:77 [inline]
#0: 0000000015edd2a6 (rtnl_mutex){+.+.}, at: rtnetlink_rcv_msg+0x3fe/0xb80 net/core/rtnetlink.c:4779
2 locks held by syz-executor.3/29498:
#0: 000000007f828005 (pernet_ops_rwsem){++++}, at: copy_net_ns+0x1d8/0x340 net/core/net_namespace.c:435
#1: 0000000015edd2a6 (rtnl_mutex){+.+.}, at: gtp_net_exit+0x1ba/0x380 drivers/net/gtp.c:1360
1 lock held by syz-executor.3/29507:
#0: 0000000015edd2a6 (rtnl_mutex){+.+.}, at: rtnl_lock net/core/rtnetlink.c:77 [inline]
#0: 0000000015edd2a6 (rtnl_mutex){+.+.}, at: rtnetlink_rcv_msg+0x3fe/0xb80 net/core/rtnetlink.c:4779
2 locks held by syz-executor.3/29520:
#0: 000000007f828005 (pernet_ops_rwsem){++++}, at: copy_net_ns+0x1d8/0x340 net/core/net_namespace.c:435
#1: 0000000015edd2a6 (rtnl_mutex){+.+.}, at: gtp_net_exit+0x1ba/0x380 drivers/net/gtp.c:1360
2 locks held by syz-executor.1/29501:
#0: 0000000015edd2a6 (rtnl_mutex){+.+.}, at: rtnl_lock net/core/rtnetlink.c:77 [inline]
#0: 0000000015edd2a6 (rtnl_mutex){+.+.}, at: rtnetlink_rcv_msg+0x3fe/0xb80 net/core/rtnetlink.c:4779
#1: 00000000e036aa4a (rcu_preempt_state.exp_mutex){+.+.}, at: exp_funnel_lock kernel/rcu/tree_exp.h:329 [inline]
#1: 00000000e036aa4a (rcu_preempt_state.exp_mutex){+.+.}, at: _synchronize_rcu_expedited+0x256/0x6f0 kernel/rcu/tree_exp.h:667

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

NMI backtrace for cpu 1
CPU: 1 PID: 1571 Comm: khungtaskd Not tainted 4.19.211-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/26/2022
Call Trace:
__dump_stack lib/dump_stack.c:77 [inline]
dump_stack+0x1fc/0x2ef lib/dump_stack.c:118
nmi_cpu_backtrace.cold+0x63/0xa2 lib/nmi_backtrace.c:101
nmi_trigger_cpumask_backtrace+0x1a6/0x1f0 lib/nmi_backtrace.c:62
trigger_all_cpu_backtrace include/linux/nmi.h:146 [inline]
check_hung_uninterruptible_tasks kernel/hung_task.c:203 [inline]
watchdog+0x991/0xe60 kernel/hung_task.c:287
kthread+0x33f/0x460 kernel/kthread.c:259
ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415
Sending NMI from CPU 1 to CPUs 0:
NMI backtrace for cpu 0
CPU: 0 PID: 29520 Comm: syz-executor.3 Not tainted 4.19.211-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/26/2022
RIP: 0010:kasan_check_read+0x4/0x10 mm/kasan/kasan.c:272
Code: 89 d0 49 39 c1 75 11 49 0f be 01 41 83 e2 07 49 39 c2 0f 8c 4e ff ff ff 5b 44 89 c2 5d 41 5c e9 b2 18 00 00 66 90 48 8b 0c 24 <89> f6 31 d2 e9 83 fe ff ff 0f 1f 00 48 8b 0c 24 89 f6 ba 01 00 00
RSP: 0018:ffff8880a47a7b80 EFLAGS: 00000286
RAX: 0000000000000000 RBX: ffff8880ba022ac0 RCX: ffffffff81518c83
RDX: dffffc0000000000 RSI: 0000000000000004 RDI: ffff8880ba022ad0
RBP: ffff8880ba022ad0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000005 R11: 0000000000000000 R12: 0000000000002991
R13: 000000000000000a R14: 000000000000000a R15: dffffc0000000000
FS: 00007ff18e5de700(0000) GS:ffff8880ba000000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000020000100 CR3: 00000000b061e000 CR4: 00000000003406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
atomic_read include/asm-generic/atomic-instrumented.h:21 [inline]
rcu_dynticks_curr_cpu_in_eqs kernel/rcu/tree.c:350 [inline]
rcu_is_watching+0x53/0xc0 kernel/rcu/tree.c:1025
rcu_read_unlock include/linux/rcupdate.h:677 [inline]
inet_twsk_purge+0x6f6/0x7c0 net/ipv4/inet_timewait_sock.c:298
ops_exit_list+0xf9/0x150 net/core/net_namespace.c:156
setup_net+0x3d1/0x720 net/core/net_namespace.c:333
copy_net_ns+0x1f7/0x340 net/core/net_namespace.c:439
create_new_namespaces+0x3f6/0x7b0 kernel/nsproxy.c:107
unshare_nsproxy_namespaces+0xbd/0x1f0 kernel/nsproxy.c:206
ksys_unshare+0x36c/0x9a0 kernel/fork.c:2542
__do_sys_unshare kernel/fork.c:2610 [inline]
__se_sys_unshare kernel/fork.c:2608 [inline]
__x64_sys_unshare+0x2d/0x40 kernel/fork.c:2608
do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7ff18fcab3c9
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ff18e5de168 EFLAGS: 00000246 ORIG_RAX: 0000000000000110
RAX: ffffffffffffffda RBX: 00007ff18fdbe120 RCX: 00007ff18fcab3c9
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000060000000
RBP: 00007ff18fd0633f R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffe699fb1ef R14: 00007ff18e5de300 R15: 0000000000022000


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