syzbot


INFO: task hung in perf_event_release_kernel

Status: auto-closed as invalid on 2020/03/24 11:22
Reported-by: syzbot+b87636702d37aac484f8@syzkaller.appspotmail.com
First crash: 947d, last: 947d
similar bugs (2):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream INFO: task hung in perf_event_release_kernel 18 942d 943d 0/22 closed as invalid on 2019/11/30 16:54
linux-4.19 INFO: task hung in perf_event_release_kernel 1 19d 19d 0/1 upstream: reported on 2022/06/10 09:57

Sample crash report:
audit: type=1804 audit(1574680661.783:338): pid=10965 uid=0 auid=4294967295 ses=4294967295 subj=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 op="invalid_pcr" cause="ToMToU" comm="syz-executor.2" name="/root/syzkaller-testdir942403661/syzkaller.ztU0qd/151/bus" dev="sda1" ino=17053 res=1
INFO: task syz-executor.3:10784 blocked for more than 140 seconds.
      Not tainted 4.14.156-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
syz-executor.3  D28944 10784   8713 0x90000002
Call Trace:
 context_switch kernel/sched/core.c:2808 [inline]
 __schedule+0x7b8/0x1cd0 kernel/sched/core.c:3384
 schedule+0x92/0x1c0 kernel/sched/core.c:3428
 schedule_preempt_disabled+0x13/0x20 kernel/sched/core.c:3486
 __mutex_lock_common kernel/locking/mutex.c:833 [inline]
 __mutex_lock+0x73c/0x1470 kernel/locking/mutex.c:893
 mutex_lock_nested+0x16/0x20 kernel/locking/mutex.c:908
 perf_event_ctx_lock_nested+0x150/0x2c0 kernel/events/core.c:1235
 perf_event_ctx_lock kernel/events/core.c:1248 [inline]
 perf_event_release_kernel+0x90/0x880 kernel/events/core.c:4350
 perf_release+0x37/0x50 kernel/events/core.c:4435
 __fput+0x275/0x7a0 fs/file_table.c:210
 ____fput+0x16/0x20 fs/file_table.c:244
 task_work_run+0x114/0x190 kernel/task_work.c:113
 exit_task_work include/linux/task_work.h:22 [inline]
 do_exit+0x7df/0x2c10 kernel/exit.c:874
 do_group_exit+0x111/0x330 kernel/exit.c:977
 get_signal+0x381/0x1cd0 kernel/signal.c:2413
 do_signal+0x86/0x19a0 arch/x86/kernel/signal.c:814
 exit_to_usermode_loop+0x15c/0x220 arch/x86/entry/common.c:160
 prepare_exit_to_usermode arch/x86/entry/common.c:199 [inline]
 syscall_return_slowpath arch/x86/entry/common.c:270 [inline]
 do_syscall_64+0x4bc/0x640 arch/x86/entry/common.c:297
 entry_SYSCALL_64_after_hwframe+0x42/0xb7
RIP: 0033:0x45a639
RSP: 002b:00007f3e4cb75cf8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca
RAX: fffffffffffffe00 RBX: 000000000075bf28 RCX: 000000000045a639
RDX: 0000000000000000 RSI: 0000000000000080 RDI: 000000000075bf28
RBP: 000000000075bf20 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 000000000075bf2c
R13: 00007ffd38e22e1f R14: 00007f3e4cb769c0 R15: 000000000075bf2c
INFO: task syz-executor.0:10922 blocked for more than 140 seconds.
      Not tainted 4.14.156-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
syz-executor.0  D27968 10922   7014 0x10000004
Call Trace:
 context_switch kernel/sched/core.c:2808 [inline]
 __schedule+0x7b8/0x1cd0 kernel/sched/core.c:3384
 schedule+0x92/0x1c0 kernel/sched/core.c:3428
 schedule_preempt_disabled+0x13/0x20 kernel/sched/core.c:3486
 __mutex_lock_common kernel/locking/mutex.c:833 [inline]
 __mutex_lock+0x73c/0x1470 kernel/locking/mutex.c:893
 mutex_lock_nested+0x16/0x20 kernel/locking/mutex.c:908
 mutex_lock_double kernel/events/core.c:9904 [inline]
 __perf_event_ctx_lock_double kernel/events/core.c:9963 [inline]
 SYSC_perf_event_open+0x134c/0x2690 kernel/events/core.c:10225
 SyS_perf_event_open+0x34/0x40 kernel/events/core.c:9983
 do_syscall_64+0x1e8/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x42/0xb7
