syzbot


INFO: task hung in perf_event_release_kernel (2)

Status: upstream: reported on 2023/03/02 17:10
Reported-by: syzbot+86ee9b4ce8fa1db3a300@syzkaller.appspotmail.com
First crash: 649d, last: 649d
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.14 INFO: task hung in perf_event_release_kernel 1 1842d 1842d 0/1 auto-closed as invalid on 2020/03/24 11:22
upstream INFO: task hung in perf_event_release_kernel perf 18 1837d 1838d 0/28 closed as invalid on 2019/11/30 16:54
linux-4.19 INFO: task hung in perf_event_release_kernel 1 914d 914d 0/1 auto-obsoleted due to no activity on 2022/10/08 09:57

Sample crash report:
Bluetooth: hci8: command 0x041b tx timeout
Bluetooth: hci8: command 0x040f tx timeout
Bluetooth: hci8: command 0x0419 tx timeout
ieee802154 phy0 wpan0: encryption failed: -22
ieee802154 phy1 wpan1: encryption failed: -22
INFO: task syz-executor.0:11928 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.0  D28648 11928   8125 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
 schedule_preempt_disabled+0xf/0x20 kernel/sched/core.c:3619
 __mutex_lock_common kernel/locking/mutex.c:1016 [inline]
 __mutex_lock+0x5f0/0x1190 kernel/locking/mutex.c:1078
 perf_event_ctx_lock_nested+0x237/0x430 kernel/events/core.c:1283
 perf_event_ctx_lock kernel/events/core.c:1296 [inline]
 perf_event_release_kernel+0x11c/0xcd0 kernel/events/core.c:4605
 perf_release+0x33/0x40 kernel/events/core.c:4703
 __fput+0x2ce/0x890 fs/file_table.c:278
 task_work_run+0x148/0x1c0 kernel/task_work.c:113
 tracehook_notify_resume include/linux/tracehook.h:193 [inline]
 exit_to_usermode_loop+0x251/0x2a0 arch/x86/entry/common.c:167
 prepare_exit_to_usermode arch/x86/entry/common.c:198 [inline]
 syscall_return_slowpath arch/x86/entry/common.c:271 [inline]
 do_syscall_64+0x538/0x620 arch/x86/entry/common.c:296
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7f1149272fab
Code: Bad RIP value.
RSP: 002b:00007ffd16653890 EFLAGS: 00000293 ORIG_RAX: 0000000000000003
RAX: 0000000000000000 RBX: 0000000000000007 RCX: 00007f1149272fab
RDX: 0000001b2f320000 RSI: 0000000000000000 RDI: 0000000000000006
RBP: 00007f11493e2980 R08: 0000000000000000 R09: 000000603e7cd6f3
R10: 0011b63dc26266da R11: 0000000000000293 R12: 000000000005af71
R13: 00007ffd16653990 R14: 00007f11493e0f80 R15: 0000000000000032
INFO: task syz-executor.0:11936 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.0  D27888 11936   8125 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
 schedule_preempt_disabled+0xf/0x20 kernel/sched/core.c:3619
 __mutex_lock_common kernel/locking/mutex.c:1016 [inline]
 __mutex_lock+0x5f0/0x1190 kernel/locking/mutex.c:1078
 mutex_lock_double kernel/events/core.c:10470 [inline]
 __perf_event_ctx_lock_double kernel/events/core.c:10529 [inline]
 __do_sys_perf_event_open kernel/events/core.c:10784 [inline]
 __se_sys_perf_event_open+0x1863/0x2720 kernel/events/core.c:10549
 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7f11492c10f9
Code: Bad RIP value.
RSP: 002b:00007f1147812168 EFLAGS: 00000246 ORIG_RAX: 000000000000012a
RAX: ffffffffffffffda RBX: 00007f11493e1050 RCX: 00007f11492c10f9
RDX: 0000000000000000 RSI: ffffffffffffffff RDI: 0000000020000000
RBP: 00007f114931cae9 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000005 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffd1665382f R14: 00007f1147812300 R15: 0000000000022000
INFO: task syz-executor.5:11942 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.5  D28864 11942   8143 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
 schedule_preempt_disabled+0xf/0x20 kernel/sched/core.c:3619
 __mutex_lock_common kernel/locking/mutex.c:1016 [inline]
 __mutex_lock+0x5f0/0x1190 kernel/locking/mutex.c:1078
 mutex_lock_double kernel/events/core.c:10470 [inline]
 __perf_event_ctx_lock_double kernel/events/core.c:10529 [inline]
 __do_sys_perf_event_open kernel/events/core.c:10784 [inline]
 __se_sys_perf_event_open+0x1863/0x2720 kernel/events/core.c:10549
 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7fe94ce9a0f9
Code: Bad RIP value.
RSP: 002b:00007fe94b40c168 EFLAGS: 00000246 ORIG_RAX: 000000000000012a
RAX: ffffffffffffffda RBX: 00007fe94cfb9f80 RCX: 00007fe94ce9a0f9
RDX: 0000000000000000 RSI: ffffffffffffffff RDI: 0000000020000000
RBP: 00007fe94cef5ae9 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000004 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffea1af44cf R14: 00007fe94b40c300 R15: 0000000000022000

