syzbot


INFO: task hung in do_truncate (3)

Status: upstream: reported on 2024/07/07 12:58
Reported-by: syzbot+d8b2ecdbccf65c21ef21@syzkaller.appspotmail.com
First crash: 137d, last: 27d
Similar bugs (4)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
linux-5.15 INFO: task hung in do_truncate 1 612d 612d 0/3 auto-obsoleted due to no activity on 2023/07/17 23:13
linux-5.15 INFO: task hung in do_truncate (2) 1 460d 460d 0/3 auto-obsoleted due to no activity on 2023/11/27 08:00
upstream INFO: task hung in do_truncate (2) fs C done done 14 303d 1624d 0/28 auto-obsoleted due to no activity on 2024/05/02 07:43
upstream INFO: task hung in do_truncate ext4 C 7 2197d 2361d 0/28 closed as dup on 2018/09/08 15:38

Sample crash report:
INFO: task syz.2.124:4672 blocked for more than 144 seconds.
      Not tainted 5.15.169-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz.2.124       state:D stack:    0 pid: 4672 ppid:  4040 flags:0x00000001
Call trace:
 __switch_to+0x308/0x5e8 arch/arm64/kernel/process.c:518
 context_switch kernel/sched/core.c:5027 [inline]
 __schedule+0xf10/0x1e48 kernel/sched/core.c:6373
 schedule+0x11c/0x1c8 kernel/sched/core.c:6456
 rwsem_down_write_slowpath+0xd94/0x17e0 kernel/locking/rwsem.c:1165
 __down_write_common kernel/locking/rwsem.c:1292 [inline]
 __down_write kernel/locking/rwsem.c:1301 [inline]
 down_write+0xe8/0x12c kernel/locking/rwsem.c:1552
 inode_lock include/linux/fs.h:789 [inline]
 do_truncate+0x1ac/0x28c fs/open.c:63
 handle_truncate fs/namei.c:3265 [inline]
 do_open fs/namei.c:3612 [inline]
 path_openat+0x20c4/0x26cc fs/namei.c:3742
 do_filp_open+0x1a8/0x3b4 fs/namei.c:3769
 do_sys_openat2+0x128/0x3e0 fs/open.c:1253
 do_sys_open fs/open.c:1269 [inline]
 __do_sys_openat fs/open.c:1285 [inline]
 __se_sys_openat fs/open.c:1280 [inline]
 __arm64_sys_openat+0x1f0/0x240 fs/open.c:1280
 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
 invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:52
 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:142
 do_el0_svc+0x58/0x14c arch/arm64/kernel/syscall.c:181
 el0_svc+0x7c/0x1f0 arch/arm64/kernel/entry-common.c:608
 el0t_64_sync_handler+0x84/0xe4 arch/arm64/kernel/entry-common.c:626
 el0t_64_sync+0x1a0/0x1a4 arch/arm64/kernel/entry.S:584

Showing all locks held in the system:
1 lock held by khungtaskd/27:
 #0: ffff800014c822e0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0xc/0x44 include/linux/rcupdate.h:311
4 locks held by kworker/u4:2/148:
 #0: ffff0000c21d0138 ((wq_completion)writeback){+.+.}-{0:0}, at: process_one_work+0x66c/0x11b8 kernel/workqueue.c:2283
 #1: ffff80001d6e7c00 ((work_completion)(&(&wb->dwork)->work)){+.+.}-{0:0}, at: process_one_work+0x6ac/0x11b8 kernel/workqueue.c:2285
 #2: ffff0000db0ee0e0 (&type->s_umount_key#57){++++}-{3:3}, at: trylock_super+0x28/0xf8 fs/super.c:418
 #3: ffff0000c86ed1b0 (&sbi->gc_lock){+.+.}-{3:3}, at: f2fs_balance_fs+0x3e8/0x6a0 fs/f2fs/segment.c:528
2 locks held by udevd/3643:
2 locks held by getty/3793:
 #0: ffff0000d36fd098 (&tty->ldisc_sem){++++}-{0:0}, at: ldsem_down_read+0x40/0x50 drivers/tty/tty_ldsem.c:340
 #1: ffff80001d64e2e8 (&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0x414/0x1204 drivers/tty/n_tty.c:2158
3 locks held by kworker/1:3/4020:
 #0: ffff0000c0020938 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work+0x66c/0x11b8 kernel/workqueue.c:2283
 #1: ffff80001f037c00 ((work_completion)(&map->work)){+.+.}-{0:0}, at: process_one_work+0x6ac/0x11b8 kernel/workqueue.c:2285
 #2: ffff800014c867f0 (rcu_state.barrier_mutex){+.+.}-{3:3}, at: rcu_barrier+0x54/0x4b0 kernel/rcu/tree.c:4039
