syzbot


INFO: task hung in _free_event

Status: upstream: reported C repro on 2024/09/01 12:31
Bug presence: origin:lts-only
[Documentation on labels]
Reported-by: syzbot+3feacdb0b5d7164173e8@syzkaller.appspotmail.com
First crash: 81d, last: 9h45m
Bug presence (2)
Date Name Commit Repro Result
2024/11/17 linux-6.1.y (ToT) 59d7b1a7104a C [report] INFO: task hung in _free_event
2024/11/17 upstream (ToT) 4a5df3796467 C Didn't crash
Similar bugs (4)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream INFO: task hung in _free_event perf C 1 7d10h 3d10h 0/28 upstream: reported C repro on 2024/11/18 06:32
android-414 INFO: task hung in _free_event 8 1973d 2041d 0/1 auto-closed as invalid on 2019/10/26 01:49
linux-4.19 INFO: task hung in _free_event 1 1657d 1657d 0/1 auto-closed as invalid on 2020/09/05 20:32
linux-4.14 INFO: task hung in _free_event 1 1531d 1531d 0/1 auto-closed as invalid on 2021/01/10 07:54

Sample crash report:
INFO: task syz-executor702:4280 blocked for more than 143 seconds.
      Not tainted 6.1.117-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor702 state:D stack:24200 pid:4280  ppid:4265   flags:0x00004002
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5241 [inline]
 __schedule+0x143f/0x4570 kernel/sched/core.c:6558
 schedule+0xbf/0x180 kernel/sched/core.c:6634
 perf_pending_task_sync kernel/events/core.c:5033 [inline]
 _free_event+0x169/0x1090 kernel/events/core.c:5039
 put_event kernel/events/core.c:5164 [inline]
 perf_event_release_kernel+0x873/0x900 kernel/events/core.c:5289
 perf_release+0x37/0x40 kernel/events/core.c:5299
 __fput+0x3f6/0x8d0 fs/file_table.c:320
 task_work_run+0x246/0x300 kernel/task_work.c:203
 exit_task_work include/linux/task_work.h:39 [inline]
 do_exit+0xa73/0x26a0 kernel/exit.c:871
 do_group_exit+0x202/0x2b0 kernel/exit.c:1021
 get_signal+0x16f7/0x17d0 kernel/signal.c:2871
 arch_do_signal_or_restart+0xb0/0x1a10 arch/x86/kernel/signal.c:871
 exit_to_user_mode_loop+0x6a/0x100 kernel/entry/common.c:174
 exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:210
 __syscall_exit_to_user_mode_work kernel/entry/common.c:292 [inline]
 syscall_exit_to_user_mode+0x60/0x270 kernel/entry/common.c:303
 do_syscall_64+0x47/0xb0 arch/x86/entry/common.c:87
 entry_SYSCALL_64_after_hwframe+0x68/0xd2
RIP: 0033:0x7f562559d089
RSP: 002b:00007ffce35770e8 EFLAGS: 00000246 ORIG_RAX: 000000000000012a
RAX: 0000000000000003 RBX: 0000000000000003 RCX: 00007f562559d089
RDX: 00000000ffffffff RSI: 0000000000000000 RDI: 0000000020000000
RBP: 0000000000000000 R08: 0000000000000000 R09: 00007f56255f41fa
R10: 00000000ffffffff R11: 0000000000000246 R12: 00007ffce357710c
R13: 00007ffce3577140 R14: 00007ffce3577120 R15: 0000000000000002
 </TASK>

Showing all locks held in the system:
1 lock held by rcu_tasks_kthre/12:
 #0: ffffffff8d32b110 (rcu_tasks.tasks_gp_mutex){+.+.}-{3:3}, at: rcu_tasks_one_gp+0x29/0xe30 kernel/rcu/tasks.h:517
1 lock held by rcu_tasks_trace/13:
 #0: ffffffff8d32b910 (rcu_tasks_trace.tasks_gp_mutex){+.+.}-{3:3}, at: rcu_tasks_one_gp+0x29/0xe30 kernel/rcu/tasks.h:517
1 lock held by khungtaskd/27:
 #0: ffffffff8d32af40 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:350 [inline]
 #0: ffffffff8d32af40 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:791 [inline]
 #0: ffffffff8d32af40 (rcu_read_lock){....}-{1:2}, at: debug_show_all_locks+0x51/0x290 kernel/locking/lockdep.c:6510
