syzbot


INFO: task hung in perf_event_free_task
Status: upstream: reported C repro on 2019/07/24 19:18
Reported-by: syzbot+7692cea7450c97fa2a0a@syzkaller.appspotmail.com
First crash: 1043d, last: 131d

Cause bisection: introduced by (bisect log) :
commit 1cf8dfe8a661f0462925df943140e9f6d1ea5233
Author: Peter Zijlstra <peterz@infradead.org>
Date: Sat Jul 13 09:21:25 2019 +0000

  perf/core: Fix race between close() and fork()

Crash: INFO: task hung in perf_event_free_task (log)
Repro: syz .config

Fix bisection: failed (bisect log)
similar bugs (4):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-4.19 INFO: task hung in perf_event_free_task (3) 3 22d 168d 0/1 upstream: reported on 2021/12/08 11:06
linux-4.19 INFO: task hung in perf_event_free_task (2) 2 378d 450d 0/1 auto-closed as invalid on 2021/09/09 09:13
linux-4.19 INFO: task hung in perf_event_free_task 5 593d 988d 0/1 auto-closed as invalid on 2021/02/06 21:15
upstream INFO: task can't die in perf_event_free_task syz unreliable 6 171d 552d 0/22 upstream: reported syz repro on 2020/11/19 15:42

Sample crash report:
INFO: task syz-executor890:6628 blocked for more than 143 seconds.
      Not tainted 5.12.0-rc8-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor890 state:D stack:25968 pid: 6628 ppid:  8391 flags:0x00004004
Call Trace:
 context_switch kernel/sched/core.c:4322 [inline]
 __schedule+0xa4d/0xf80 kernel/sched/core.c:5073
 schedule+0x14b/0x200 kernel/sched/core.c:5152
 perf_event_free_task+0x575/0x6a0 kernel/events/core.c:12623
 copy_process+0x418f/0x57e0 kernel/fork.c:2376
 kernel_clone+0x21a/0x7d0 kernel/fork.c:2500
 __do_sys_clone kernel/fork.c:2617 [inline]
 __se_sys_clone kernel/fork.c:2601 [inline]
 __x64_sys_clone+0x236/0x2b0 kernel/fork.c:2601
 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x44b6e9
RSP: 002b:00007fd6c1512208 EFLAGS: 00000246 ORIG_RAX: 0000000000000038
RAX: ffffffffffffffda RBX: 00000000004d7288 RCX: 000000000044b6e9
RDX: 9999999999999999 RSI: 0000000000000000 RDI: 0000000022086605
RBP: 00000000004d7280 R08: ffffffffffffffff R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00000000004d728c
R13: 00007ffc3bab65ef R14: 00007fd6c1512300 R15: 0000000000022000

Showing all locks held in the system:
1 lock held by khungtaskd/1623:
 #0: ffffffff8cd10280 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x0/0x30 arch/x86/pci/mmconfig_64.c:151
2 locks held by systemd-journal/4819:
1 lock held by in:imklog/8079:
 #0: ffff8880163265f0 (&f->f_pos_lock){+.+.}-{3:3}, at: __fdget_pos+0x24e/0x2f0 fs/file.c:974
2 locks held by syz-executor890/6495:

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

