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: 141d, last: 43d
similar bugs (5):
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 273d 419d 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 629d 701d 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 19d 1286d 0/24 upstream: reported C repro on 2019/07/24 19:18
linux-4.19 INFO: task hung in perf_event_free_task 5 843d 1239d 0/1 auto-closed as invalid on 2021/02/06 21:15
upstream INFO: task can't die in perf_event_free_task syz unreliable 6 103d 803d 0/24 upstream: reported syz repro on 2020/11/19 15:42

Sample crash report:
INFO: task syz-executor.2:10417 blocked for more than 140 seconds.
      Not tainted 4.19.211-syzkaller #0
caif:caif_disconnect_client(): nothing to disconnect
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
syz-executor.2  D27392 10417   1806 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:0x7faff085f0d9
Code: Bad RIP value.
RSP: 002b:00007fafeed8f118 EFLAGS: 00000246 ORIG_RAX: 0000000000000038
RAX: ffffffffffffffda RBX: 00007faff097f120 RCX: 00007faff085f0d9
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 00007faff08baae9 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fff10f3761f R14: 00007fafeed8f300 R15: 0000000000022000

Showing all locks held in the system:
1 lock held by khungtaskd/1570:
 #0: 000000007f3a7e72 (rcu_read_lock){....}, at: debug_show_all_locks+0x53/0x265 kernel/locking/lockdep.c:4441
1 lock held by in:imklog/7834:
 #0: 00000000beec3ebe (&f->f_pos_lock){+.+.}, at: __fdget_pos+0x26f/0x310 fs/file.c:767
2 locks held by agetty/8056:
 #0: 000000001d9dbf8a (&tty->ldisc_sem){++++}, at: tty_ldisc_ref_wait+0x22/0x80 drivers/tty/tty_ldisc.c:272
 #1: 0000000065d496b0 (&ldata->atomic_read_lock){+.+.}, at: n_tty_read+0x217/0x1950 drivers/tty/n_tty.c:2154
3 locks held by kworker/u4:9/10902:
 #0: 000000003588462e (&rq->lock){-.-.}, at: rq_lock kernel/sched/sched.h:1826 [inline]
 #0: 000000003588462e (&rq->lock){-.-.}, at: __schedule+0x1f9/0x2040 kernel/sched/core.c:3455
 #1: 00000000eceba13f ((work_completion)(&(&bat_priv->orig_work)->work)){+.+.}, at: process_one_work+0x79c/0x1570 kernel/workqueue.c:2128
 #2: 00000000b1799e04 (&base->lock){-.-.}, at: lock_timer_base+0x55/0x1b0 kernel/time/timer.c:950
2 locks held by kworker/1:0/28573:
 #0: 00000000a81016e3 ((wq_completion)"rcu_gp"){+.+.}, at: process_one_work+0x767/0x1570 kernel/workqueue.c:2124
 #1: 000000007513fe5b ((work_completion)(&rew.rew_work)){+.+.}, at: process_one_work+0x79c/0x1570 kernel/workqueue.c:2128
3 locks held by kworker/1:1/5049:
 #0: 0000000079000e15 ((wq_completion)"events"){+.+.}, at: process_one_work+0x767/0x1570 kernel/workqueue.c:2124
 #1: 00000000c5edc63a (key_gc_work){+.+.}, at: process_one_work+0x79c/0x1570 kernel/workqueue.c:2128
 #2: 00000000efd41e2c (rcu_preempt_state.exp_mutex){+.+.}, at: exp_funnel_lock kernel/rcu/tree_exp.h:297 [inline]
 #2: 00000000efd41e2c (rcu_preempt_state.exp_mutex){+.+.}, at: _synchronize_rcu_expedited+0x4dc/0x6f0 kernel/rcu/tree_exp.h:667
2 locks held by syz-executor.3/18184:
 #0: 00000000f8751ce6 (rtnl_mutex){+.+.}, at: rtnl_lock net/core/rtnetlink.c:77 [inline]
 #0: 00000000f8751ce6 (rtnl_mutex){+.+.}, at: rtnetlink_rcv_msg+0x3fe/0xb80 net/core/rtnetlink.c:4779
 #1: 00000000efd41e2c (rcu_preempt_state.exp_mutex){+.+.}, at: exp_funnel_lock kernel/rcu/tree_exp.h:329 [inline]
 #1: 00000000efd41e2c (rcu_preempt_state.exp_mutex){+.+.}, at: _synchronize_rcu_expedited+0x256/0x6f0 kernel/rcu/tree_exp.h:667

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

NMI backtrace for cpu 1
CPU: 1 PID: 1570 Comm: khungtaskd Not tainted 4.19.211-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
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: 4694 Comm: systemd-journal Not tainted 4.19.211-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/26/2022
RIP: 0010:arch_local_save_flags arch/x86/include/asm/paravirt.h:784 [inline]
RIP: 0010:lockdep_hardirqs_off+0xfe/0x2c0 kernel/locking/lockdep.c:2902
Code: f1 89 48 ba 00 00 00 00 00 fc ff df 48 c1 e8 03 80 3c 10 00 0f 85 9e 01 00 00 48 83 3d 6a 25 a6 08 00 0f 84 8e 01 00 00 9c 58 <0f> 1f 44 00 00 f6 c4 02 0f 85 dc 00 00 00 48 8d bb 50 08 00 00 48
RSP: 0018:ffff8880a08afce0 EFLAGS: 00000086
RAX: 0000000000000086 RBX: ffff8880a08a6600 RCX: 0000000000000000
RDX: dffffc0000000000 RSI: 0000000000000000 RDI: ffff8880a08a6e84
RBP: ffffffff8197fa01 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000005 R11: 0000000000000000 R12: ffff8880a08a6600
R13: 0000000000000002 R14: 0000000000000000 R15: ffff88823b843380
FS:  00007f1b78ea78c0(0000) GS:ffff8880ba000000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f1b76410000 CR3: 00000000a0e6e000 CR4: 00000000003406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 mod_lruvec_page_state include/linux/memcontrol.h:711 [inline]
 kmem_getpages mm/slab.c:1427 [inline]
 cache_grow_begin+0x2b1/0x8a0 mm/slab.c:2682
 cache_alloc_refill+0x273/0x340 mm/slab.c:3049
 ____cache_alloc mm/slab.c:3132 [inline]
 __do_cache_alloc mm/slab.c:3354 [inline]
 slab_alloc mm/slab.c:3389 [inline]
 kmem_cache_alloc+0x346/0x370 mm/slab.c:3557
 getname_flags+0xce/0x590 fs/namei.c:140
 user_path_at_empty+0x2a/0x50 fs/namei.c:2609
 user_path_at include/linux/namei.h:57 [inline]
 do_faccessat+0x248/0x7a0 fs/open.c:397
 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x7f1b781629c7
Code: 83 c4 08 48 3d 01 f0 ff ff 73 01 c3 48 8b 0d c8 d4 2b 00 f7 d8 64 89 01 48 83 c8 ff c3 66 0f 1f 44 00 00 b8 15 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d a1 d4 2b 00 f7 d8 64 89 01 48
RSP: 002b:00007ffc0ea329e8 EFLAGS: 00000246 ORIG_RAX: 0000000000000015
RAX: ffffffffffffffda RBX: 00007ffc0ea35a10 RCX: 00007f1b781629c7
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 000055d8d4d859a3
RBP: 00007ffc0ea32b30 R08: 000055d8d4d7b3e5 R09: 0000000000000018
R10: 0000000000000069 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 000055d8d4ebe8a0 R15: 00007ffc0ea33020

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