syzbot


INFO: task can't die in perf_event_free_task

Status: upstream: reported syz repro on 2020/11/19 15:42
Reported-by: syzbot+f02b92479b7065807a2a@syzkaller.appspotmail.com
First crash: 598d, last: 212d

Cause bisection: introduced by (bisect log) [no-op commit]:
commit ab2dd173330a3f07142e68cd65682205036cd00f
Author: Andy Lutomirski <luto@kernel.org>
Date: Wed Aug 26 17:00:45 2020 +0000

  selftests/x86/fsgsbase: Reap a forgotten child

Crash: INFO: task hung in perf_event_free_task (log)
Repro: syz .config
similar bugs (3):
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 64d 210d 0/1 upstream: reported on 2021/12/08 11:06
linux-4.19 INFO: task hung in perf_event_free_task (2) 2 420d 492d 0/1 auto-closed as invalid on 2021/09/09 09:13
upstream INFO: task hung in perf_event_free_task C done error 40 172d 1078d 0/22 upstream: reported C repro on 2019/07/24 19:18

Sample crash report:
INFO: task syz-executor.2:21304 can't die for more than 143 seconds.
task:syz-executor.2  state:D stack:27072 pid:21304 ppid:  6623 flags:0x00004006
Call Trace:
 context_switch kernel/sched/core.c:4698 [inline]
 __schedule+0x93a/0x26f0 kernel/sched/core.c:5955
 schedule+0xd3/0x270 kernel/sched/core.c:6034
 perf_event_free_task+0x519/0x6c0 kernel/events/core.c:12804
 copy_process+0x4b59/0x7510 kernel/fork.c:2437
 kernel_clone+0xe7/0xac0 kernel/fork.c:2561
 __do_sys_clone+0xc8/0x110 kernel/fork.c:2678
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x4665e9
RSP: 002b:00007fbf6fbec188 EFLAGS: 00000246 ORIG_RAX: 0000000000000038
RAX: ffffffffffffffda RBX: 000000000056bf80 RCX: 00000000004665e9
RDX: 9999999999999999 RSI: 0000000000000000 RDI: 0000000080000100
RBP: 00000000004bfcc4 R08: ffffffffffffffff R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056bf80
R13: 00007ffcceb121ff R14: 00007fbf6fbec300 R15: 0000000000022000
INFO: task syz-executor.2:21304 blocked for more than 143 seconds.
      Not tainted 5.14.0-rc5-next-20210811-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor.2  state:D stack:27072 pid:21304 ppid:  6623 flags:0x00004006
