syzbot


INFO: task hung in perf_event_free_task (4)

Status: upstream: reported on 2022/09/12 12:14
Reported-by: syzbot+b6011b28757c99f01c61@syzkaller.appspotmail.com
First crash: 592d, last: 423d
Similar bugs (8)
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 724d 870d 0/1 auto-obsoleted due to no activity on 2022/08/31 14:29
linux-5.15 INFO: task hung in perf_event_free_task C error 1 177d 177d 0/3 auto-obsoleted due to no activity on 2024/02/09 23:23
linux-4.19 INFO: task hung in perf_event_free_task (2) 2 1080d 1152d 0/1 auto-closed as invalid on 2021/09/09 09:13
upstream INFO: task hung in perf_event_free_task perf C done error 40 229d 1738d 0/26 auto-obsoleted due to no activity on 2023/12/19 10:14
linux-5.15 INFO: task hung in perf_event_free_task (2) 1 63d 63d 0/3 upstream: reported on 2024/02/23 07:34
linux-6.1 INFO: task hung in perf_event_free_task origin:upstream C error 3 123d 227d 0/3 upstream: reported C repro on 2023/09/12 07:14
linux-4.19 INFO: task hung in perf_event_free_task 5 1295d 1690d 0/1 auto-closed as invalid on 2021/02/06 21:15
upstream INFO: task can't die in perf_event_free_task perf syz unreliable 6 554d 1254d 0/26 auto-obsoleted due to no activity on 2023/04/21 23:56

Sample crash report:
TCP: request_sock_TCPv6: Possible SYN flooding on port 20002. Sending cookies.  Check SNMP counters.
INFO: task syz-executor.5:28330 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  D27056 28330   4644 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
 perf_event_free_task+0x4cf/0x660 kernel/events/core.c:11372
 copy_process.part.0+0x3710/0x8260 kernel/fork.c:2137
 copy_process kernel/fork.c:1710 [inline]
 _do_fork+0x22f/0xf30 kernel/fork.c:2219
 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7f6b5063d0f9
Code: Bad RIP value.
RSP: 002b:00007f6b4eb6d118 EFLAGS: 00000246 ORIG_RAX: 0000000000000038
RAX: ffffffffffffffda RBX: 00007f6b5075d120 RCX: 00007f6b5063d0f9
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 00007f6b50698ae9 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffead53e6cf R14: 00007f6b4eb6d300 R15: 0000000000022000

Showing all locks held in the system:
2 locks held by kworker/u4:0/7:
1 lock held by khungtaskd/1569:
 #0: 00000000df94f33a (rcu_read_lock){....}, at: debug_show_all_locks+0x53/0x265 kernel/locking/lockdep.c:4441
1 lock held by in:imklog/7904:
 #0: 00000000b26f0dad (&f->f_pos_lock){+.+.}, at: __fdget_pos+0x26f/0x310 fs/file.c:767
1 lock held by agetty/8037:

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

NMI backtrace for cpu 1
CPU: 1 PID: 1569 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
CPU: 0 PID: 31613 Comm: syz-executor.5 Not tainted 4.19.211-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/16/2023
RIP: 0010:check_memory_region+0xb4/0x170 mm/kasan/kasan.c:268
Code: d0 74 7b 48 83 38 00 74 f1 48 8d 50 08 eb 09 48 83 c0 01 48 39 d0 74 0e 80 38 00 74 f2 48 85 c0 0f 85 9c 00 00 00 5b 5d 41 5c <c3> 48 85 d2 74 f6 48 01 ea eb 09 48 83 c0 01 48 39 d0 74 e8 80 38
RSP: 0018:ffff8880ba007cc0 EFLAGS: 00000046
RAX: fffffbfff1a84bf2 RBX: 00000000000b63c0 RCX: ffffffff814bdebb
RDX: fffffbfff1a84bf2 RSI: 0000000000000004 RDI: ffffffff8d425f88
RBP: ffffffff8d425f88 R08: 0000000000000001 R09: fffffbfff1a84bf1
R10: ffffffff8d425f8b R11: ffffffff8c66501b R12: ffffffff8d425f90
R13: ffffffff8d425f98 R14: ffff888050e40218 R15: ffffffff8d425f88
FS:  000055555736d400(0000) GS:ffff8880ba000000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000001b3095b000 CR3: 00000000b4a24000 CR4: 00000000003406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <IRQ>
 atomic_cmpxchg include/asm-generic/atomic-instrumented.h:57 [inline]
 queued_spin_lock include/asm-generic/qspinlock.h:85 [inline]
 do_raw_spin_lock+0xcb/0x220 kernel/locking/spinlock_debug.c:113
 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:117 [inline]
 _raw_spin_lock_irqsave+0x94/0xc0 kernel/locking/spinlock.c:152
 debug_object_deactivate lib/debugobjects.c:540 [inline]
 debug_object_deactivate+0xfc/0x2e0 lib/debugobjects.c:529
 debug_hrtimer_deactivate kernel/time/hrtimer.c:421 [inline]
 debug_deactivate kernel/time/hrtimer.c:471 [inline]
 __run_hrtimer kernel/time/hrtimer.c:1435 [inline]
 __hrtimer_run_queues+0x1bc/0xe60 kernel/time/hrtimer.c:1527
 hrtimer_interrupt+0x326/0x9e0 kernel/time/hrtimer.c:1585
 local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1071 [inline]
 smp_apic_timer_interrupt+0x10c/0x550 arch/x86/kernel/apic/apic.c:1096
 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:894
 </IRQ>