NMI backtrace for cpu 1
CPU: 1 PID: 1623 Comm: khungtaskd Not tainted 5.12.0-rc8-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:79 [inline]
 dump_stack+0x202/0x31e lib/dump_stack.c:120
 nmi_cpu_backtrace+0x16c/0x190 lib/nmi_backtrace.c:105
 nmi_trigger_cpumask_backtrace+0x191/0x2f0 lib/nmi_backtrace.c:62
 trigger_all_cpu_backtrace include/linux/nmi.h:146 [inline]
 check_hung_uninterruptible_tasks kernel/hung_task.c:209 [inline]
 watchdog+0xcfb/0xd40 kernel/hung_task.c:294
 kthread+0x39a/0x3c0 kernel/kthread.c:292
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294
Sending NMI from CPU 1 to CPUs 0:
NMI backtrace for cpu 0
CPU: 0 PID: 6495 Comm: syz-executor890 Not tainted 5.12.0-rc8-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:orc_find arch/x86/kernel/unwind_orc.c:155 [inline]
RIP: 0010:unwind_next_frame+0x184/0x1f90 arch/x86/kernel/unwind_orc.c:443
Code: 89 7c 24 70 0f 84 1a 01 00 00 48 c7 c0 00 00 00 81 49 39 c4 0f 82 16 01 00 00 48 c7 c0 52 83 e0 89 49 39 c4 0f 83 06 01 00 00 <48> c7 c0 00 00 00 81 4c 89 e5 48 29 c5 48 c1 ed 08 48 c7 c0 e8 8d
RSP: 0000:ffffc9000dd5f720 EFLAGS: 00000087
RAX: ffffffff89e08352 RBX: ffffc9000dd5f828 RCX: ffffffff9031ab03
RDX: ffffc9000dd5fc20 RSI: ffffffff814e6de0 RDI: 0000000000000001
RBP: ffffc9000dd5f815 R08: 0000000000000003 R09: ffffc9000dd5f8b0
R10: fffff52001babf08 R11: 0000000000000000 R12: ffffffff814e6ddf
R13: ffffc9000dd5f7e0 R14: dffffc0000000000 R15: 1ffff92001babf02
FS:  00007fd6c1512700(0000) GS:ffff8880b9c00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000022000 CR3: 0000000034d8b000 CR4: 00000000001506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 arch_stack_walk+0xb2/0xe0 arch/x86/kernel/stacktrace.c:25
 stack_trace_save+0x104/0x1e0 kernel/stacktrace.c:121
 kasan_save_stack mm/kasan/common.c:38 [inline]
 kasan_set_track mm/kasan/common.c:46 [inline]
 set_alloc_info mm/kasan/common.c:427 [inline]
 __kasan_slab_alloc+0x8f/0xc0 mm/kasan/common.c:460
 kasan_slab_alloc include/linux/kasan.h:223 [inline]
 slab_post_alloc_hook mm/slab.h:516 [inline]
 slab_alloc_node mm/slub.c:2907 [inline]
 slab_alloc mm/slub.c:2915 [inline]
 kmem_cache_alloc+0x1c3/0x350 mm/slub.c:2920
 __sigqueue_alloc+0x2c2/0x490 kernel/signal.c:435
 __send_signal+0x210/0xe50 kernel/signal.c:1116
 force_sig_info_to_task+0x2a4/0x3f0 kernel/signal.c:1334
 force_sig_fault_to_task kernel/signal.c:1673 [inline]
 force_sig_fault+0x11e/0x1c0 kernel/signal.c:1680
 __bad_area_nosemaphore+0x390/0x570 arch/x86/mm/fault.c:840
 handle_page_fault arch/x86/mm/fault.c:1475 [inline]
 exc_page_fault+0xa1/0x1e0 arch/x86/mm/fault.c:1531
 asm_exc_page_fault+0x1e/0x30 arch/x86/include/asm/idtentry.h:577
RIP: 0033:0x22000
Code: Unable to access opcode bytes at RIP 0x21fd6.
RSP: 002b:00007fd6c1512220 EFLAGS: 00010206
RAX: ffffffffffffffff RBX: 00000000004d7288 RCX: ffffffffffffffbc
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000020000000
RBP: 00000000004d7280 R08: 0000000000000000 R09: 00007fd6c1512300
R10: 00000000ffffffff R11: 0000000000000246 R12: 00000000004d728c
R13: 00007ffc3bab65ef R14: 00007fd6c1512300 R15: 0000000000022000

