syzbot


INFO: task hung in lock_rename

Status: auto-obsoleted due to no activity on 2023/08/23 09:02
Reported-by: syzbot+e97ae9118283c41cf24a@syzkaller.appspotmail.com
First crash: 553d, last: 521d
Similar bugs (10)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream INFO: task hung in lock_rename (3) fs 1 1187d 1187d 0/28 auto-closed as invalid on 2021/10/02 18:08
upstream INFO: task hung in lock_rename exfat 53 2133d 2268d 0/28 auto-closed as invalid on 2019/05/30 13:09
linux-6.1 INFO: task hung in lock_rename 3 376d 490d 0/3 auto-obsoleted due to no activity on 2024/01/01 05:54
upstream INFO: task hung in lock_rename (4) fs 3 976d 1069d 0/28 closed as invalid on 2022/02/08 09:40
linux-4.19 INFO: task hung in lock_rename 1 999d 999d 0/1 auto-closed as invalid on 2022/05/08 10:15
upstream INFO: task hung in lock_rename (5) fs 2 931d 960d 0/28 auto-closed as invalid on 2022/06/15 04:15
upstream INFO: task hung in lock_rename (2) fs 7 1338d 1361d 0/28 auto-closed as invalid on 2021/05/17 09:31
linux-4.14 INFO: task hung in lock_rename 1 844d 844d 0/1 auto-obsoleted due to no activity on 2022/10/10 13:20
android-49 INFO: task hung in lock_rename C 9 2229d 2000d 0/3 public: reported C repro on 2019/04/14 00:00
upstream INFO: task hung in lock_rename (6) ext4 18 523d 771d 0/28 auto-obsoleted due to no activity on 2023/07/28 16:10

Sample crash report:
INFO: task syz-executor.0:23107 blocked for more than 143 seconds.
      Not tainted 5.15.110-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor.0  state:D stack:26912 pid:23107 ppid:  3540 flags:0x00004004
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5026 [inline]
 __schedule+0x12c4/0x4590 kernel/sched/core.c:6372
 schedule+0x11b/0x1f0 kernel/sched/core.c:6455
 rwsem_down_write_slowpath+0xebb/0x15c0 kernel/locking/rwsem.c:1157
 __down_write_common kernel/locking/rwsem.c:1284 [inline]
 __down_write kernel/locking/rwsem.c:1293 [inline]
 down_write_nested+0x16d/0x180 kernel/locking/rwsem.c:1658
 lock_rename+0x182/0x1a0
 do_renameat2+0x545/0x13b0 fs/namei.c:4828
 __do_sys_renameat2 fs/namei.c:4920 [inline]
 __se_sys_renameat2 fs/namei.c:4917 [inline]
 __x64_sys_renameat2+0xce/0xe0 fs/namei.c:4917
 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+0x61/0xcb
RIP: 0033:0x7f9653356169
RSP: 002b:00007f96518a7168 EFLAGS: 00000246 ORIG_RAX: 000000000000013c
RAX: ffffffffffffffda RBX: 00007f9653476050 RCX: 00007f9653356169
RDX: 0000000000000004 RSI: 00000000200002c0 RDI: 0000000000000004
RBP: 00007f96533b1ca1 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000020000180 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffdd0fe4edf R14: 00007f96518a7300 R15: 0000000000022000
 </TASK>
INFO: task syz-executor.0:23108 blocked for more than 143 seconds.
      Not tainted 5.15.110-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor.0  state:D stack:26976 pid:23108 ppid:  3540 flags:0x00004004
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5026 [inline]
 __schedule+0x12c4/0x4590 kernel/sched/core.c:6372
 schedule+0x11b/0x1f0 kernel/sched/core.c:6455
 rwsem_down_write_slowpath+0xebb/0x15c0 kernel/locking/rwsem.c:1157
 __down_write_common kernel/locking/rwsem.c:1284 [inline]
 __down_write kernel/locking/rwsem.c:1293 [inline]
 down_write_nested+0x16d/0x180 kernel/locking/rwsem.c:1658
 inode_lock_nested include/linux/fs.h:822 [inline]
 ext4_rename fs/ext4/namei.c:3835 [inline]
 ext4_rename2+0x1031/0x42a0 fs/ext4/namei.c:4207
 vfs_rename+0xd8f/0x1190 fs/namei.c:4736
 do_renameat2+0xb97/0x13b0 fs/namei.c:4887
 __do_sys_rename fs/namei.c:4933 [inline]
 __se_sys_rename fs/namei.c:4931 [inline]
 __x64_sys_rename+0x82/0x90 fs/namei.c:4931
 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+0x61/0xcb
RIP: 0033:0x7f9653356169
RSP: 002b:00007f9651886168 EFLAGS: 00000246 ORIG_RAX: 0000000000000052
RAX: ffffffffffffffda RBX: 00007f9653476120 RCX: 00007f9653356169
RDX: 0000000000000000 RSI: 00000000200000c0 RDI: 0000000020000200
RBP: 00007f96533b1ca1 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffdd0fe4edf R14: 00007f9651886300 R15: 0000000000022000
 </TASK>

Showing all locks held in the system:
1 lock held by khungtaskd/27:
 #0: ffffffff8c91c4e0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x0/0x30
2 locks held by getty/3257:
 #0: ffff88814ad9d098 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x21/0x70 drivers/tty/tty_ldisc.c:252
 #1: ffffc900024a32e8 (&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0x6af/0x1da0 drivers/tty/n_tty.c:2147
