syzbot


INFO: task hung in vfs_unlink

Status: auto-obsoleted due to no activity on 2023/08/26 02:49
Reported-by: syzbot+a8267ca8983a737a4570@syzkaller.appspotmail.com
First crash: 347d, last: 336d
Similar bugs (13)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-6.1 INFO: task hung in vfs_unlink (3) 2 18d 30d 0/3 upstream: reported on 2024/03/19 12:40
linux-6.1 INFO: task hung in vfs_unlink (2) 1 147d 147d 0/3 auto-obsoleted due to no activity on 2024/03/02 11:45
linux-4.14 INFO: task hung in vfs_unlink (2) 1 1095d 1095d 0/1 auto-closed as invalid on 2021/08/17 05:41
linux-4.14 INFO: task hung in vfs_unlink 8 1340d 1582d 0/1 auto-closed as invalid on 2020/12/15 00:37
linux-4.19 INFO: task hung in vfs_unlink (4) 1 526d 526d 0/1 auto-obsoleted due to no activity on 2023/03/09 01:26
linux-4.19 INFO: task hung in vfs_unlink (2) 2 1349d 1411d 0/1 auto-closed as invalid on 2020/12/05 18:54
upstream INFO: task hung in vfs_unlink (3) ext4 1 444d 444d 0/26 auto-obsoleted due to no activity on 2023/04/30 04:19
linux-5.15 INFO: task hung in vfs_unlink 29 31d 388d 0/3 upstream: reported on 2023/03/26 16:46
upstream INFO: task hung in vfs_unlink ext4 32 1362d 1639d 0/26 auto-closed as invalid on 2020/11/23 01:14
linux-4.19 INFO: task hung in vfs_unlink 6 1540d 1665d 0/1 auto-closed as invalid on 2020/05/28 17:30
linux-4.19 INFO: task hung in vfs_unlink (3) 1 988d 988d 0/1 auto-closed as invalid on 2021/12/01 23:35
upstream INFO: task hung in vfs_unlink (4) fs 6 183d 343d 0/26 auto-obsoleted due to no activity on 2024/01/16 15:08
upstream INFO: task hung in vfs_unlink (2) fs 1 621d 621d 0/26 auto-closed as invalid on 2022/10/05 08:13

Sample crash report:
INFO: task syz-fuzzer:3571 blocked for more than 143 seconds.
      Not tainted 6.1.29-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-fuzzer      state:D stack:26392 pid:3571  ppid:3538   flags:0x00004000
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5241 [inline]
 __schedule+0x132c/0x4330 kernel/sched/core.c:6554
 schedule+0xbf/0x180 kernel/sched/core.c:6630
 rwsem_down_write_slowpath+0xe93/0x14a0 kernel/locking/rwsem.c:1189
 inode_lock include/linux/fs.h:756 [inline]
 vfs_unlink+0xe0/0x5f0 fs/namei.c:4241
 do_unlinkat+0x49d/0x940 fs/namei.c:4320
 __do_sys_unlinkat fs/namei.c:4363 [inline]
 __se_sys_unlinkat fs/namei.c:4356 [inline]
 __x64_sys_unlinkat+0xca/0xf0 fs/namei.c:4356
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x403ace
RSP: 002b:000000c001f034f8 EFLAGS: 00000206 ORIG_RAX: 0000000000000107
RAX: ffffffffffffffda RBX: 000000000000000d RCX: 0000000000403ace
RDX: 0000000000000000 RSI: 000000c010ed3940 RDI: 000000000000000d
RBP: 000000c001f03538 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000206 R12: 0000000000000194
R13: ffffffffffffffff R14: 000000c0003f11e0 R15: 000000c015922800
 </TASK>

Showing all locks held in the system:
1 lock held by rcu_tasks_kthre/12:
 #0: ffffffff8cf274b0 (rcu_tasks.tasks_gp_mutex){+.+.}-{3:3}, at: rcu_tasks_one_gp+0x29/0xd20 kernel/rcu/tasks.h:510
1 lock held by rcu_tasks_trace/13:
 #0: ffffffff8cf27cb0 (rcu_tasks_trace.tasks_gp_mutex){+.+.}-{3:3}, at: rcu_tasks_one_gp+0x29/0xd20 kernel/rcu/tasks.h:510
1 lock held by khungtaskd/28:
 #0: ffffffff8cf272e0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x0/0x30
1 lock held by syslogd/2982:
 #0: ffff8880b9839dd8 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0xa8/0x140 kernel/sched/core.c:545
2 locks held by getty/3303:
 #0: ffff8880280dd098 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x21/0x70 drivers/tty/tty_ldisc.c:244
 #1: ffffc900031262f0 (&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0x6a7/0x1db0 drivers/tty/n_tty.c:2177
