syzbot


INFO: task hung in bch2_fs_read_only_work (2)

Status: upstream: reported C repro on 2025/04/06 17:51
Subsystems: bcachefs
[Documentation on labels]
Reported-by: syzbot+674ccd0645d379ed5f80@syzkaller.appspotmail.com
First crash: 147d, last: 6d01h
Cause bisection: failed (error log, bisect log)
  
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [bcachefs?] INFO: task hung in bch2_fs_read_only_work (2) 2 (4) 2025/08/18 02:51
Similar bugs (1)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream INFO: task hung in bch2_fs_read_only_work bcachefs 1 C done inconclusive 286 246d 473d 0/29 auto-obsoleted due to no activity on 2025/03/05 14:23
Last patch testing requests (2)
Created Duration User Patch Repo Result
2025/06/25 22:38 23m retest repro git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci report log
2025/04/16 19:28 19m retest repro git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci report log

Sample crash report:
INFO: task kworker/0:2:5165 blocked for more than 143 sec[  348.252664][   T38] INFO: task kworker/0:2:5165 blocked for more than 143 seconds.
      Tainted: G        W           6.17.0-rc1-syzkaller-00224-g8d561baae505 #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:kworker/0:2     state:D stack:19368 pid:5165  tgid:5165  ppid:2      task_flags:0x4208060 flags:0x00004000
Workqueue: events_long bch2_fs_read_only_work
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5357 [inline]
 __schedule+0x16f3/0x4c20 kernel/sched/core.c:6961
 __schedule_loop kernel/sched/core.c:7043 [inline]
 rt_mutex_schedule+0x77/0xf0 kernel/sched/core.c:7339
 rt_mutex_slowlock_block kernel/locking/rtmutex.c:1647 [inline]
 __rt_mutex_slowlock kernel/locking/rtmutex.c:1721 [inline]
 __rt_mutex_slowlock_locked+0x1e04/0x25e0 kernel/locking/rtmutex.c:1760
 rt_mutex_slowlock+0xb5/0x160 kernel/locking/rtmutex.c:1800
 __rt_mutex_lock kernel/locking/rtmutex.c:1815 [inline]
 rwbase_write_lock+0x14f/0x750 kernel/locking/rwbase_rt.c:244
 bch2_fs_read_only_work+0x25/0x40 fs/bcachefs/super.c:408
 process_one_work kernel/workqueue.c:3236 [inline]
 process_scheduled_works+0xae1/0x17b0 kernel/workqueue.c:3319
 worker_thread+0x8a0/0xda0 kernel/workqueue.c:3400
 kthread+0x711/0x8a0 kernel/kthread.c:463
 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>
INFO: task kworker/0:3:5894 blocked for more than 143 seconds.
      Tainted: G        W           6.17.0-rc1-syzkaller-00224-g8d561baae505 #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:kworker/0:3     state:D stack:19368 pid:5894  tgid:5894  ppid:2      task_flags:0x4208060 flags:0x00004000
Workqueue: events_long bch2_fs_read_only_work
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5357 [inline]
 __schedule+0x16f3/0x4c20 kernel/sched/core.c:6961
 __schedule_loop kernel/sched/core.c:7043 [inline]
 rt_mutex_schedule+0x77/0xf0 kernel/sched/core.c:7339
 rt_mutex_slowlock_block kernel/locking/rtmutex.c:1647 [inline]
 __rt_mutex_slowlock kernel/locking/rtmutex.c:1721 [inline]
 __rt_mutex_slowlock_locked+0x1e04/0x25e0 kernel/locking/rtmutex.c:1760
 rt_mutex_slowlock+0xb5/0x160 kernel/locking/rtmutex.c:1800
 __rt_mutex_lock kernel/locking/rtmutex.c:1815 [inline]
 rwbase_write_lock+0x14f/0x750 kernel/locking/rwbase_rt.c:244
 bch2_fs_read_only_work+0x25/0x40 fs/bcachefs/super.c:408
 process_one_work kernel/workqueue.c:3236 [inline]
 process_scheduled_works+0xae1/0x17b0 kernel/workqueue.c:3319
 worker_thread+0x8a0/0xda0 kernel/workqueue.c:3400
 kthread+0x711/0x8a0 kernel/kthread.c:463
 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>