Crashes (40):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-kasan-gce-smack-root 2021/04/20 09:09 upstream 7af08140979a 4285c989 .config log report syz C INFO: task hung in perf_event_free_task
ci-upstream-kasan-gce-smack-root 2019/08/27 04:11 upstream a55aa89aab90 d21c5d9d .config log report syz
ci-upstream-kasan-gce-smack-root 2019/08/16 13:14 upstream 329120423947 8fd428a1 .config log report syz
ci-upstream-kasan-gce-smack-root 2019/08/11 10:45 upstream 296d05cb0d3c acb51638 .config log report syz
ci-upstream-kasan-gce-smack-root 2019/08/05 10:56 upstream e21a712a9685 6affd8e8 .config log report syz
ci-upstream-kasan-gce-root 2019/08/05 10:44 upstream e21a712a9685 6affd8e8 .config log report syz
ci-upstream-kasan-gce-root 2019/08/04 04:49 upstream dcb8cfbd8fe9 6affd8e8 .config log report syz
ci-upstream-kasan-gce-smack-root 2019/07/24 13:05 upstream c6dd78fcb8ee 32329ceb .config log report syz
ci-upstream-linux-next-kasan-gce-root 2019/07/24 13:57 linux-next 9e6dfe8045f8 32329ceb .config log report syz
ci-upstream-kasan-gce 2022/01/15 01:18 upstream fb3b0673b7d5 53e00b45 .config log report info INFO: task hung in perf_event_free_task
ci-upstream-kasan-gce 2022/01/14 00:46 upstream 455e73a07f6e b8d780ab .config log report info INFO: task hung in perf_event_free_task
ci-upstream-kasan-gce-smack-root 2022/01/13 10:42 upstream f079ab01b560 44d1319a .config log report info INFO: task hung in perf_event_free_task
ci-upstream-kasan-gce 2022/01/13 06:25 upstream f079ab01b560 44d1319a .config log report info INFO: task hung in perf_event_free_task
ci-upstream-kasan-gce-selinux-root 2021/12/18 21:19 upstream 9eaa88c7036e 44068e19 .config log report info INFO: task hung in perf_event_free_task
ci-upstream-kasan-gce-root 2021/12/12 05:14 upstream 6f513529296f 49ca1f59 .config log report info INFO: task hung in perf_event_free_task
ci-upstream-kasan-gce-selinux-root 2021/11/24 12:45 upstream 5d9f4cf36721 545ab074 .config log report info INFO: task hung in perf_event_free_task
ci-upstream-kasan-gce-root 2021/09/25 11:44 upstream 7d42e9818258 8cac236e .config log report info INFO: task hung in perf_event_free_task
ci-upstream-kasan-gce-smack-root 2021/09/20 04:58 upstream 20621d2f27a0 70b76c1d .config log report info INFO: task hung in perf_event_free_task
ci-upstream-kasan-gce-smack-root 2021/07/06 23:27 upstream 3dbdb38e2869 cca78469 .config log report info INFO: task hung in perf_event_free_task
ci-upstream-kasan-gce-selinux-root 2021/05/22 19:15 upstream 23d729263037 3c7fef33 .config log report info INFO: task hung in perf_event_free_task
ci-upstream-kasan-gce-selinux-root 2021/05/17 09:08 upstream d07f6ca923ea a2eb125d .config log report info INFO: task hung in perf_event_free_task
ci-upstream-kasan-gce-root 2020/09/24 08:37 upstream c9c9e6a49f89 54289b08 .config log report info
ci-upstream-kasan-gce 2020/09/07 15:45 upstream a8205e310011 abf9ba4f .config log report
ci-upstream-kasan-gce 2020/02/21 18:25 upstream ca7e1fd1026c bd2a74a3 .config log report
ci-upstream-kasan-gce 2020/02/10 12:23 upstream bb6d3fb354c5 35f5e45e .config log report
ci-upstream-kasan-gce-smack-root 2020/02/02 16:03 upstream 94f2630b1897 93e5e335 .config log report
ci-upstream-kasan-gce 2020/01/19 11:58 upstream 244dc2689085 bc8bc756 .config log report
ci-upstream-kasan-gce-selinux-root 2019/12/31 00:51 upstream fd6988496e79 7f117e28 .config log report
ci-upstream-kasan-gce-selinux-root 2019/10/26 07:28 upstream 8caacaad78b6 413926c5 .config log report
ci-upstream-kasan-gce-smack-root 2019/08/22 19:07 upstream bb7ba8069de9 d003d6d0 .config log report
ci-upstream-kasan-gce-selinux-root 2019/07/17 14:12 upstream 3eb514866f20 0d10349c .config log report
ci-upstream-kasan-gce-386 2020/05/31 01:34 upstream ffeb595d8481 6f3e1c7c .config log report
ci-upstream-kasan-gce-386 2020/02/27 19:22 upstream f8788d86ab28 59b57593 .config log report
ci-upstream-kasan-gce-386 2019/09/01 23:58 upstream 9f159ae07f07 bad3cce2 .config log report
ci-upstream-kasan-gce-386 2019/07/24 18:32 upstream bed38c3e2dca 32329ceb .config log report
ci-upstream-kasan-gce-386 2019/07/20 07:49 upstream 31cc088a4f5d 1656845f .config log report
ci-upstream-linux-next-kasan-gce-root 2020/04/13 07:16 linux-next 3b2804993d1e 17a986e5 .config log report
ci-upstream-linux-next-kasan-gce-root 2020/03/06 15:25 linux-next c99b17ac0399 c88c7b75 .config log report
ci-upstream-linux-next-kasan-gce-root 2019/09/12 07:15 linux-next 6d028043b55e f4e53c10 .config log report
ci-upstream-linux-next-kasan-gce-root 2019/08/19 10:51 linux-next da6570438d9b b8ceabfc .config log report