syzbot


INFO: task hung in bch2_write_iter

Status: upstream: reported on 2024/06/24 16:28
Subsystems: bcachefs
[Documentation on labels]
Reported-by: syzbot+d8b126a5bfdcd1f3e7c5@syzkaller.appspotmail.com
First crash: 75d, last: 17h37m
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [bcachefs?] INFO: task hung in bch2_write_iter 0 (1) 2024/06/24 16:28

Sample crash report:
INFO: task syz.1.171:6715 blocked for more than 143 seconds.
      Not tainted 6.10.0-syzkaller-05505-gb1bc554e009e #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz.1.171       state:D stack:24920 pid:6715  tgid:6664  ppid:5894   flags:0x00000004
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5188 [inline]
 __schedule+0x17ae/0x4a10 kernel/sched/core.c:6529
 __schedule_loop kernel/sched/core.c:6606 [inline]
 schedule+0x14b/0x320 kernel/sched/core.c:6621
 schedule_preempt_disabled+0x13/0x30 kernel/sched/core.c:6678
 rwsem_down_write_slowpath+0xeeb/0x13b0 kernel/locking/rwsem.c:1178
 __down_write_common kernel/locking/rwsem.c:1306 [inline]
 __down_write kernel/locking/rwsem.c:1315 [inline]
 down_write+0x1d7/0x220 kernel/locking/rwsem.c:1580
 inode_lock include/linux/fs.h:799 [inline]
 bch2_buffered_write fs/bcachefs/fs-io-buffered.c:1012 [inline]
 bch2_write_iter+0x22e/0x2840 fs/bcachefs/fs-io-buffered.c:1136
 do_iter_readv_writev+0x60a/0x890
 vfs_writev+0x37c/0xbb0 fs/read_write.c:971
 do_pwritev fs/read_write.c:1072 [inline]
 __do_sys_pwritev2 fs/read_write.c:1131 [inline]
 __se_sys_pwritev2+0x1ca/0x2d0 fs/read_write.c:1122
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7feb76975ad9
RSP: 002b:00007feb7774c048 EFLAGS: 00000246 ORIG_RAX: 0000000000000148
RAX: ffffffffffffffda RBX: 00007feb76b041e8 RCX: 00007feb76975ad9
RDX: 0000000000000001 RSI: 0000000020000140 RDI: 0000000000000006
RBP: 00007feb769e4e5d R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 000000000000006e R14: 00007feb76b041e8 R15: 00007fff85b14698
 </TASK>

Showing all locks held in the system:
1 lock held by khungtaskd/30:
 #0: ffffffff8e335fe0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:327 [inline]
 #0: ffffffff8e335fe0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:839 [inline]
 #0: ffffffff8e335fe0 (rcu_read_lock){....}-{1:2}, at: debug_show_all_locks+0x55/0x2a0 kernel/locking/lockdep.c:6613
2 locks held by kworker/u8:2/35:
2 locks held by getty/4843:
 #0: ffff88802fc590a0 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x25/0x70 drivers/tty/tty_ldisc.c:243
 #1: ffffc90002efe2f0 (&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0x6b5/0x1e10 drivers/tty/n_tty.c:2211
4 locks held by kworker/1:7/5698:
 #0: ffff8880b953e818 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x2a/0x140 kernel/sched/core.c:560
 #1: ffff8880b9528948 (&per_cpu_ptr(group->pcpu, cpu)->seq){-.-.}-{0:0}, at: psi_task_switch+0x441/0x770 kernel/sched/psi.c:989
 #2: ffffffff949d5fa8 (&obj_hash[i].lock){-.-.}-{2:2}, at: __debug_check_no_obj_freed lib/debugobjects.c:979 [inline]
 #2: ffffffff949d5fa8 (&obj_hash[i].lock){-.-.}-{2:2}, at: debug_check_no_obj_freed+0x234/0x580 lib/debugobjects.c:1020
 #3: ffff8880b952a718 (&base->lock){-.-.}-{2:2}, at: __mod_timer+0x744/0xeb0 kernel/time/timer.c:1164