Showing all locks held in the system:
1 lock held by khungtaskd/1570:
 #0: 000000008d10b69b (rcu_read_lock){....}, at: debug_show_all_locks+0x53/0x265 kernel/locking/lockdep.c:4441
1 lock held by syz-executor.0/11928:
 #0: 00000000d619726d (&cpuctx_mutex){+.+.}, at: perf_event_ctx_lock_nested+0x237/0x430 kernel/events/core.c:1283
2 locks held by syz-executor.0/11936:
 #0: 00000000d619726d (&cpuctx_mutex){+.+.}, at: mutex_lock_double kernel/events/core.c:10469 [inline]
 #0: 00000000d619726d (&cpuctx_mutex){+.+.}, at: __perf_event_ctx_lock_double kernel/events/core.c:10529 [inline]
 #0: 00000000d619726d (&cpuctx_mutex){+.+.}, at: __do_sys_perf_event_open kernel/events/core.c:10784 [inline]
 #0: 00000000d619726d (&cpuctx_mutex){+.+.}, at: __se_sys_perf_event_open+0x1856/0x2720 kernel/events/core.c:10549
 #1: 00000000d619726d (&cpuctx_mutex/1){+.+.}, at: mutex_lock_double kernel/events/core.c:10470 [inline]
 #1: 00000000d619726d (&cpuctx_mutex/1){+.+.}, at: __perf_event_ctx_lock_double kernel/events/core.c:10529 [inline]
 #1: 00000000d619726d (&cpuctx_mutex/1){+.+.}, at: __do_sys_perf_event_open kernel/events/core.c:10784 [inline]
 #1: 00000000d619726d (&cpuctx_mutex/1){+.+.}, at: __se_sys_perf_event_open+0x1863/0x2720 kernel/events/core.c:10549
2 locks held by syz-executor.5/11942:
 #0: 000000003b697a16 (&cpuctx_mutex){+.+.}, at: mutex_lock_double kernel/events/core.c:10469 [inline]
 #0: 000000003b697a16 (&cpuctx_mutex){+.+.}, at: __perf_event_ctx_lock_double kernel/events/core.c:10529 [inline]
 #0: 000000003b697a16 (&cpuctx_mutex){+.+.}, at: __do_sys_perf_event_open kernel/events/core.c:10784 [inline]
 #0: 000000003b697a16 (&cpuctx_mutex){+.+.}, at: __se_sys_perf_event_open+0x1856/0x2720 kernel/events/core.c:10549
 #1: 00000000d619726d (&cpuctx_mutex/1){+.+.}, at: mutex_lock_double kernel/events/core.c:10470 [inline]
 #1: 00000000d619726d (&cpuctx_mutex/1){+.+.}, at: __perf_event_ctx_lock_double kernel/events/core.c:10529 [inline]
 #1: 00000000d619726d (&cpuctx_mutex/1){+.+.}, at: __do_sys_perf_event_open kernel/events/core.c:10784 [inline]
 #1: 00000000d619726d (&cpuctx_mutex/1){+.+.}, at: __se_sys_perf_event_open+0x1863/0x2720 kernel/events/core.c:10549
1 lock held by syz-executor.5/12627:
 #0: 000000003b697a16 (&cpuctx_mutex){+.+.}, at: __do_sys_perf_event_open kernel/events/core.c:10822 [inline]
 #0: 000000003b697a16 (&cpuctx_mutex){+.+.}, at: __se_sys_perf_event_open+0xaf7/0x2720 kernel/events/core.c:10549
1 lock held by syz-executor.5/12629:
 #0: 00000000d619726d (&cpuctx_mutex){+.+.}, at: __do_sys_perf_event_open kernel/events/core.c:10822 [inline]
 #0: 00000000d619726d (&cpuctx_mutex){+.+.}, at: __se_sys_perf_event_open+0xaf7/0x2720 kernel/events/core.c:10549
1 lock held by syz-executor.5/12983:
 #0: 000000003b697a16 (&cpuctx_mutex){+.+.}, at: __do_sys_perf_event_open kernel/events/core.c:10822 [inline]
 #0: 000000003b697a16 (&cpuctx_mutex){+.+.}, at: __se_sys_perf_event_open+0xaf7/0x2720 kernel/events/core.c:10549
1 lock held by syz-executor.5/12984:
 #0: 00000000d619726d (&cpuctx_mutex){+.+.}, at: __do_sys_perf_event_open kernel/events/core.c:10822 [inline]
 #0: 00000000d619726d (&cpuctx_mutex){+.+.}, at: __se_sys_perf_event_open+0xaf7/0x2720 kernel/events/core.c:10549

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

NMI backtrace for cpu 1
CPU: 1 PID: 1570 Comm: khungtaskd Not tainted 4.19.211-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/16/2023
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 skipped: idling at native_safe_halt+0xe/0x10 arch/x86/include/asm/irqflags.h:60

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/03/02 17:10 linux-4.19.y 3f8a27f9e27b f8902b57 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 INFO: task hung in perf_event_release_kernel
* Struck through repros no longer work on HEAD.