RIP: 0010:__read_once_size include/linux/compiler.h:263 [inline]
RIP: 0010:csd_lock_wait kernel/smp.c:108 [inline]
RIP: 0010:smp_call_function_single+0x1db/0x420 kernel/smp.c:302
Code: 00 e8 09 04 0a 00 48 8b 4c 24 08 48 8b 54 24 10 48 8d 74 24 40 8b 7c 24 1c e8 a1 f9 ff ff 41 89 c5 eb 07 e8 e7 03 0a 00 f3 90 <44> 8b 64 24 58 31 ff 41 83 e4 01 44 89 e6 e8 42 05 0a 00 45 85 e4
RSP: 0018:ffff88804a27fa60 EFLAGS: 00000293 ORIG_RAX: ffffffffffffff13
RAX: ffff88809a5b85c0 RBX: 1ffff1100944ff50 RCX: ffffffff8158819e
RDX: 0000000000000000 RSI: ffffffff81588189 RDI: 0000000000000005
RBP: ffff88804a27fb30 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000005 R11: 0000000000000000 R12: 0000000000000001
R13: 0000000000000000 R14: 0000000000000001 R15: ffff88809f7701bc
 task_function_call+0xe0/0x170 kernel/events/core.c:115
 event_function_call+0x228/0x430 kernel/events/core.c:283
 perf_remove_from_context+0x9b/0x1c0 kernel/events/core.c:2113
 perf_event_release_kernel+0x2f5/0xcd0 kernel/events/core.c:4662
 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:0x7f29855effab
Code: 0f 05 48 3d 00 f0 ff ff 77 45 c3 0f 1f 40 00 48 83 ec 18 89 7c 24 0c e8 63 fc ff ff 8b 7c 24 0c 41 89 c0 b8 03 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 35 44 89 c7 89 44 24 0c e8 a1 fc ff ff 8b 44
RSP: 002b:00007ffc2cc43400 EFLAGS: 00000293 ORIG_RAX: 0000000000000003
RAX: 0000000000000000 RBX: 0000000000000005 RCX: 00007f29855effab
RDX: 0000001b30920000 RSI: 00007f2984fb2000 RDI: 0000000000000004
RBP: 00007f298575f980 R08: 0000000000000000 R09: 000000003253460c
R10: 001c1b27bdb4b5f8 R11: 0000000000000293 R12: 0000000000170ced
R13: 00007ffc2cc43500 R14: 00007ffc2cc43520 R15: 0000000000000032

Crashes (4):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/02/28 23:56 linux-4.19.y 3f8a27f9e27b 95aee97a .config console log report info [disk image] [vmlinux] ci2-linux-4-19 INFO: task hung in perf_event_free_task
2022/12/19 09:51 linux-4.19.y 3f8a27f9e27b 05494336 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 INFO: task hung in perf_event_free_task
2022/10/11 09:42 linux-4.19.y 3f8a27f9e27b 5bcf0c31 .config console log report info [disk image] [vmlinux] ci2-linux-4-19 INFO: task hung in perf_event_free_task
2022/09/12 12:14 linux-4.19.y 3f8a27f9e27b 356d8217 .config console log report info ci2-linux-4-19 INFO: task hung in perf_event_free_task
* Struck through repros no longer work on HEAD.