syzbot


INFO: task hung in __closure_sync

Status: upstream: reported C repro on 2024/05/03 17:32
Subsystems: bcachefs
[Documentation on labels]
Reported-by: syzbot+7bf808f7fe4a6549f36e@syzkaller.appspotmail.com
First crash: 52d, last: 2h39m
Cause bisection: introduced by (bisect log) :
commit 03ef80b469d5d83530ce1ce15be78a40e5300f9b
Author: Kent Overstreet <kent.overstreet@linux.dev>
Date: Sat Sep 23 22:41:51 2023 +0000

  bcachefs: Ignore unknown mount options

Crash: INFO: task hung in __closure_sync (log)
Repro: C syz .config
  
Discussions (2)
Title Replies (including bot) Last reply
[syzbot] Monthly bcachefs report (Jun 2024) 0 (1) 2024/06/11 08:27
[syzbot] [bcachefs?] INFO: task hung in __closure_sync 0 (2) 2024/05/04 00:29

Sample crash report:
INFO: task syz-executor158:5089 blocked for more than 143 seconds.
      Not tainted 6.10.0-rc3-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz-executor158 state:D stack:15992 pid:5089  tgid:5089  ppid:5086   flags:0x00004006
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5408 [inline]
 __schedule+0x1796/0x49d0 kernel/sched/core.c:6745
 __schedule_loop kernel/sched/core.c:6822 [inline]
 schedule+0x14b/0x320 kernel/sched/core.c:6837
 __closure_sync+0x259/0x2f0 lib/closure.c:135
 closure_sync include/linux/closure.h:194 [inline]
 __bch2_write+0x54a5/0x5c40 fs/bcachefs/io_write.c:1495
 bch2_write+0x947/0x1670 fs/bcachefs/io_write.c:1623
 closure_queue include/linux/closure.h:269 [inline]
 closure_call include/linux/closure.h:402 [inline]
 bch2_dio_write_loop fs/bcachefs/fs-io-direct.c:531 [inline]
 bch2_direct_write+0x1a52/0x3050 fs/bcachefs/fs-io-direct.c:654
 bch2_write_iter+0x206/0x2840 fs/bcachefs/fs-io-buffered.c:1135
 new_sync_write fs/read_write.c:497 [inline]
 vfs_write+0xa72/0xc90 fs/read_write.c:590
 ksys_write+0x1a0/0x2c0 fs/read_write.c:643
 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:0x7f2b41eb9df9
RSP: 002b:00007ffce5de58b8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007f2b41eb9df9
RDX: 00000000175d9003 RSI: 0000000020000200 RDI: 0000000000000004
RBP: 0000000000000000 R08: 0000555500000000 R09: 0000555500000000
R10: 0000555500000000 R11: 0000000000000246 R12: 00000000000f4240
R13: 00007ffce5de5b28 R14: 0000000000000001 R15: 00007ffce5de58f0
 </TASK>

Showing all locks held in the system:
1 lock held by khungtaskd/30:
 #0: ffffffff8e333fa0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:329 [inline]
 #0: ffffffff8e333fa0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:781 [inline]
 #0: ffffffff8e333fa0 (rcu_read_lock){....}-{1:2}, at: debug_show_all_locks+0x55/0x2a0 kernel/locking/lockdep.c:6614
2 locks held by getty/4838:
 #0: ffff88802ab530a0 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x25/0x70 drivers/tty/tty_ldisc.c:243
 #1: ffffc900031332f0 (&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0x6b5/0x1e10 drivers/tty/n_tty.c:2201
2 locks held by syz-executor158/5089:
 #0: ffff888023ecc420 (sb_writers#9){.+.+}-{0:0}, at: file_start_write include/linux/fs.h:2854 [inline]
 #0: ffff888023ecc420 (sb_writers#9){.+.+}-{0:0}, at: vfs_write+0x227/0xc90 fs/read_write.c:586
 #1: ffff8880786e0150 (&sb->s_type->i_mutex_key#16){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:791 [inline]
 #1: ffff8880786e0150 (&sb->s_type->i_mutex_key#16){+.+.}-{3:3}, at: bch2_direct_write+0x243/0x3050 fs/bcachefs/fs-io-direct.c:598

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