3 locks held by syz.1.171/6665:
 #0: ffff8880224e2ac8 (&f->f_pos_lock){+.+.}-{3:3}, at: __fdget_pos+0x24e/0x310 fs/file.c:1191
 #1: ffff888068e22420 (sb_writers#18){.+.+}-{0:0}, at: file_start_write include/linux/fs.h:2876 [inline]
 #1: ffff888068e22420 (sb_writers#18){.+.+}-{0:0}, at: vfs_write+0x227/0xc90 fs/read_write.c:586
 #2: ffff888061bdd9c8 (&sb->s_type->i_mutex_key#26){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:799 [inline]
 #2: ffff888061bdd9c8 (&sb->s_type->i_mutex_key#26){+.+.}-{3:3}, at: bch2_direct_write+0x243/0x3050 fs/bcachefs/fs-io-direct.c:598
2 locks held by syz.1.171/6709:
 #0: ffff888068e22420 (sb_writers#18){.+.+}-{0:0}, at: file_start_write include/linux/fs.h:2876 [inline]
 #0: ffff888068e22420 (sb_writers#18){.+.+}-{0:0}, at: vfs_fallocate+0x4ea/0x6c0 fs/open.c:333
 #1: ffff888077adbc48 (&sb->s_type->i_mutex_key#26){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:799 [inline]
 #1: ffff888077adbc48 (&sb->s_type->i_mutex_key#26){+.+.}-{3:3}, at: bch2_fallocate_dispatch+0x295/0x3810 fs/bcachefs/fs-io.c:774
2 locks held by syz.1.171/6715:
 #0: ffff888068e22420 (sb_writers#18){.+.+}-{0:0}, at: file_start_write include/linux/fs.h:2876 [inline]
 #0: ffff888068e22420 (sb_writers#18){.+.+}-{0:0}, at: vfs_writev+0x2d4/0xbb0 fs/read_write.c:969
 #1: ffff888077adbc48 (&sb->s_type->i_mutex_key#26){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:799 [inline]
 #1: ffff888077adbc48 (&sb->s_type->i_mutex_key#26){+.+.}-{3:3}, at: bch2_buffered_write fs/bcachefs/fs-io-buffered.c:1012 [inline]
 #1: ffff888077adbc48 (&sb->s_type->i_mutex_key#26){+.+.}-{3:3}, at: bch2_write_iter+0x22e/0x2840 fs/bcachefs/fs-io-buffered.c:1136
1 lock held by syz.2.322/7670:
1 lock held by syz.2.322/7673:
 #0: ffff888061be4180 (&type->i_mutex_dir_key#22){++++}-{3:3}, at: inode_lock_shared include/linux/fs.h:809 [inline]
 #0: ffff888061be4180 (&type->i_mutex_dir_key#22){++++}-{3:3}, at: lookup_slow+0x45/0x70 fs/namei.c:1734
1 lock held by syz.2.322/7674:
 #0: ffff888061be4180 (&type->i_mutex_dir_key#22){++++}-{3:3}, at: inode_lock include/linux/fs.h:799 [inline]
 #0: ffff888061be4180 (&type->i_mutex_dir_key#22){++++}-{3:3}, at: open_last_lookups fs/namei.c:3644 [inline]
 #0: ffff888061be4180 (&type->i_mutex_dir_key#22){++++}-{3:3}, at: path_openat+0x7fb/0x3470 fs/namei.c:3883
1 lock held by syz.2.322/7675:
 #0: ffff888061be4180 (&type->i_mutex_dir_key#22/1){+.+.}-{3:3}, at: inode_lock_nested include/linux/fs.h:834 [inline]
 #0: ffff888061be4180 (&type->i_mutex_dir_key#22/1){+.+.}-{3:3}, at: filename_create+0x260/0x540 fs/namei.c:3979
1 lock held by syz-executor/7874:
 #0: ffffffff8e33b280 (rcu_state.barrier_mutex){+.+.}-{3:3}, at: rcu_barrier+0x4c/0x530 kernel/rcu/tree.c:4486