Call Trace:
 context_switch kernel/sched/core.c:4698 [inline]
 __schedule+0x93a/0x26f0 kernel/sched/core.c:5955
 schedule+0xd3/0x270 kernel/sched/core.c:6034
 perf_event_free_task+0x519/0x6c0 kernel/events/core.c:12804
 copy_process+0x4b59/0x7510 kernel/fork.c:2437
 kernel_clone+0xe7/0xac0 kernel/fork.c:2561
 __do_sys_clone+0xc8/0x110 kernel/fork.c:2678
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x4665e9
RSP: 002b:00007fbf6fbec188 EFLAGS: 00000246 ORIG_RAX: 0000000000000038
RAX: ffffffffffffffda RBX: 000000000056bf80 RCX: 00000000004665e9
RDX: 9999999999999999 RSI: 0000000000000000 RDI: 0000000080000100
RBP: 00000000004bfcc4 R08: ffffffffffffffff R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056bf80
R13: 00007ffcceb121ff R14: 00007fbf6fbec300 R15: 0000000000022000
INFO: lockdep is turned off.
NMI backtrace for cpu 1
CPU: 1 PID: 26 Comm: khungtaskd Not tainted 5.14.0-rc5-next-20210811-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106
 nmi_cpu_backtrace.cold+0x47/0x144 lib/nmi_backtrace.c:105
 nmi_trigger_cpumask_backtrace+0x1ae/0x220 lib/nmi_backtrace.c:62
 trigger_all_cpu_backtrace include/linux/nmi.h:146 [inline]
 check_hung_uninterruptible_tasks kernel/hung_task.c:254 [inline]
 watchdog+0xcb7/0xed0 kernel/hung_task.c:339
 kthread+0x3e5/0x4d0 kernel/kthread.c:319
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
Sending NMI from CPU 1 to CPUs 0:
NMI backtrace for cpu 0
CPU: 0 PID: 8623 Comm: kworker/0:8 Not tainted 5.14.0-rc5-next-20210811-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Workqueue: events kfree_rcu_work
RIP: 0010:unwind_next_frame+0xda/0x1ce0 arch/x86/kernel/unwind_orc.c:419
Code: 81 c4 a0 00 00 00 5b 5d 41 5c 41 5d 41 5e 41 5f c3 4d 8d 66 48 48 b8 00 00 00 00 00 fc ff df 4c 89 e2 48 c1 ea 03 80 3c 02 00 <0f> 85 43 15 00 00 49 8b 46 48 48 89 44 24 10 49 8d 46 38 48 89 c2
RSP: 0018:ffffc9000cd1f6f8 EFLAGS: 00000246
RAX: dffffc0000000000 RBX: 1ffff920019a3ee7 RCX: 0000000000000000
RDX: 1ffff920019a3f03 RSI: 0000000000000000 RDI: ffffc9000cd1f7d0
RBP: 0000000000000001 R08: ffffffff8df3554a R09: 0000000000000001
R10: fffff520019a3f05 R11: 0000000000086089 R12: ffffc9000cd1f818
R13: 0000000000000000 R14: ffffc9000cd1f7d0 R15: ffffc9000cd1fbd8
FS:  0000000000000000(0000) GS:ffff8880b9c00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fa07d883000 CR3: 000000001ec11000 CR4: 00000000001506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 arch_stack_walk+0x7d/0xe0 arch/x86/kernel/stacktrace.c:25
 stack_trace_save+0x8c/0xc0 kernel/stacktrace.c:121
 kasan_save_stack+0x1b/0x40 mm/kasan/common.c:38
 kasan_set_track+0x1c/0x30 mm/kasan/common.c:46
 kasan_set_free_info+0x20/0x30 mm/kasan/generic.c:360
 ____kasan_slab_free mm/kasan/common.c:366 [inline]
 ____kasan_slab_free mm/kasan/common.c:328 [inline]
 __kasan_slab_free+0xfb/0x130 mm/kasan/common.c:374
 kasan_slab_free include/linux/kasan.h:230 [inline]
 slab_free_hook mm/slub.c:1681 [inline]
 slab_free_freelist_hook+0x7e/0x190 mm/slub.c:1706
 slab_free mm/slub.c:3444 [inline]
 kmem_cache_free_bulk mm/slub.c:3585 [inline]
 kmem_cache_free_bulk+0x3e4/0xa40 mm/slub.c:3572
 kfree_bulk include/linux/slab.h:448 [inline]
 kfree_rcu_work+0x51c/0xa10 kernel/rcu/tree.c:3273
 process_one_work+0x98d/0x1630 kernel/workqueue.c:2275
 worker_thread+0x658/0x11f0 kernel/workqueue.c:2421
 kthread+0x3e5/0x4d0 kernel/kthread.c:319
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295

Crashes (6):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-linux-next-kasan-gce-root 2021/08/12 00:22 linux-next 8ca403f3e7a2 6972b106 .config log report syz INFO: task can't die in perf_event_free_task
ci-upstream-linux-next-kasan-gce-root 2021/08/06 18:16 linux-next 8d4b477da1a8 f9e341e3 .config log report syz INFO: task can't die in perf_event_free_task
ci-upstream-linux-next-kasan-gce-root 2020/11/15 15:35 linux-next 92edc4aef867 1bf9a662 .config log report syz
ci-upstream-linux-next-kasan-gce-root 2021/12/05 21:15 linux-next f81e94e91878 a617004c .config log report info INFO: task can't die in perf_event_free_task
ci-upstream-linux-next-kasan-gce-root 2021/08/06 14:48 linux-next 8d4b477da1a8 f9e341e3 .config log report info INFO: task can't die in perf_event_free_task
ci-upstream-linux-next-kasan-gce-root 2021/07/21 16:58 linux-next b1347210b01d 29c3f20f .config log report info INFO: task can't die in perf_event_free_task