RIP: 0033:0x45a639
RSP: 002b:00007faab17b4c78 EFLAGS: 00000246 ORIG_RAX: 000000000000012a
RAX: ffffffffffffffda RBX: 0000000000000005 RCX: 000000000045a639
RDX: 0000000000000000 RSI: ffffffffffffffff RDI: 0000000020000200
RBP: 000000000075bf20 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000003 R11: 0000000000000246 R12: 00007faab17b56d4
R13: 00000000004c7b91 R14: 00000000004ddb70 R15: 00000000ffffffff
INFO: task syz-executor.1:10928 blocked for more than 140 seconds.
      Not tainted 4.14.156-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
syz-executor.1  D29696 10928   8840 0x10000004
Call Trace:
 context_switch kernel/sched/core.c:2808 [inline]
 __schedule+0x7b8/0x1cd0 kernel/sched/core.c:3384
 schedule+0x92/0x1c0 kernel/sched/core.c:3428
 schedule_preempt_disabled+0x13/0x20 kernel/sched/core.c:3486
 __mutex_lock_common kernel/locking/mutex.c:833 [inline]
 __mutex_lock+0x73c/0x1470 kernel/locking/mutex.c:893
 mutex_lock_nested+0x16/0x20 kernel/locking/mutex.c:908
 SYSC_perf_event_open+0x160a/0x2690 kernel/events/core.c:10251
 SyS_perf_event_open+0x34/0x40 kernel/events/core.c:9983
 do_syscall_64+0x1e8/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x42/0xb7
RIP: 0033:0x45a639
RSP: 002b:00007f8ea9318c78 EFLAGS: 00000246 ORIG_RAX: 000000000000012a
RAX: ffffffffffffffda RBX: 0000000000000005 RCX: 000000000045a639
RDX: 0000000000000000 RSI: ffffffffffffffff RDI: 0000000020000200
RBP: 000000000075bf20 R08: 0000000000000000 R09: 0000000000000000
R10: ffffffffffffffff R11: 0000000000000246 R12: 00007f8ea93196d4
R13: 00000000004c7b91 R14: 00000000004ddb70 R15: 00000000ffffffff
INFO: task syz-executor.1:10936 blocked for more than 140 seconds.
      Not tainted 4.14.156-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
syz-executor.1  D29232 10936   8840 0x10000004
Call Trace:
 context_switch kernel/sched/core.c:2808 [inline]
 __schedule+0x7b8/0x1cd0 kernel/sched/core.c:3384
 schedule+0x92/0x1c0 kernel/sched/core.c:3428
 schedule_preempt_disabled+0x13/0x20 kernel/sched/core.c:3486
 __mutex_lock_common kernel/locking/mutex.c:833 [inline]
 __mutex_lock+0x73c/0x1470 kernel/locking/mutex.c:893
 mutex_lock_nested+0x16/0x20 kernel/locking/mutex.c:908
 SYSC_perf_event_open+0x160a/0x2690 kernel/events/core.c:10251
 SyS_perf_event_open+0x34/0x40 kernel/events/core.c:9983
 do_syscall_64+0x1e8/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x42/0xb7
RIP: 0033:0x45a639
RSP: 002b:00007f8ea92f7c78 EFLAGS: 00000246 ORIG_RAX: 000000000000012a
RAX: ffffffffffffffda RBX: 0000000000000005 RCX: 000000000045a639
RDX: 0000000000000000 RSI: ffffffffffffffff RDI: 0000000020000200
RBP: 000000000075bfc8 R08: 0000000000000000 R09: 0000000000000000
R10: ffffffffffffffff R11: 0000000000000246 R12: 00007f8ea92f86d4
R13: 00000000004c7b91 R14: 00000000004ddb70 R15: 00000000ffffffff
INFO: task syz-executor.2:10927 blocked for more than 140 seconds.
      Not tainted 4.14.156-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