NMI backtrace for cpu 0
CPU: 0 PID: 30 Comm: khungtaskd Not tainted 6.10.0-rc3-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/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: 11 Comm: kworker/u8:0 Not tainted 6.10.0-rc3-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024
Workqueue: events_unbound toggle_allocation_gate
RIP: 0010:get_current arch/x86/include/asm/current.h:49 [inline]
RIP: 0010:__sanitizer_cov_trace_pc+0x8/0x70 kernel/kcov.c:206
Code: 8b 3d bc 4c 44 0c 48 89 de 5b e9 13 06 57 00 0f 1f 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 f3 0f 1e fa 48 8b 04 24 <65> 48 8b 0c 25 c0 d4 03 00 65 8b 15 a0 ae 6d 7e f7 c2 00 01 ff 00
RSP: 0018:ffffc90000107678 EFLAGS: 00000002
RAX: ffffffff820463ef RBX: 8000000001ed1063 RCX: ffff8880176b3c00
RDX: ffff8880176b3c00 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffffc90000107730 R08: ffffffff820463d3 R09: 1ffffffff1f583d5
R10: dffffc0000000000 R11: fffffbfff1f583d6 R12: 0000000000000000
R13: 0000000000000001 R14: 1ffff92000020ed4 R15: 0000000000000001
FS:  0000000000000000(0000) GS:ffff8880b9500000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055a79afc3600 CR3: 000000000e132000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <NMI>
 </NMI>
 <TASK>
 page_table_check_pte_flags mm/page_table_check.c:199 [inline]
 __page_table_check_ptes_set+0x15f/0x410 mm/page_table_check.c:211
 page_table_check_ptes_set include/linux/page_table_check.h:74 [inline]
 set_ptes include/linux/pgtable.h:267 [inline]
 __text_poke+0xcdb/0xd30 arch/x86/kernel/alternative.c:1893
 text_poke arch/x86/kernel/alternative.c:1968 [inline]
 text_poke_bp_batch+0x265/0xb30 arch/x86/kernel/alternative.c:2276
 text_poke_flush arch/x86/kernel/alternative.c:2470 [inline]
 text_poke_finish+0x30/0x50 arch/x86/kernel/alternative.c:2477
 arch_jump_label_transform_apply+0x1c/0x30 arch/x86/kernel/jump_label.c:146
 static_key_disable_cpuslocked+0xce/0x1c0 kernel/jump_label.c:235
 static_key_disable+0x1a/0x20 kernel/jump_label.c:243
 toggle_allocation_gate+0x1b8/0x250 mm/kfence/core.c:831
 process_one_work kernel/workqueue.c:3231 [inline]
 process_scheduled_works+0xa2c/0x1830 kernel/workqueue.c:3312
 worker_thread+0x86d/0xd70 kernel/workqueue.c:3393
 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>
INFO: NMI handler (nmi_cpu_backtrace_handler) took too long to run: 1.570 msecs

