syzbot


INFO: task hung in lock_two_directories (4)

Status: upstream: reported C repro on 2025/05/23 03:51
Subsystems: ext4
[Documentation on labels]
Reported-by: syzbot+1bfacdf603474cfa86bd@syzkaller.appspotmail.com
First crash: 57d, last: 2d16h
Cause bisection: introduced by (bisect log) :
commit e63d86b8b76437815fc040e8e65da257c28ba922
Author: Roberto Sassu <roberto.sassu@huawei.com>
Date: Thu Nov 16 09:01:24 2023 +0000

  smack: Initialize the in-memory inode in smack_inode_init_security()

Crash: INFO: rcu detected stall in corrupted (log)
Repro: C syz .config
  
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [ext4?] INFO: task hung in lock_two_directories (4) 0 (1) 2025/05/23 03:51
Similar bugs (3)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream INFO: task hung in lock_two_directories ext4 overlayfs 1 7 756d 801d 0/29 auto-obsoleted due to no activity on 2023/09/18 16:57
upstream INFO: task hung in lock_two_directories (2) kernfs 1 10 302d 450d 0/29 auto-obsoleted due to no activity on 2024/12/15 06:45
upstream INFO: task hung in lock_two_directories (3) fs 1 1 202d 202d 0/29 auto-obsoleted due to no activity on 2025/03/25 10:32
Last patch testing requests (1)
Created Duration User Patch Repo Result
2025/06/02 05:33 27m retest repro upstream report log
Fix bisection attempts (1)
Created Duration User Patch Repo Result
2025/07/02 12:01 1h37m bisect fix upstream OK (0) job log log

Sample crash report:
INFO: task syz-executor299:5864 blocked for more than 143 seconds.
      Not tainted 6.16.0-rc5-syzkaller-00266-g3f31a806a62e #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor299 state:D stack:24264 pid:5864  tgid:5864  ppid:5863   task_flags:0x400140 flags:0x00004006
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5397 [inline]
 __schedule+0x16a2/0x4cb0 kernel/sched/core.c:6786
 __schedule_loop kernel/sched/core.c:6864 [inline]
 schedule+0x165/0x360 kernel/sched/core.c:6879
 schedule_preempt_disabled+0x13/0x30 kernel/sched/core.c:6936
 rwsem_down_write_slowpath+0xbec/0x1030 kernel/locking/rwsem.c:1176
 __down_write_common kernel/locking/rwsem.c:1304 [inline]
 __down_write kernel/locking/rwsem.c:1313 [inline]
 down_write_nested+0x1b5/0x200 kernel/locking/rwsem.c:1694
 inode_lock_nested include/linux/fs.h:914 [inline]
 lock_two_directories+0x16b/0x220 fs/namei.c:3252
 lock_rename fs/namei.c:3286 [inline]
 do_renameat2+0x38a/0xc50 fs/namei.c:5232
 __do_sys_renameat2 fs/namei.c:5320 [inline]
 __se_sys_renameat2 fs/namei.c:5317 [inline]
 __x64_sys_renameat2+0xce/0xe0 fs/namei.c:5317
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fea68143c59
RSP: 002b:00007ffed0cbbbd8 EFLAGS: 00000246 ORIG_RAX: 000000000000013c
RAX: ffffffffffffffda RBX: 0000200000000140 RCX: 00007fea68143c59
RDX: 00000000ffffff9c RSI: 0000200000000580 RDI: 00000000ffffff9c
RBP: 0000200000000080 R08: 0000000000000000 R09: 00005555876944c0
R10: 00002000000005c0 R11: 0000000000000246 R12: 0031656c69662f2e
R13: 00007ffed0cbbe28 R14: 431bde82d7b634db R15: 00007fea6818c03b
 </TASK>

Showing all locks held in the system:
1 lock held by khungtaskd/31:
 #0: ffffffff8e13f0a0 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:331 [inline]
 #0: ffffffff8e13f0a0 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:841 [inline]
 #0: ffffffff8e13f0a0 (rcu_read_lock){....}-{1:3}, at: debug_show_all_locks+0x2e/0x180 kernel/locking/lockdep.c:6770
2 locks held by getty/5606:
 #0: ffff8880312ad0a0 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x25/0x70 drivers/tty/tty_ldisc.c:243
 #1: ffffc9000333b2f0 (&ldata->atomic_read_lock){+.+.}-{4:4}, at: n_tty_read+0x43e/0x1400 drivers/tty/n_tty.c:2222