syz-executor.2  D29696 10927   7019 0x10000004
Call Trace:
 context_switch kernel/sched/core.c:2808 [inline]
 __schedule+0x7b8/0x1cd0 kernel/sched/core.c:3384
 schedule+0x92/0x1c0 kernel/sched/core.c:3428
 schedule_preempt_disabled+0x13/0x20 kernel/sched/core.c:3486
 __mutex_lock_common kernel/locking/mutex.c:833 [inline]
 __mutex_lock+0x73c/0x1470 kernel/locking/mutex.c:893
 mutex_lock_nested+0x16/0x20 kernel/locking/mutex.c:908
 SYSC_perf_event_open+0x160a/0x2690 kernel/events/core.c:10251
 SyS_perf_event_open+0x34/0x40 kernel/events/core.c:9983
 do_syscall_64+0x1e8/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x42/0xb7
RIP: 0033:0x45a639
RSP: 002b:00007fd0fa06fc78 EFLAGS: 00000246 ORIG_RAX: 000000000000012a
RAX: ffffffffffffffda RBX: 0000000000000005 RCX: 000000000045a639
RDX: 0000000000000000 RSI: ffffffffffffffff RDI: 0000000020000200
RBP: 000000000075bf20 R08: 0000000000000000 R09: 0000000000000000
R10: ffffffffffffffff R11: 0000000000000246 R12: 00007fd0fa0706d4
R13: 00000000004c7b91 R14: 00000000004ddb70 R15: 00000000ffffffff
INFO: task syz-executor.2:10940 blocked for more than 140 seconds.
      Not tainted 4.14.156-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
syz-executor.2  D28064 10940   7019 0x10000004
Call Trace:
 context_switch kernel/sched/core.c:2808 [inline]
 __schedule+0x7b8/0x1cd0 kernel/sched/core.c:3384
 schedule+0x92/0x1c0 kernel/sched/core.c:3428
 schedule_preempt_disabled+0x13/0x20 kernel/sched/core.c:3486
 __mutex_lock_common kernel/locking/mutex.c:833 [inline]
 __mutex_lock+0x73c/0x1470 kernel/locking/mutex.c:893
 mutex_lock_nested+0x16/0x20 kernel/locking/mutex.c:908
 SYSC_perf_event_open+0x160a/0x2690 kernel/events/core.c:10251
 SyS_perf_event_open+0x34/0x40 kernel/events/core.c:9983
 do_syscall_64+0x1e8/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x42/0xb7
RIP: 0033:0x45a639
RSP: 002b:00007fd0fa02dc78 EFLAGS: 00000246 ORIG_RAX: 000000000000012a
RAX: ffffffffffffffda RBX: 0000000000000005 RCX: 000000000045a639
RDX: 0000000000000000 RSI: ffffffffffffffff RDI: 0000000020000200
RBP: 000000000075c070 R08: 0000000000000000 R09: 0000000000000000
R10: ffffffffffffffff R11: 0000000000000246 R12: 00007fd0fa02e6d4
R13: 00000000004c7b91 R14: 00000000004ddb70 R15: 00000000ffffffff
INFO: task syz-executor.3:10932 blocked for more than 140 seconds.
      Not tainted 4.14.156-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
syz-executor.3  D27968 10932   8713 0x10000004
Call Trace:
 context_switch kernel/sched/core.c:2808 [inline]
 __schedule+0x7b8/0x1cd0 kernel/sched/core.c:3384
 schedule+0x92/0x1c0 kernel/sched/core.c:3428
 schedule_preempt_disabled+0x13/0x20 kernel/sched/core.c:3486
 __mutex_lock_common kernel/locking/mutex.c:833 [inline]
 __mutex_lock+0x73c/0x1470 kernel/locking/mutex.c:893
 mutex_lock_nested+0x16/0x20 kernel/locking/mutex.c:908
 SYSC_perf_event_open+0x160a/0x2690 kernel/events/core.c:10251
 SyS_perf_event_open+0x34/0x40 kernel/events/core.c:9983
 do_syscall_64+0x1e8/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x42/0xb7
RIP: 0033:0x45a639
RSP: 002b:00007f3e4cb75c78 EFLAGS: 00000246 ORIG_RAX: 000000000000012a
RAX: ffffffffffffffda RBX: 0000000000000005 RCX: 000000000045a639
RDX: 0000000000000000 RSI: ffffffffffffffff RDI: 0000000020000200
RBP: 000000000075bf20 R08: 0000000000000000 R09: 0000000000000000
R10: ffffffffffffffff R11: 0000000000000246 R12: 00007f3e4cb766d4
R13: 00000000004c7b91 R14: 00000000004ddb70 R15: 00000000ffffffff
INFO: task syz-executor.3:10963 blocked for more than 140 seconds.
      Not tainted 4.14.156-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