1 lock held by syz-executor/7911:
 #0: ffffffff8e33b3b8 (rcu_state.exp_mutex){+.+.}-{3:3}, at: exp_funnel_lock kernel/rcu/tree_exp.h:328 [inline]
 #0: ffffffff8e33b3b8 (rcu_state.exp_mutex){+.+.}-{3:3}, at: synchronize_rcu_expedited+0x451/0x830 kernel/rcu/tree_exp.h:958
1 lock held by syz-executor/8112:
 #0: ffffffff8e33b3b8 (rcu_state.exp_mutex){+.+.}-{3:3}, at: exp_funnel_lock kernel/rcu/tree_exp.h:328 [inline]
 #0: ffffffff8e33b3b8 (rcu_state.exp_mutex){+.+.}-{3:3}, at: synchronize_rcu_expedited+0x451/0x830 kernel/rcu/tree_exp.h:958
1 lock held by syz.2.423/8379:

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

NMI backtrace for cpu 0
CPU: 0 PID: 30 Comm: khungtaskd Not tainted 6.10.0-syzkaller-05505-gb1bc554e009e #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x241/0x360 lib/dump_stack.c:114
 nmi_cpu_backtrace+0x49c/0x4d0 lib/nmi_backtrace.c:113
 nmi_trigger_cpumask_backtrace+0x198/0x320 lib/nmi_backtrace.c:62
 trigger_all_cpu_backtrace include/linux/nmi.h:162 [inline]
 check_hung_uninterruptible_tasks kernel/hung_task.c:223 [inline]
 watchdog+0xfde/0x1020 kernel/hung_task.c:379
 kthread+0x2f0/0x390 kernel/kthread.c:389
 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
 </TASK>
Sending NMI from CPU 0 to CPUs 1:
NMI backtrace for cpu 1
CPU: 1 PID: 35 Comm: kworker/u8:2 Not tainted 6.10.0-syzkaller-05505-gb1bc554e009e #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024
Workqueue: bat_events batadv_nc_worker
RIP: 0010:__lock_acquire+0x1bb/0x1fd0 kernel/locking/lockdep.c:5045
Code: 48 8b 44 24 50 48 8d 98 e0 0a 00 00 83 fa 31 0f 83 ee 1b 00 00 48 8d 04 92 48 8d 5c c3 f8 48 89 dd 48 c1 ed 03 0f b6 44 35 00 <84> c0 0f 85 75 16 00 00 48 83 bc 24 c8 00 00 00 00 0f 84 e2 00 00
RSP: 0018:ffffc90000ab78f0 EFLAGS: 00000802
RAX: 0000000000000000 RBX: ffff88801aefc728 RCX: ffffffff9479a703
RDX: 0000000000000002 RSI: dffffc0000000000 RDI: 0000000000000021
RBP: 1ffff110035df8e5 R08: 0000000000000000 R09: 0000000000000000
R10: dffffc0000000000 R11: fffffbfff1f5a8c6 R12: ffffffff8e335fe0
R13: 0000000000000021 R14: ffff88801aefbc00 R15: 0000000000000000
FS:  0000000000000000(0000) GS:ffff8880b9500000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f7bd24d1178 CR3: 000000000e134000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <NMI>
 </NMI>
 <TASK>
 lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5753
 rcu_lock_acquire include/linux/rcupdate.h:327 [inline]
 rcu_read_lock include/linux/rcupdate.h:839 [inline]
 batadv_nc_purge_orig_hash net/batman-adv/network-coding.c:408 [inline]
 batadv_nc_worker+0xec/0x610 net/batman-adv/network-coding.c:719
 process_one_work kernel/workqueue.c:3231 [inline]
 process_scheduled_works+0xa2c/0x1830 kernel/workqueue.c:3312
 worker_thread+0x86d/0xd40 kernel/workqueue.c:3390
 kthread+0x2f0/0x390 kernel/kthread.c:389
 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
 </TASK>