1 lock held by klogd/3612:
 #0: ffff8880b8e3a9d8 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x26/0x140 kernel/sched/core.c:537
2 locks held by getty/4002:
 #0: ffff88814d048098 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x21/0x70 drivers/tty/tty_ldisc.c:244
 #1: ffffc900032462f0 (&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0x6a7/0x1db0 drivers/tty/n_tty.c:2198

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

NMI backtrace for cpu 1
CPU: 1 PID: 27 Comm: khungtaskd Not tainted 6.1.117-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/30/2024
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106
 nmi_cpu_backtrace+0x4e1/0x560 lib/nmi_backtrace.c:111
 nmi_trigger_cpumask_backtrace+0x1ae/0x3f0 lib/nmi_backtrace.c:62
 trigger_all_cpu_backtrace include/linux/nmi.h:148 [inline]
 check_hung_uninterruptible_tasks kernel/hung_task.c:220 [inline]
 watchdog+0xf88/0xfd0 kernel/hung_task.c:377
 kthread+0x28d/0x320 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
 </TASK>
Sending NMI from CPU 1 to CPUs 0:
NMI backtrace for cpu 0
CPU: 0 PID: 11 Comm: kworker/u4:1 Not tainted 6.1.117-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/30/2024
Workqueue: events_unbound toggle_allocation_gate
RIP: 0010:csd_lock_wait kernel/smp.c:424 [inline]
RIP: 0010:smp_call_function_many_cond+0x1fae/0x3460 kernel/smp.c:998
Code: 2f 44 89 ee 83 e6 01 31 ff e8 ae 43 0b 00 41 83 e5 01 49 bd 00 00 00 00 00 fc ff df 75 0a e8 39 40 0b 00 e9 1b ff ff ff f3 90 <42> 0f b6 04 2b 84 c0 75 14 41 f7 07 01 00 00 00 0f 84 fe fe ff ff
RSP: 0018:ffffc900001075a0 EFLAGS: 00000293
RAX: ffffffff817f4bd9 RBX: 1ffff110171e81b1 RCX: ffff888017f53b80
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000000
RBP: ffffc90000107980 R08: ffffffff817f4ba2 R09: fffffbfff224624d
R10: 0000000000000000 R11: dffffc0000000001 R12: 0000000800000000
R13: dffffc0000000000 R14: 0000000000000001 R15: ffff8880b8f40d88
FS:  0000000000000000(0000) GS:ffff8880b8e00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00005640abe2d600 CR3: 000000000d08e000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <NMI>
 </NMI>
 <TASK>
 on_each_cpu_cond_mask+0x3b/0x80 kernel/smp.c:1166
 text_poke_bp_batch+0x860/0x940
 text_poke_flush arch/x86/kernel/alternative.c:1725 [inline]
 text_poke_finish+0x16/0x30 arch/x86/kernel/alternative.c:1732
 arch_jump_label_transform_apply+0x13/0x20 arch/x86/kernel/jump_label.c:146
 static_key_enable_cpuslocked+0x12e/0x250 kernel/jump_label.c:207
 static_key_enable+0x16/0x20 kernel/jump_label.c:220
 toggle_allocation_gate+0xbf/0x480 mm/kfence/core.c:804
 process_one_work+0x8a9/0x11d0 kernel/workqueue.c:2292
 worker_thread+0xa47/0x1200 kernel/workqueue.c:2439
 kthread+0x28d/0x320 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295
 </TASK>
INFO: NMI handler (nmi_cpu_backtrace_handler) took too long to run: 1.247 msecs