syz-executor.3  D30080 10963   8713 0x10000004
Call Trace:
 context_switch kernel/sched/core.c:2808 [inline]
 __schedule+0x7b8/0x1cd0 kernel/sched/core.c:3384
 schedule+0x92/0x1c0 kernel/sched/core.c:3428
 schedule_preempt_disabled+0x13/0x20 kernel/sched/core.c:3486
 __mutex_lock_common kernel/locking/mutex.c:833 [inline]
 __mutex_lock+0x73c/0x1470 kernel/locking/mutex.c:893
 mutex_lock_nested+0x16/0x20 kernel/locking/mutex.c:908
 SYSC_perf_event_open+0x160a/0x2690 kernel/events/core.c:10251
 SyS_perf_event_open+0x34/0x40 kernel/events/core.c:9983
 do_syscall_64+0x1e8/0x640 arch/x86/entry/common.c:292
 entry_SYSCALL_64_after_hwframe+0x42/0xb7
RIP: 0033:0x45a639
RSP: 002b:00007f3e4cb33c78 EFLAGS: 00000246 ORIG_RAX: 000000000000012a
RAX: ffffffffffffffda RBX: 0000000000000005 RCX: 000000000045a639
RDX: 0000000000000000 RSI: ffffffffffffffff RDI: 0000000020000200
RBP: 000000000075c070 R08: 0000000000000000 R09: 0000000000000000
R10: ffffffffffffffff R11: 0000000000000246 R12: 00007f3e4cb346d4
R13: 00000000004c7b91 R14: 00000000004ddb70 R15: 00000000ffffffff

Showing all locks held in the system:
1 lock held by khungtaskd/1018:
 #0:  (tasklist_lock){.+.+}, at: [<ffffffff8148bca8>] debug_show_all_locks+0x7f/0x21f kernel/locking/lockdep.c:4544
1 lock held by rsyslogd/6848:
 #0:  (&f->f_pos_lock){+.+.}, at: [<ffffffff819499bb>] __fdget_pos+0xab/0xd0 fs/file.c:769
2 locks held by getty/6971:
 #0:  (&tty->ldisc_sem){++++}, at: [<ffffffff861ced23>] ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:376
 #1:  (&ldata->atomic_read_lock){+.+.}, at: [<ffffffff831144c6>] n_tty_read+0x1e6/0x17b0 drivers/tty/n_tty.c:2156
2 locks held by getty/6972:
 #0:  (&tty->ldisc_sem){++++}, at: [<ffffffff861ced23>] ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:376
 #1:  (&ldata->atomic_read_lock){+.+.}, at: [<ffffffff831144c6>] n_tty_read+0x1e6/0x17b0 drivers/tty/n_tty.c:2156
2 locks held by getty/6973:
 #0:  (&tty->ldisc_sem){++++}, at: [<ffffffff861ced23>] ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:376
 #1:  (&ldata->atomic_read_lock){+.+.}, at: [<ffffffff831144c6>] n_tty_read+0x1e6/0x17b0 drivers/tty/n_tty.c:2156
2 locks held by getty/6974:
 #0:  (&tty->ldisc_sem){++++}, at: [<ffffffff861ced23>] ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:376
 #1:  (&ldata->atomic_read_lock){+.+.}, at: [<ffffffff831144c6>] n_tty_read+0x1e6/0x17b0 drivers/tty/n_tty.c:2156
2 locks held by getty/6975:
 #0:  (&tty->ldisc_sem){++++}, at: [<ffffffff861ced23>] ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:376
 #1:  (&ldata->atomic_read_lock){+.+.}, at: [<ffffffff831144c6>] n_tty_read+0x1e6/0x17b0 drivers/tty/n_tty.c:2156
2 locks held by getty/6976:
 #0:  (&tty->ldisc_sem){++++}, at: [<ffffffff861ced23>] ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:376
 #1:  (&ldata->atomic_read_lock){+.+.}, at: [<ffffffff831144c6>] n_tty_read+0x1e6/0x17b0 drivers/tty/n_tty.c:2156