4 locks held by syz-executor299/5864:
 #0: ffff888034eb8428 (sb_writers#8){.+.+}-{0:0}, at: mnt_want_write+0x41/0x90 fs/namespace.c:557
 #1: ffff888034eb8738 (&type->s_vfs_rename_key){+.+.}-{4:4}, at: lock_rename fs/namei.c:3285 [inline]
 #1: ffff888034eb8738 (&type->s_vfs_rename_key){+.+.}-{4:4}, at: do_renameat2+0x37f/0xc50 fs/namei.c:5232
 #2: ffff88807ddc9c60 (&sb->s_type->i_mutex_key#14/1){+.+.}-{4:4}, at: inode_lock_nested include/linux/fs.h:914 [inline]
 #2: ffff88807ddc9c60 (&sb->s_type->i_mutex_key#14/1){+.+.}-{4:4}, at: lock_two_directories+0x141/0x220 fs/namei.c:3251
 #3: ffff88807ddc9c60 (&sb->s_type->i_mutex_key#15/5){+.+.}-{4:4}, at: inode_lock_nested include/linux/fs.h:914 [inline]
 #3: ffff88807ddc9c60 (&sb->s_type->i_mutex_key#15/5){+.+.}-{4:4}, at: lock_two_directories+0x16b/0x220 fs/namei.c:3252

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

NMI backtrace for cpu 0
CPU: 0 UID: 0 PID: 31 Comm: khungtaskd Not tainted 6.16.0-rc5-syzkaller-00266-g3f31a806a62e #0 PREEMPT(full) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
Call Trace:
 <TASK>
 dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120
 nmi_cpu_backtrace+0x39e/0x3d0 lib/nmi_backtrace.c:113
 nmi_trigger_cpumask_backtrace+0x17a/0x300 lib/nmi_backtrace.c:62
 trigger_all_cpu_backtrace include/linux/nmi.h:158 [inline]
 check_hung_uninterruptible_tasks kernel/hung_task.c:307 [inline]
 watchdog+0xfee/0x1030 kernel/hung_task.c:470
 kthread+0x711/0x8a0 kernel/kthread.c:464
 ret_from_fork+0x3fc/0x770 arch/x86/kernel/process.c:148
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
 </TASK>
Sending NMI from CPU 0 to CPUs 1:
NMI backtrace for cpu 1
CPU: 1 UID: 0 PID: 0 Comm: swapper/1 Not tainted 6.16.0-rc5-syzkaller-00266-g3f31a806a62e #0 PREEMPT(full) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
RIP: 0010:pv_native_safe_halt+0x13/0x20 arch/x86/kernel/paravirt.c:82
Code: 93 de 02 00 cc cc cc 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 f3 0f 1e fa 66 90 0f 00 2d 73 fd 1f 00 f3 0f 1e fa fb f4 <c3> cc cc cc cc cc cc cc cc cc cc cc cc 90 90 90 90 90 90 90 90 90
RSP: 0018:ffffc90000197de0 EFLAGS: 000002c2
RAX: 47f02294845fa500 RBX: ffffffff81976938 RCX: 47f02294845fa500
RDX: 0000000000000001 RSI: ffffffff8d985441 RDI: ffffffff8be1ca00
RBP: ffffc90000197f20 R08: ffff8880b8732f5b R09: 1ffff110170e65eb
R10: dffffc0000000000 R11: ffffed10170e65ec R12: ffffffff8fa0cbf0
R13: 0000000000000001 R14: 0000000000000001 R15: 1ffff11003a57b40
FS:  0000000000000000(0000) GS:ffff888125d4f000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055cb5032f660 CR3: 000000000df38000 CR4: 00000000003526f0
Call Trace:
 <TASK>
 arch_safe_halt arch/x86/include/asm/paravirt.h:107 [inline]
 default_idle+0x13/0x20 arch/x86/kernel/process.c:749
 default_idle_call+0x74/0xb0 kernel/sched/idle.c:117
 cpuidle_idle_call kernel/sched/idle.c:185 [inline]
 do_idle+0x1e8/0x510 kernel/sched/idle.c:325
 cpu_startup_entry+0x44/0x60 kernel/sched/idle.c:423
 start_secondary+0x101/0x110 arch/x86/kernel/smpboot.c:315
 common_startup_64+0x13e/0x147
 </TASK>

Crashes (5):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/07/13 11:06 upstream 3f31a806a62e 3cda49cf .config strace log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (corrupt fs)] ci2-upstream-fs INFO: task hung in lock_two_directories
2025/07/11 07:47 upstream bc9ff192a6c9 3cda49cf .config strace log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (corrupt fs)] ci2-upstream-fs INFO: task hung in lock_two_directories
2025/07/10 22:05 upstream bc9ff192a6c9 3cda49cf .config strace log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (corrupt fs)] ci2-upstream-fs INFO: task hung in lock_two_directories
2025/05/19 03:40 upstream a5806cd506af f41472b0 .config strace log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro (corrupt fs)] ci2-upstream-fs INFO: task hung in lock_two_directories
2025/07/10 00:39 upstream 8c2e52ebbe88 f4e5e155 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in lock_two_directories
* Struck through repros no longer work on HEAD.