Crashes (39):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/11/16 15:38 linux-6.1.y 59d7b1a7104a cfe3a04a .config console log report syz / log C [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf INFO: task hung in _free_event
2024/11/21 06:49 linux-6.1.y b67dc5c9ade9 4b25d554 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf INFO: task hung in _free_event
2024/11/20 18:05 linux-6.1.y b67dc5c9ade9 4fca1650 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf INFO: task hung in _free_event
2024/11/19 07:28 linux-6.1.y b67dc5c9ade9 571351cb .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf INFO: task hung in _free_event
2024/11/19 07:28 linux-6.1.y b67dc5c9ade9 571351cb .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf INFO: task hung in _free_event
2024/11/16 05:58 linux-6.1.y 59d7b1a7104a cfe3a04a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf INFO: task hung in _free_event
2024/11/16 04:47 linux-6.1.y 59d7b1a7104a cfe3a04a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf INFO: task hung in _free_event
2024/10/24 09:14 linux-6.1.y 7ec6f9fa3d97 15fa2979 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf INFO: task hung in _free_event
2024/10/24 08:15 linux-6.1.y 7ec6f9fa3d97 15fa2979 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf INFO: task hung in _free_event
2024/10/22 18:34 linux-6.1.y 7ec6f9fa3d97 a93682b3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf INFO: task hung in _free_event
2024/10/18 23:05 linux-6.1.y 54d90d17e8ce cd6fc0a3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf INFO: task hung in _free_event
2024/10/17 13:26 linux-6.1.y aa4cd140bba5 666f77ed .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf INFO: task hung in _free_event
2024/10/16 20:58 linux-6.1.y aa4cd140bba5 666f77ed .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf INFO: task hung in _free_event
2024/10/16 17:01 linux-6.1.y aa4cd140bba5 bde2d81c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf INFO: task hung in _free_event
2024/10/16 03:57 linux-6.1.y aa4cd140bba5 bde2d81c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf INFO: task hung in _free_event
2024/10/16 03:34 linux-6.1.y aa4cd140bba5 bde2d81c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf INFO: task hung in _free_event
2024/10/16 03:23 linux-6.1.y aa4cd140bba5 bde2d81c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf INFO: task hung in _free_event
2024/10/16 03:17 linux-6.1.y aa4cd140bba5 bde2d81c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf INFO: task hung in _free_event
2024/10/15 15:23 linux-6.1.y aa4cd140bba5 7eb57b4a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf INFO: task hung in _free_event
2024/10/11 08:10 linux-6.1.y aa4cd140bba5 cd942402 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf INFO: task hung in _free_event
2024/10/11 03:47 linux-6.1.y aa4cd140bba5 8fbfc0c8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf INFO: task hung in _free_event
2024/10/06 12:31 linux-6.1.y aa4cd140bba5 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf INFO: task hung in _free_event
2024/10/04 21:54 linux-6.1.y aa4cd140bba5 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf INFO: task hung in _free_event
2024/10/04 21:45 linux-6.1.y aa4cd140bba5 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf INFO: task hung in _free_event
2024/10/04 07:41 linux-6.1.y aa4cd140bba5 d7906eff .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf INFO: task hung in _free_event
2024/10/01 17:56 linux-6.1.y aa4cd140bba5 ea2b66a6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf INFO: task hung in _free_event
2024/09/26 22:49 linux-6.1.y e526b12bf916 9314348a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf INFO: task hung in _free_event
2024/09/25 14:51 linux-6.1.y e526b12bf916 349a68c4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf INFO: task hung in _free_event
2024/09/25 09:03 linux-6.1.y e526b12bf916 349a68c4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf INFO: task hung in _free_event
2024/09/22 20:36 linux-6.1.y e526b12bf916 6f888b75 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf INFO: task hung in _free_event
2024/09/19 19:48 linux-6.1.y e526b12bf916 6f888b75 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf INFO: task hung in _free_event
2024/09/16 16:19 linux-6.1.y 5f55cad62cc9 c673ca06 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf INFO: task hung in _free_event
2024/09/15 00:44 linux-6.1.y 5f55cad62cc9 08d8a733 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf INFO: task hung in _free_event
2024/09/11 22:42 linux-6.1.y 5ca5b389fddf d94c83d8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf INFO: task hung in _free_event
2024/09/11 15:49 linux-6.1.y 5ca5b389fddf 8ab55d0e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf INFO: task hung in _free_event
2024/09/10 03:38 linux-6.1.y 5ca5b389fddf 784df80e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf INFO: task hung in _free_event
2024/09/06 16:38 linux-6.1.y 699506173494 9750182a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf INFO: task hung in _free_event
2024/09/03 07:07 linux-6.1.y 311d8503ef9f 8045124c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf INFO: task hung in _free_event
2024/09/01 12:30 linux-6.1.y 311d8503ef9f 1eda0d14 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan-perf INFO: task hung in _free_event
* Struck through repros no longer work on HEAD.