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: 751d, last: 47d

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 (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 217d 363d 0/1 auto-obsoleted due to no activity on 2022/08/31 14:29
linux-4.19 INFO: task hung in perf_event_free_task (2) 2 573d 645d 0/1 auto-closed as invalid on 2021/09/09 09:13
linux-4.19 INFO: task hung in perf_event_free_task (4) 2 56d 85d 0/1 upstream: reported on 2022/09/12 12:14
upstream INFO: task hung in perf_event_free_task C done error 40 64d 1231d 0/24 upstream: reported C repro on 2019/07/24 19:18
Patch testing requests:
Created Duration User Patch Repo Result
2022/10/20 08:30 15m retest repro linux-next report log
2022/10/19 21:30 16m retest repro linux-next OK log

Sample crash report:
INFO: task syz-executor.0:4356 can't die for more than 143 seconds.
task:syz-executor.0  state:D stack:27408 pid: 4356 ppid:  6596 flags:0x00000006
Call Trace:
 context_switch kernel/sched/core.c:4700 [inline]
 __schedule+0x949/0x2710 kernel/sched/core.c:5957
 schedule+0xd3/0x290 kernel/sched/core.c:6036
 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:00007fa044c44188 EFLAGS: 00000246 ORIG_RAX: 0000000000000038
RAX: ffffffffffffffda RBX: 000000000056bf80 RCX: 00000000004665e9
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 000000002124f700
RBP: 00000000004bfcc4 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056bf80
R13: 00007ffea9d96d9f R14: 00007fa044c44300 R15: 0000000000022000
INFO: task syz-executor.0:4356 blocked for more than 143 seconds.
      Not tainted 5.14.0-rc3-next-20210730-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor.0  state:D stack:27408 pid: 4356 ppid:  6596 flags:0x00000006
Call Trace:
 context_switch kernel/sched/core.c:4700 [inline]
 __schedule+0x949/0x2710 kernel/sched/core.c:5957
 schedule+0xd3/0x290 kernel/sched/core.c:6036
 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:00007fa044c44188 EFLAGS: 00000246 ORIG_RAX: 0000000000000038
RAX: ffffffffffffffda RBX: 000000000056bf80 RCX: 00000000004665e9
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 000000002124f700
RBP: 00000000004bfcc4 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056bf80
R13: 00007ffea9d96d9f R14: 00007fa044c44300 R15: 0000000000022000

Showing all locks held in the system:
1 lock held by khungtaskd/26:
 #0: ffffffff8b97e980 (rcu_read_lock){....}-{1:2}, at: debug_show_all_locks+0x53/0x260 kernel/locking/lockdep.c:6446

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

NMI backtrace for cpu 1
CPU: 1 PID: 26 Comm: khungtaskd Not tainted 5.14.0-rc3-next-20210730-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:105
 nmi_cpu_backtrace.cold+0x28/0x11b 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: 6278 Comm: rs:main Q:Reg Not tainted 5.14.0-rc3-next-20210730-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
RIP: 0010:ext4_da_should_update_i_disksize fs/ext4/inode.c:3061 [inline]
RIP: 0010:ext4_da_write_end+0x6f8/0xb50 fs/ext4/inode.c:3094
Code: 08 00 00 00 4c 89 ff e8 76 aa aa ff 4c 89 fa 48 b8 00 00 00 00 00 fc ff df 48 c1 ea 03 80 3c 02 00 0f 85 de 03 00 00 49 8b 1f <31> ff 48 c1 eb 04 83 e3 01 89 de e8 98 25 65 ff 84 db 0f 84 62 fa
RSP: 0018:ffffc9000c27fa18 EFLAGS: 00000246
RAX: dffffc0000000000 RBX: 0000000000000113 RCX: ffffffff821098aa
RDX: 1ffff1100de4d5b3 RSI: 0000000000000008 RDI: ffff88806f26ad98
RBP: ffff8880703b36a0 R08: 0000000000000000 R09: ffff88806f26ad9f
R10: ffffed100de4d5b3 R11: 000000000000003f R12: 00000000000004d8
R13: ffffea0001a44880 R14: ffff8880703b3478 R15: ffff88806f26ad98
FS:  00007f3e58a78700(0000) GS:ffff8880b9c00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f52c5dbf000 CR3: 0000000070afa000 CR4: 00000000001506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 generic_perform_write+0x2c3/0x510 mm/filemap.c:3766
 ext4_buffered_write_iter+0x244/0x4d0 fs/ext4/file.c:269
 ext4_file_write_iter+0x423/0x14e0 fs/ext4/file.c:680
 call_write_iter include/linux/fs.h:2152 [inline]
 new_sync_write+0x426/0x650 fs/read_write.c:518
 vfs_write+0x75a/0xa40 fs/read_write.c:605
 ksys_write+0x12d/0x250 fs/read_write.c:658
 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:0x7f3e5b4bc1cd
Code: c2 20 00 00 75 10 b8 01 00 00 00 0f 05 48 3d 01 f0 ff ff 73 31 c3 48 83 ec 08 e8 ae fc ff ff 48 89 04 24 b8 01 00 00 00 0f 05 <48> 8b 3c 24 48 89 c2 e8 f7 fc ff ff 48 89 d0 48 83 c4 08 48 3d 01
RSP: 002b:00007f3e58a77590 EFLAGS: 00000293 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00007f3e4c021a10 RCX: 00007f3e5b4bc1cd
RDX: 00000000000004d8 RSI: 00007f3e4c021a10 RDI: 000000000000000a
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000293 R12: 00007f3e4c021790
R13: 00007f3e58a775b0 R14: 0000564bb7d027c0 R15: 00000000000004d8

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/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/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/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
* Struck through repros no longer work on HEAD.