Crashes (1953):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/06/11 09:57 upstream 83a7eefedc9b b7d9eb04 .config strace log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs INFO: task hung in __closure_sync
2024/06/08 18:07 upstream dc772f8237f9 82c05ab8 .config strace log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs INFO: task hung in __closure_sync
2024/06/06 14:21 upstream 2df0193e62cf 121701b6 .config strace log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs INFO: task hung in __closure_sync
2024/05/23 21:51 upstream b6394d6f7159 4c2072ee .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs INFO: task hung in __closure_sync
2024/05/23 12:06 upstream 8f6a15f095a6 4d098039 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-kasan-gce-root INFO: task hung in __closure_sync
2024/05/14 04:42 upstream 8815da98e06a fdb4c10c .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs INFO: task hung in __closure_sync
2024/05/09 07:15 upstream 6d7ddd805123 20bf80e1 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs INFO: task hung in __closure_sync
2024/05/09 03:28 upstream 6d7ddd805123 20bf80e1 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs INFO: task hung in __closure_sync
2024/05/09 02:53 upstream 6d7ddd805123 20bf80e1 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs INFO: task hung in __closure_sync
2024/05/08 10:42 upstream dccb07f2914c 4cf3f9b3 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs INFO: task hung in __closure_sync
2024/05/07 04:12 upstream dccb07f2914c fa7a5cf0 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro #1] [mounted in repro #2] ci2-upstream-fs INFO: task hung in __closure_sync
2024/05/05 05:58 upstream 7367539ad4b0 610f2a54 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs INFO: task hung in __closure_sync
2024/05/03 17:32 upstream f03359bca01b dd26401e .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs INFO: task hung in __closure_sync
2024/05/03 20:13 linux-next 9221b2819b8a 375d4445 .config strace log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-linux-next-kasan-gce-root INFO: task hung in __closure_sync
2024/06/25 01:01 upstream 626737a5791b 215eef4a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root INFO: task hung in __closure_sync
2024/06/24 12:52 upstream f2661062f16b edc5149a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root INFO: task hung in __closure_sync
2024/06/24 06:55 upstream 7c16f0a4ed1c edc5149a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root INFO: task hung in __closure_sync
2024/06/24 02:53 upstream 7c16f0a4ed1c edc5149a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root INFO: task hung in __closure_sync
2024/06/23 17:46 upstream 5f583a3162ff edc5149a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in __closure_sync
2024/06/23 13:32 upstream 5f583a3162ff edc5149a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root INFO: task hung in __closure_sync
2024/06/23 10:58 upstream 5f583a3162ff edc5149a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root INFO: task hung in __closure_sync
2024/06/23 08:05 upstream 563a50672d8a edc5149a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in __closure_sync
2024/06/23 04:44 upstream 563a50672d8a edc5149a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in __closure_sync
2024/06/23 02:15 upstream 563a50672d8a edc5149a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in __closure_sync
2024/06/23 01:54 upstream 5f583a3162ff edc5149a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root INFO: task hung in __closure_sync
2024/06/22 23:24 upstream 35bb670d65fc edc5149a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root INFO: task hung in __closure_sync
2024/06/22 22:15 upstream 35bb670d65fc edc5149a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root INFO: task hung in __closure_sync
2024/06/22 18:28 upstream 35bb670d65fc edc5149a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in __closure_sync
2024/06/22 15:14 upstream 35bb670d65fc edc5149a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root INFO: task hung in __closure_sync
2024/06/22 07:42 upstream 4545981f33be edc5149a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root INFO: task hung in __closure_sync
2024/06/22 06:25 upstream 4545981f33be edc5149a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root INFO: task hung in __closure_sync
2024/06/22 01:37 upstream 4545981f33be edc5149a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root INFO: task hung in __closure_sync
2024/06/21 23:43 upstream 4545981f33be edc5149a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root INFO: task hung in __closure_sync
2024/06/21 22:36 upstream 66cc544fd75c edc5149a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in __closure_sync
2024/06/21 20:54 upstream 66cc544fd75c edc5149a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in __closure_sync
2024/06/21 18:15 upstream 50736169ecc8 edc5149a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in __closure_sync
2024/06/21 16:13 upstream 50736169ecc8 edc5149a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in __closure_sync
2024/06/21 10:11 upstream 50736169ecc8 dac2aa43 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in __closure_sync
2024/06/21 08:54 upstream 50736169ecc8 dac2aa43 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in __closure_sync
2024/06/21 04:46 upstream 50736169ecc8 dac2aa43 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in __closure_sync
2024/06/20 23:47 upstream 50736169ecc8 dac2aa43 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in __closure_sync
2024/06/20 21:51 upstream 50736169ecc8 dac2aa43 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in __closure_sync
2024/06/20 18:37 upstream 2ccbdf43d5e7 dac2aa43 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root INFO: task hung in __closure_sync
2024/06/20 18:35 upstream 2ccbdf43d5e7 dac2aa43 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root INFO: task hung in __closure_sync
2024/06/20 16:57 upstream 2ccbdf43d5e7 dac2aa43 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in __closure_sync
2024/06/20 14:22 upstream 2ccbdf43d5e7 dac2aa43 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in __closure_sync
2024/06/20 12:11 upstream 2ccbdf43d5e7 dac2aa43 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in __closure_sync
2024/06/20 10:19 upstream 2ccbdf43d5e7 41b7e219 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in __closure_sync
2024/06/20 09:43 upstream 2ccbdf43d5e7 41b7e219 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in __closure_sync
2024/06/20 06:56 upstream 2ccbdf43d5e7 41b7e219 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in __closure_sync
2024/06/20 04:46 upstream 2ccbdf43d5e7 41b7e219 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root INFO: task hung in __closure_sync
2024/06/20 03:01 upstream 2ccbdf43d5e7 41b7e219 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in __closure_sync
2024/06/19 19:38 upstream 2ccbdf43d5e7 41b7e219 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root INFO: task hung in __closure_sync
2024/06/19 18:29 upstream 2ccbdf43d5e7 41b7e219 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root INFO: task hung in __closure_sync
2024/06/19 17:03 upstream 2ccbdf43d5e7 41b7e219 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root INFO: task hung in __closure_sync
2024/06/19 15:43 upstream 2ccbdf43d5e7 41b7e219 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root INFO: task hung in __closure_sync
2024/06/19 11:54 upstream 2ccbdf43d5e7 41b7e219 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root INFO: task hung in __closure_sync
2024/06/19 05:22 upstream 2ccbdf43d5e7 41b7e219 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in __closure_sync
2024/06/19 02:58 upstream 2ccbdf43d5e7 639d6cdf .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in __closure_sync
2024/06/19 00:15 upstream 2ccbdf43d5e7 639d6cdf .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in __closure_sync
2024/05/03 13:46 upstream f03359bca01b dd26401e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in __closure_sync
2024/05/29 02:09 linux-next 6dc544b66971 34889ee3 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root INFO: task hung in __closure_sync
2024/06/22 13:00 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci ac2193b4b460 edc5149a .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 INFO: task hung in __closure_sync
2024/06/20 13:20 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci ac2193b4b460 dac2aa43 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 INFO: task hung in __closure_sync
* Struck through repros no longer work on HEAD.