3 locks held by syz-fuzzer/3571:
 #0: ffff88807e92a460 (sb_writers#4){.+.+}-{0:0}, at: mnt_want_write+0x3b/0x80 fs/namespace.c:393
 #1: ffff88803ccf3628 (&type->i_mutex_dir_key#3/1){+.+.}-{3:3}, at: inode_lock_nested include/linux/fs.h:791 [inline]
 #1: ffff88803ccf3628 (&type->i_mutex_dir_key#3/1){+.+.}-{3:3}, at: do_unlinkat+0x260/0x940 fs/namei.c:4303
 #2: ffff888039a32218 (&sb->s_type->i_mutex_key#8){++++}-{3:3}, at: inode_lock include/linux/fs.h:756 [inline]
 #2: ffff888039a32218 (&sb->s_type->i_mutex_key#8){++++}-{3:3}, at: vfs_unlink+0xe0/0x5f0 fs/namei.c:4241
2 locks held by kworker/u4:3/29481:
3 locks held by syz-executor.1/1991:

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

NMI backtrace for cpu 1
CPU: 1 PID: 28 Comm: khungtaskd Not tainted 6.1.29-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/28/2023
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+0x1b0/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+0xf18/0xf60 kernel/hung_task.c:377
 kthread+0x26e/0x300 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306
 </TASK>
Sending NMI from CPU 1 to CPUs 0:
NMI backtrace for cpu 0
CPU: 0 PID: 29481 Comm: kworker/u4:3 Not tainted 6.1.29-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/28/2023
Workqueue: events_unbound toggle_allocation_gate
RIP: 0010:arch_static_branch arch/x86/include/asm/jump_label.h:27 [inline]
RIP: 0010:static_key_false include/linux/jump_label.h:207 [inline]
RIP: 0010:native_write_msr arch/x86/include/asm/msr.h:147 [inline]
RIP: 0010:wrmsrl arch/x86/include/asm/msr.h:262 [inline]
RIP: 0010:native_x2apic_icr_write arch/x86/include/asm/apic.h:238 [inline]
RIP: 0010:__x2apic_send_IPI_dest arch/x86/kernel/apic/x2apic_phys.c:123 [inline]
RIP: 0010:x2apic_send_IPI+0x77/0xd0 arch/x86/kernel/apic/x2apic_phys.c:48
Code: 48 c1 e8 03 42 0f b6 04 38 84 c0 75 26 0f b7 13 0f ae f0 0f ae e8 41 83 fe 02 b8 00 04 00 00 41 0f 45 c6 b9 30 08 00 00 0f 30 <66> 90 5b 41 5e 41 5f 5d c3 89 d9 80 e1 07 fe c1 38 c1 7c cf 48 89
RSP: 0018:ffffc9000534f4b8 EFLAGS: 00000206
RAX: 00000000000000fb RBX: ffff8880b99219a8 RCX: 0000000000000830
RDX: 0000000000000001 RSI: 00000000000000fb RDI: 0000000000000001
RBP: ffffffff8c993848 R08: ffffffff817eb81d R09: ffffed10173075d3
R10: 0000000000000000 R11: dffffc0000000001 R12: dffffc0000000000
R13: 1ffff92000a69ea0 R14: 00000000000000fb R15: dffffc0000000000
FS:  0000000000000000(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f4aa4e68c08 CR3: 000000000cc8e000 CR4: 00000000003506f0
DR0: 00000000ffff070c DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 arch_send_call_function_single_ipi arch/x86/include/asm/smp.h:109 [inline]
 send_call_function_single_ipi+0x188/0x260 kernel/sched/core.c:3782
 smp_call_function_many_cond+0x1ba3/0x33d0 kernel/smp.c:967
 on_each_cpu_cond_mask+0x3b/0x80 kernel/smp.c:1155
 on_each_cpu include/linux/smp.h:71 [inline]
 text_poke_sync arch/x86/kernel/alternative.c:1316 [inline]
 text_poke_bp_batch+0x5f9/0x940 arch/x86/kernel/alternative.c:1578
 text_poke_flush arch/x86/kernel/alternative.c:1707 [inline]
 text_poke_finish+0x16/0x30 arch/x86/kernel/alternative.c:1714
 arch_jump_label_transform_apply+0x13/0x20 arch/x86/kernel/jump_label.c:146
 static_key_enable_cpuslocked+0x12e/0x250 kernel/jump_label.c:177
 static_key_enable+0x16/0x20 kernel/jump_label.c:190
 toggle_allocation_gate+0xbf/0x480 mm/kfence/core.c:804
 process_one_work+0x8aa/0x11f0 kernel/workqueue.c:2289
 worker_thread+0xa5f/0x1210 kernel/workqueue.c:2436
 kthread+0x26e/0x300 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306
 </TASK>

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/05/18 02:49 linux-6.1.y fa74641fb6b9 3bb7af1d .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan INFO: task hung in vfs_unlink
2023/05/06 22:31 linux-6.1.y ca48fc16c493 90c93c40 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-1-kasan INFO: task hung in vfs_unlink
* Struck through repros no longer work on HEAD.