INFO: task syz.3.29:6306 blocked for more than 143 seconds.
      Tainted: G        W           6.17.0-rc1-syzkaller-00224-g8d561baae505 #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz.3.29        state:D stack:22952 pid:6306  tgid:6256  ppid:5968   task_flags:0x400140 flags:0x00004006
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5357 [inline]
 __schedule+0x16f3/0x4c20 kernel/sched/core.c:6961
 __schedule_loop kernel/sched/core.c:7043 [inline]
 schedule+0x165/0x360 kernel/sched/core.c:7058
 __closure_sync+0x163/0x220 lib/closure.c:146
 closure_sync include/linux/closure.h:195 [inline]
 bch2_dev_allocator_remove+0x7ad/0x9c0 fs/bcachefs/alloc_background.c:2651
 __bch2_dev_read_only fs/bcachefs/super.c:1705 [inline]
 bch2_dev_remove+0x504/0x13a0 fs/bcachefs/super.c:1792
 bch2_ioctl_disk_remove+0x130/0x170 fs/bcachefs/chardev.c:226
 bch2_fs_ioctl+0xb41/0x1920 fs/bcachefs/chardev.c:730
 bch2_fs_file_ioctl+0x564/0x1dd0 fs/bcachefs/fs-ioctl.c:411
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:598 [inline]
 __se_sys_ioctl+0xfc/0x170 fs/ioctl.c:584
 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:0x7f5de5d0ebe9
RSP: 002b:00007f5de5355038 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f5de5f36090 RCX: 00007f5de5d0ebe9
RDX: 00002000000000c0 RSI: 000000004010bc05 RDI: 0000000000000004
RBP: 00007f5de5d91e19 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f5de5f36128 R14: 00007f5de5f36090 R15: 00007fffe9406a88
 </TASK>
INFO: task syz.1.37:6366 blocked for more than 143 seconds.
      Tainted: G        W           6.17.0-rc1-syzkaller-00224-g8d561baae505 #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz.1.37        state:D stack:15976 pid:6366  tgid:6364  ppid:5967   task_flags:0x400140 flags:0x00004004
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5357 [inline]
 __schedule+0x16f3/0x4c20 kernel/sched/core.c:6961
 __schedule_loop kernel/sched/core.c:7043 [inline]
 schedule+0x165/0x360 kernel/sched/core.c:7058
 __closure_sync+0x163/0x220 lib/closure.c:146
 closure_sync include/linux/closure.h:195 [inline]
 bch2_dev_allocator_remove+0x7ad/0x9c0 fs/bcachefs/alloc_background.c:2651
 __bch2_dev_read_only fs/bcachefs/super.c:1705 [inline]
 bch2_dev_remove+0x504/0x13a0 fs/bcachefs/super.c:1792
 bch2_ioctl_disk_remove+0x130/0x170 fs/bcachefs/chardev.c:226
 bch2_fs_ioctl+0xb41/0x1920 fs/bcachefs/chardev.c:730
 bch2_fs_file_ioctl+0x564/0x1dd0 fs/bcachefs/fs-ioctl.c:411
 vfs_ioctl fs/ioctl.c:51 [inline]
 __do_sys_ioctl fs/ioctl.c:598 [inline]
 __se_sys_ioctl+0xfc/0x170 fs/ioctl.c:584
 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:0x7fbae6e3ebe9
RSP: 002b:00007fbae64ae038 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007fbae7065fa0 RCX: 00007fbae6e3ebe9
RDX: 00002000000000c0 RSI: 000000004010bc05 RDI: 0000000000000004
RBP: 00007fbae6ec1e19 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fbae7066038 R14: 00007fbae7065fa0 R15: 00007ffc4fe142e8
 </TASK>