2 locks held by kworker/0:6/4077:
 #0: ffff0000c0020938 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work+0x66c/0x11b8 kernel/workqueue.c:2283
 #1: ffff80001fc97c00 ((work_completion)(&pwq->unbound_release_work)){+.+.}-{0:0}, at: process_one_work+0x6ac/0x11b8 kernel/workqueue.c:2285
2 locks held by udevd/4210:
3 locks held by kworker/u4:11/4312:
4 locks held by kworker/u4:12/4476:
 #0: ffff0000c21d0138 ((wq_completion)writeback){+.+.}-{0:0}, at: process_one_work+0x66c/0x11b8 kernel/workqueue.c:2283
 #1: ffff8000208d7c00 ((work_completion)(&(&wb->dwork)->work)){+.+.}-{0:0}, at: process_one_work+0x6ac/0x11b8 kernel/workqueue.c:2285
 #2: ffff0000d0ade0e0 (&type->s_umount_key#57){++++}-{3:3}, at: trylock_super+0x28/0xf8 fs/super.c:418
 #3: ffff0000d2bad1b0 (&sbi->gc_lock){+.+.}-{3:3}, at: f2fs_balance_fs+0x3e8/0x6a0 fs/f2fs/segment.c:528
2 locks held by kworker/u4:13/4477:
5 locks held by syz.2.124/4640:
2 locks held by syz.2.124/4672:
 #0: ffff0000db0ee460 (sb_writers#13){.+.+}-{0:0}, at: mnt_want_write+0x44/0x9c fs/namespace.c:377
 #1: ffff0000ddd67350 (&sb->s_type->i_mutex_key#21){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:789 [inline]
 #1: ffff0000ddd67350 (&sb->s_type->i_mutex_key#21){+.+.}-{3:3}, at: do_truncate+0x1ac/0x28c fs/open.c:63
5 locks held by syz.1.132/4676:
4 locks held by kworker/u4:19/5045:
 #0: ffff0000c038c138 ((wq_completion)netns){+.+.}-{0:0}, at: process_one_work+0x66c/0x11b8 kernel/workqueue.c:2283
 #1: ffff80001d157c00 (net_cleanup_work){+.+.}-{0:0}, at: process_one_work+0x6ac/0x11b8 kernel/workqueue.c:2285
 #2: ffff800016bd8250 (pernet_ops_rwsem){++++}-{3:3}, at: cleanup_net+0xf4/0x9bc net/core/net_namespace.c:561
 #3: ffff0000e4ecd3e8 (&wg->device_update_lock){+.+.}-{3:3}, at: wg_destruct+0x11c/0x2dc drivers/net/wireguard/device.c:233
1 lock held by syz-executor/5479:
 #0: ffff800014c868e8 (rcu_state.exp_mutex){+.+.}-{3:3}, at: exp_funnel_lock kernel/rcu/tree_exp.h:290 [inline]
 #0: ffff800014c868e8 (rcu_state.exp_mutex){+.+.}-{3:3}, at: synchronize_rcu_expedited+0x320/0x660 kernel/rcu/tree_exp.h:845
1 lock held by syz.1.511/6057:

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


Crashes (10):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/10/24 19:31 linux-5.15.y 74cdd62cb470 0d144d1a .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 INFO: task hung in do_truncate
2024/09/10 13:30 linux-5.15.y 14e468424d3e 784df80e .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 INFO: task hung in do_truncate
2024/08/24 07:04 linux-5.15.y fa93fa65db6e d7d32352 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 INFO: task hung in do_truncate
2024/08/12 07:46 linux-5.15.y 7e89efd3ae1c 6f4edef4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 INFO: task hung in do_truncate
2024/08/06 16:10 linux-5.15.y 7e89efd3ae1c 1ef9fe42 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 INFO: task hung in do_truncate
2024/08/06 16:07 linux-5.15.y 7e89efd3ae1c 1ef9fe42 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 INFO: task hung in do_truncate
2024/08/05 05:17 linux-5.15.y 7e89efd3ae1c 1786a2a8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 INFO: task hung in do_truncate
2024/08/02 14:29 linux-5.15.y 7e89efd3ae1c 1e9c4cf3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 INFO: task hung in do_truncate
2024/07/27 05:05 linux-5.15.y 7c6d66f0266f 46eb10b7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 INFO: task hung in do_truncate
2024/07/07 12:57 linux-5.15.y f45bea23c39c 2a40360c .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan-arm64 INFO: task hung in do_truncate
* Struck through repros no longer work on HEAD.