Crashes (48):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/07/18 12:20 upstream b1bc554e009e 0f902625 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in bch2_write_iter
2024/07/18 12:17 upstream b1bc554e009e 0f902625 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in bch2_write_iter
2024/07/18 12:17 upstream b1bc554e009e 0f902625 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in bch2_write_iter
2024/07/15 04:51 upstream 0c3836482481 eaeb5c15 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in bch2_write_iter
2024/07/13 19:17 upstream 528dd46d0fc3 eaeb5c15 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in bch2_write_iter
2024/07/13 19:09 upstream 528dd46d0fc3 eaeb5c15 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in bch2_write_iter
2024/07/13 19:09 upstream 528dd46d0fc3 eaeb5c15 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in bch2_write_iter
2024/07/13 19:08 upstream 528dd46d0fc3 eaeb5c15 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in bch2_write_iter
2024/07/13 19:01 upstream 528dd46d0fc3 eaeb5c15 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in bch2_write_iter
2024/07/10 12:41 upstream 34afb82a3c67 bc144f9a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in bch2_write_iter
2024/07/01 22:48 upstream 22a40d14b572 b294e901 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in bch2_write_iter
2024/06/20 16:15 upstream 2ccbdf43d5e7 dac2aa43 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in bch2_write_iter
2024/06/20 16:13 upstream 2ccbdf43d5e7 dac2aa43 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in bch2_write_iter
2024/06/20 16:11 upstream 2ccbdf43d5e7 dac2aa43 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in bch2_write_iter
2024/06/20 04:37 upstream 2ccbdf43d5e7 41b7e219 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in bch2_write_iter
2024/06/19 14:55 upstream 2ccbdf43d5e7 41b7e219 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in bch2_write_iter
2024/06/12 17:11 upstream 2ef5971ff345 f815599d .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in bch2_write_iter
2024/06/10 10:34 upstream 83a7eefedc9b 82c05ab8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in bch2_write_iter
2024/06/10 04:31 upstream 83a7eefedc9b 82c05ab8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in bch2_write_iter
2024/06/09 23:45 upstream 771ed66105de 82c05ab8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in bch2_write_iter
2024/06/08 02:32 upstream 96e09b8f8166 82c05ab8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in bch2_write_iter
2024/06/08 02:27 upstream 96e09b8f8166 82c05ab8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in bch2_write_iter
2024/06/08 02:17 upstream 96e09b8f8166 82c05ab8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in bch2_write_iter
2024/06/06 21:04 upstream 2df0193e62cf 121701b6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root INFO: task hung in bch2_write_iter
2024/06/06 21:03 upstream 2df0193e62cf 121701b6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root INFO: task hung in bch2_write_iter
2024/06/06 20:56 upstream 2df0193e62cf 121701b6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root INFO: task hung in bch2_write_iter
2024/06/06 20:55 upstream 2df0193e62cf 121701b6 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root INFO: task hung in bch2_write_iter
2024/06/06 20:37 upstream d30d0e49da71 121701b6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in bch2_write_iter
2024/06/06 20:26 upstream d30d0e49da71 121701b6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in bch2_write_iter
2024/06/06 20:08 upstream d30d0e49da71 121701b6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in bch2_write_iter
2024/06/06 20:07 upstream d30d0e49da71 121701b6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in bch2_write_iter
2024/06/03 01:30 upstream 83814698cf48 3113787f .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in bch2_write_iter
2024/06/03 01:29 upstream 83814698cf48 3113787f .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in bch2_write_iter
2024/06/01 10:24 upstream d8ec19857b09 3113787f .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in bch2_write_iter
2024/06/01 09:22 upstream d8ec19857b09 3113787f .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in bch2_write_iter
2024/05/26 04:49 upstream 74eca356f6d4 a10a183e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in bch2_write_iter
2024/05/26 04:48 upstream 74eca356f6d4 a10a183e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in bch2_write_iter
2024/05/05 01:08 upstream 7367539ad4b0 610f2a54 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in bch2_write_iter
2024/05/05 01:08 upstream 7367539ad4b0 610f2a54 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in bch2_write_iter
2024/05/05 01:03 upstream 7367539ad4b0 610f2a54 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in bch2_write_iter
2024/05/12 08:16 linux-next 75fa778d74b7 9026e142 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root INFO: task hung in bch2_write_iter
* Struck through repros no longer work on HEAD.