2 locks held by getty/6977:
 #0:  (&tty->ldisc_sem){++++}, at: [<ffffffff861ced23>] ldsem_down_read+0x33/0x40 drivers/tty/tty_ldsem.c:376
 #1:  (&ldata->atomic_read_lock){+.+.}, at: [<ffffffff831144c6>] n_tty_read+0x1e6/0x17b0 drivers/tty/n_tty.c:2156
1 lock held by syz-executor.3/10784:
 #0:  (&cpuctx_mutex){+.+.}, at: [<ffffffff816c1a40>] perf_event_ctx_lock_nested+0x150/0x2c0 kernel/events/core.c:1235
2 locks held by syz-executor.0/10922:
 #0:  (&cpuctx_mutex){+.+.}, at: [<ffffffff816dd47f>] mutex_lock_double kernel/events/core.c:9903 [inline]
 #0:  (&cpuctx_mutex){+.+.}, at: [<ffffffff816dd47f>] __perf_event_ctx_lock_double kernel/events/core.c:9963 [inline]
 #0:  (&cpuctx_mutex){+.+.}, at: [<ffffffff816dd47f>] SYSC_perf_event_open+0x133f/0x2690 kernel/events/core.c:10225
 #1:  (&cpuctx_mutex/1){+.+.}, at: [<ffffffff816dd48c>] mutex_lock_double kernel/events/core.c:9904 [inline]
 #1:  (&cpuctx_mutex/1){+.+.}, at: [<ffffffff816dd48c>] __perf_event_ctx_lock_double kernel/events/core.c:9963 [inline]
 #1:  (&cpuctx_mutex/1){+.+.}, at: [<ffffffff816dd48c>] SYSC_perf_event_open+0x134c/0x2690 kernel/events/core.c:10225
1 lock held by syz-executor.1/10928:
 #0:  (&cpuctx_mutex){+.+.}, at: [<ffffffff816dd74a>] SYSC_perf_event_open+0x160a/0x2690 kernel/events/core.c:10251
1 lock held by syz-executor.1/10936:
 #0:  (&cpuctx_mutex){+.+.}, at: [<ffffffff816dd74a>] SYSC_perf_event_open+0x160a/0x2690 kernel/events/core.c:10251
1 lock held by syz-executor.2/10927:
 #0:  (&cpuctx_mutex){+.+.}, at: [<ffffffff816dd74a>] SYSC_perf_event_open+0x160a/0x2690 kernel/events/core.c:10251
1 lock held by syz-executor.2/10940:
 #0:  (&cpuctx_mutex){+.+.}, at: [<ffffffff816dd74a>] SYSC_perf_event_open+0x160a/0x2690 kernel/events/core.c:10251
1 lock held by syz-executor.3/10932:
 #0:  (&cpuctx_mutex){+.+.}, at: [<ffffffff816dd74a>] SYSC_perf_event_open+0x160a/0x2690 kernel/events/core.c:10251
1 lock held by syz-executor.3/10963:
 #0:  (&cpuctx_mutex){+.+.}, at: [<ffffffff816dd74a>] SYSC_perf_event_open+0x160a/0x2690 kernel/events/core.c:10251

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

NMI backtrace for cpu 0
CPU: 0 PID: 1018 Comm: khungtaskd Not tainted 4.14.156-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:17 [inline]
 dump_stack+0x142/0x197 lib/dump_stack.c:58
 nmi_cpu_backtrace.cold+0x57/0x94 lib/nmi_backtrace.c:101
 nmi_trigger_cpumask_backtrace+0x141/0x189 lib/nmi_backtrace.c:62
 arch_trigger_cpumask_backtrace+0x14/0x20 arch/x86/kernel/apic/hw_nmi.c:38
 trigger_all_cpu_backtrace include/linux/nmi.h:140 [inline]
 check_hung_uninterruptible_tasks kernel/hung_task.c:195 [inline]
 watchdog+0x5e7/0xb90 kernel/hung_task.c:274
 kthread+0x319/0x430 kernel/kthread.c:232
 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:404
Sending NMI from CPU 0 to CPUs 1:
NMI backtrace for cpu 1 skipped: idling at pc 0xffffffff861cf80e

Crashes (1):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-linux-4-14 2019/11/25 11:21 linux-4.14.y 43598c571e7e 598ca6c8 .config log report