syzbot


INFO: task hung in _free_event

Status: upstream: reported C repro on 2024/11/18 06:32
Subsystems: perf
[Documentation on labels]
Reported-by: syzbot+3c4321e10eea460eb606@syzkaller.appspotmail.com
First crash: 134d, last: 107d
Discussions (5)
Title Replies (including bot) Last reply
[PATCH] perf: Fix hang while freeing sigtrap event 4 (4) 2025/03/18 08:44
[PATCH] task_work: Consume only item at a time while invoking the callbacks. 1 (1) 2025/02/21 17:05
[syzbot] Monthly perf report (Dec 2024) 0 (1) 2024/12/23 15:44
[syzbot] Monthly perf report (Nov 2024) 0 (1) 2024/11/21 13:13
[syzbot] [perf?] INFO: task hung in _free_event 0 (1) 2024/11/18 06:32
Similar bugs (4)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
android-414 INFO: task hung in _free_event 8 2100d 2167d 0/1 auto-closed as invalid on 2019/10/26 01:49
linux-4.19 INFO: task hung in _free_event 1 1784d 1784d 0/1 auto-closed as invalid on 2020/09/05 20:32
linux-6.1 INFO: task hung in _free_event origin:lts-only C inconclusive 158 12h37m 207d 0/3 upstream: reported C repro on 2024/09/01 12:31
linux-4.14 INFO: task hung in _free_event 1 1657d 1657d 0/1 auto-closed as invalid on 2021/01/10 07:54
Last patch testing requests (3)
Created Duration User Patch Repo Result
2025/02/06 07:05 21m retest repro upstream OK log
2024/12/25 06:25 19m retest repro upstream OK log
2024/11/28 06:32 19m retest repro upstream report log

Sample crash report:
INFO: task syz-executor217:5320 blocked for more than 143 seconds.
      Not tainted 6.13.0-rc2-syzkaller-00031-gf92f4749861b #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor217 state:D stack:22712 pid:5320  tgid:5320  ppid:5319   flags:0x00004002
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5369 [inline]
 __schedule+0x1850/0x4c30 kernel/sched/core.c:6756
 __schedule_loop kernel/sched/core.c:6833 [inline]
 schedule+0x14b/0x320 kernel/sched/core.c:6848
 perf_pending_task_sync kernel/events/core.c:5312 [inline]
 _free_event+0x178/0xf60 kernel/events/core.c:5319
 put_event kernel/events/core.c:5447 [inline]
 perf_event_release_kernel+0x7c1/0x850 kernel/events/core.c:5572
 perf_release+0x38/0x40 kernel/events/core.c:5582
 __fput+0x23c/0xa50 fs/file_table.c:450
 task_work_run+0x24f/0x310 kernel/task_work.c:239
 exit_task_work include/linux/task_work.h:43 [inline]
 do_exit+0xa2f/0x28e0 kernel/exit.c:938
 do_group_exit+0x207/0x2c0 kernel/exit.c:1087
 get_signal+0x16b2/0x1750 kernel/signal.c:3017
 arch_do_signal_or_restart+0x96/0x860 arch/x86/kernel/signal.c:337
 exit_to_user_mode_loop kernel/entry/common.c:111 [inline]
 exit_to_user_mode_prepare include/linux/entry-common.h:329 [inline]
 __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline]
 syscall_exit_to_user_mode+0xce/0x340 kernel/entry/common.c:218
 do_syscall_64+0x100/0x230 arch/x86/entry/common.c:89
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fa7cd871af9
RSP: 002b:00007ffcd1d137d8 EFLAGS: 00000286 ORIG_RAX: 000000000000012a
RAX: 0000000000000003 RBX: 0000000000000000 RCX: 00007fa7cd871af9
RDX: 00000000ffffffff RSI: 0000000000000000 RDI: 0000000020000000
RBP: 00007fa7cd8e45f0 R08: 0000000000000003 R09: 0000000000000006
R10: 00000000ffffffff R11: 0000000000000286 R12: 0000000000000001
R13: 431bde82d7b634db R14: 0000000000000001 R15: 0000000000000001
 </TASK>

Showing all locks held in the system:
1 lock held by khungtaskd/25:
 #0: ffffffff8e937ae0 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:337 [inline]
 #0: ffffffff8e937ae0 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:849 [inline]
 #0: ffffffff8e937ae0 (rcu_read_lock){....}-{1:3}, at: debug_show_all_locks+0x55/0x2a0 kernel/locking/lockdep.c:6744
2 locks held by getty/5105:
 #0: ffff88800027f0a0 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x25/0x70 drivers/tty/tty_ldisc.c:243
 #1: ffffc9000019b2f0 (&ldata->atomic_read_lock){+.+.}-{4:4}, at: n_tty_read+0x6a6/0x1e00 drivers/tty/n_tty.c:2211

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

NMI backtrace for cpu 0
CPU: 0 UID: 0 PID: 25 Comm: khungtaskd Not tainted 6.13.0-rc2-syzkaller-00031-gf92f4749861b #0
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:94 [inline]
 dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120
 nmi_cpu_backtrace+0x49c/0x4d0 lib/nmi_backtrace.c:113
 nmi_trigger_cpumask_backtrace+0x198/0x320 lib/nmi_backtrace.c:62
 trigger_all_cpu_backtrace include/linux/nmi.h:162 [inline]
 check_hung_uninterruptible_tasks kernel/hung_task.c:234 [inline]
 watchdog+0xff6/0x1040 kernel/hung_task.c:397
 kthread+0x2f0/0x390 kernel/kthread.c:389
 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
 </TASK>

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/12/11 06:00 upstream f92f4749861b cfc402b4 .config console log report syz / log C [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root INFO: task hung in _free_event
2024/11/14 06:27 upstream 0a9b9d17f3a7 a8c99394 .config console log report syz / log C [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root INFO: task hung in _free_event
* Struck through repros no longer work on HEAD.