2 locks held by syz-fuzzer/3500:
 #0: ffff88807a99cd70 (&f->f_pos_lock){+.+.}-{3:3}, at: __fdget_pos+0x261/0x300 fs/file.c:1073
 #1: ffff888084233fc0 (&type->i_mutex_dir_key#4){++++}-{3:3}, at: iterate_dir+0x10a/0x570 fs/readdir.c:55
4 locks held by syz-executor.0/23107:
 #0: ffff88814af92460 (sb_writers#5){.+.+}-{0:0}, at: mnt_want_write+0x3b/0x80 fs/namespace.c:377
 #1: ffff88814af92748 (&type->s_vfs_rename_key){+.+.}-{3:3}, at: lock_rename+0x54/0x1a0 fs/namei.c:2971
 #2: ffff888084fcabd0 (&type->i_mutex_dir_key#4/1){+.+.}-{3:3}, at: lock_rename+0x13a/0x1a0
 #3: ffff8880842335c8 (&type->i_mutex_dir_key#4/5){+.+.}-{3:3}, at: lock_rename+0x182/0x1a0
4 locks held by syz-executor.0/23108:
 #0: ffff88814af92460 (sb_writers#5){.+.+}-{0:0}, at: mnt_want_write+0x3b/0x80 fs/namespace.c:377
 #1: ffff888084233fc0 (&type->i_mutex_dir_key#4/1){+.+.}-{3:3}, at: lock_rename+0x182/0x1a0
 #2: ffff8880842335c8 (&type->i_mutex_dir_key#4){++++}-{3:3}, at: inode_lock include/linux/fs.h:787 [inline]
 #2: ffff8880842335c8 (&type->i_mutex_dir_key#4){++++}-{3:3}, at: vfs_rename+0x78f/0x1190 fs/namei.c:4708
 #3: ffff888084fcabd0 (&type->i_mutex_dir_key#4/4){+.+.}-{3:3}, at: inode_lock_nested include/linux/fs.h:822 [inline]
 #3: ffff888084fcabd0 (&type->i_mutex_dir_key#4/4){+.+.}-{3:3}, at: ext4_rename fs/ext4/namei.c:3835 [inline]
 #3: ffff888084fcabd0 (&type->i_mutex_dir_key#4/4){+.+.}-{3:3}, at: ext4_rename2+0x1031/0x42a0 fs/ext4/namei.c:4207

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

NMI backtrace for cpu 1
CPU: 1 PID: 27 Comm: khungtaskd Not tainted 5.15.110-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/14/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+0x46a/0x4a0 lib/nmi_backtrace.c:111
 nmi_trigger_cpumask_backtrace+0x181/0x2a0 lib/nmi_backtrace.c:62
 trigger_all_cpu_backtrace include/linux/nmi.h:148 [inline]
 check_hung_uninterruptible_tasks kernel/hung_task.c:210 [inline]
 watchdog+0xe72/0xeb0 kernel/hung_task.c:295
 kthread+0x3f6/0x4f0 kernel/kthread.c:319
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298
 </TASK>
Sending NMI from CPU 1 to CPUs 0:
NMI backtrace for cpu 0
CPU: 0 PID: 144 Comm: kworker/u4:1 Not tainted 5.15.110-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/14/2023
Workqueue:  0x0 (phy23)
RIP: 0010:rcu_read_lock_held_common kernel/rcu/update.c:104 [inline]
RIP: 0010:rcu_read_lock_held+0x1/0x40 kernel/rcu/update.c:309
Code: 8f e8 13 3c 5f 00 eb cf 90 0f b6 05 55 a6 79 0c c3 0f 1f 84 00 00 00 00 00 e8 eb f8 00 00 e9 86 fa 00 00 66 0f 1f 44 00 00 53 <e8> 0a 31 b0 08 85 c0 74 26 31 db e8 ff c2 00 00 84 c0 74 20 e8 56
RSP: 0018:ffffc900010cf908 EFLAGS: 00000046
RAX: 0000000000000000 RBX: ffff888011e22f90 RCX: ffff888011e21d00
RDX: dffffc0000000000 RSI: ffffffff8a8b0e00 RDI: ffffffff8ad858c0
RBP: dffffc0000000000 R08: dffffc0000000000 R09: fffffbfff1f78c21
R10: 0000000000000000 R11: dffffc0000000001 R12: ffffffff8c944440
R13: 0000000000000000 R14: ffff888011e21d00 R15: ffff888011e21d2c
FS:  0000000000000000(0000) GS:ffff8880b9a00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000000c02beff800 CR3: 0000000023a7b000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 task_css include/linux/cgroup.h:495 [inline]
 task_ca kernel/sched/cpuacct.c:40 [inline]
 cpuacct_charge+0xf7/0x2b0 kernel/sched/cpuacct.c:336
 cgroup_account_cputime include/linux/cgroup.h:793 [inline]
 update_curr+0x443/0xaa0 kernel/sched/fair.c:853
 dequeue_entity+0x27/0xff0 kernel/sched/fair.c:4581
 dequeue_task_fair+0x276/0x13e0 kernel/sched/fair.c:5912
 dequeue_task kernel/sched/core.c:1997 [inline]
 deactivate_task kernel/sched/core.c:2014 [inline]
 __schedule+0x786/0x4590 kernel/sched/core.c:6326
 schedule+0x11b/0x1f0 kernel/sched/core.c:6455
 worker_thread+0xf56/0x1280 kernel/workqueue.c:2474
 kthread+0x3f6/0x4f0 kernel/kthread.c:319
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298
 </TASK>

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/05/01 12:25 linux-5.15.y 8a7f2a5c5aa1 62df2017 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in lock_rename
2023/03/30 18:47 linux-5.15.y c957cbb87315 f325deb0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in lock_rename
* Struck through repros no longer work on HEAD.