INFO: lockdep is turned off.
NMI backtrace for cpu 0
CPU: 0 UID: 0 PID: 38 Comm: khungtaskd Tainted: G        W           6.17.0-rc1-syzkaller-00224-g8d561baae505 #0 PREEMPT_{RT,(full)} 
Tainted: [W]=WARN
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/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:160 [inline]
 check_hung_uninterruptible_tasks kernel/hung_task.c:328 [inline]
 watchdog+0xf93/0xfe0 kernel/hung_task.c:491
 kthread+0x711/0x8a0 kernel/kthread.c:463
 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: 8017 Comm: syz.2.386 Tainted: G        W           6.17.0-rc1-syzkaller-00224-g8d561baae505 #0 PREEMPT_{RT,(full)} 
Tainted: [W]=WARN
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025
RIP: 0010:xas_clear_mark+0x28/0x530 lib/xarray.c:-1
Code: 90 90 f3 0f 1e fa 55 41 57 41 56 41 55 41 54 53 48 83 ec 18 89 74 24 04 48 89 fb 49 bd 00 00 00 00 00 fc ff df e8 b8 1e ca f6 <48> 89 5c 24 08 48 8d 7b 18 48 89 f8 48 c1 e8 03 42 80 3c 28 00 74
RSP: 0018:ffffc900060df4a8 EFLAGS: 00000293
RAX: ffffffff8af43c88 RBX: ffffc900060df580 RCX: ffff888091b5bb80
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
R10: dffffc0000000000 R11: ffffed101341a6d0 R12: 0000000000000001
R13: dffffc0000000000 R14: ffff88806492a638 R15: dffffc0000000000
FS:  00007f86571066c0(0000) GS:ffff8881269c5000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f1deed16000 CR3: 000000003e458000 CR4: 00000000003526f0
Call Trace:
 <TASK>
 xas_init_marks+0x6c/0xc0 lib/xarray.c:955
 page_cache_delete mm/filemap.c:142 [inline]
 __filemap_remove_folio+0x3cf/0x500 mm/filemap.c:224
 filemap_remove_folio+0xe6/0x200 mm/filemap.c:253
 truncate_inode_folio+0x5d/0x70 mm/truncate.c:176
 shmem_undo_range+0x3a9/0x14b0 mm/shmem.c:1153
 shmem_truncate_range mm/shmem.c:1269 [inline]
 shmem_evict_inode+0x272/0xa70 mm/shmem.c:1397
 evict+0x504/0x9c0 fs/inode.c:810
 __dentry_kill+0x209/0x660 fs/dcache.c:669
 dput+0x19f/0x2b0 fs/dcache.c:911
 __fput+0x69d/0xa80 fs/file_table.c:476
 fput_close_sync+0x119/0x200 fs/file_table.c:573
 __do_sys_close fs/open.c:1587 [inline]
 __se_sys_close fs/open.c:1572 [inline]
 __x64_sys_close+0x7f/0x110 fs/open.c:1572
 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:0x7f8657a9d84a
Code: 48 3d 00 f0 ff ff 77 48 c3 0f 1f 80 00 00 00 00 48 83 ec 18 89 7c 24 0c e8 43 91 02 00 8b 7c 24 0c 89 c2 b8 03 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 36 89 d7 89 44 24 0c e8 a3 91 02 00 8b 44 24
RSP: 002b:00007f8657105e00 EFLAGS: 00000293 ORIG_RAX: 0000000000000003
RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 00007f8657a9d84a
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000003
RBP: 0000000000000010 R08: 0000000000000000 R09: 00000000000059da
R10: 0000000000000000 R11: 0000000000000293 R12: 0000000000000003
R13: 00007f8657105ef0 R14: 00007f8657106668 R15: 00007f864ece6000
 </TASK>

Crashes (5):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/08/18 02:50 upstream 8d561baae505 1804e95e .config console log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs INFO: task hung in bch2_fs_read_only_work
2025/04/02 17:40 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci a2392f333575 c799dfdd .config console log report syz / log [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-gce-arm64 INFO: task hung in bch2_fs_read_only_work
2025/08/22 13:06 upstream 3957a5720157 bf27483f .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in bch2_fs_read_only_work
2025/08/18 21:56 upstream c17b750b3ad9 1804e95e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in bch2_fs_read_only_work
2025/08/17 23:12 upstream 8d561baae505 1804e95e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs INFO: task hung in bch2_fs_read_only_work
* Struck through repros no longer work on HEAD.