./strace-static-x86_64 -e \!wait4,clock_nanosleep,nanosleep -s 100 -x -f ./syz-executor2959082739 <...> Warning: Permanently added '10.128.0.222' (ED25519) to the list of known hosts. execve("./syz-executor2959082739", ["./syz-executor2959082739"], 0x7ffe46bbcb50 /* 10 vars */) = 0 brk(NULL) = 0x5555765af000 brk(0x5555765afd00) = 0x5555765afd00 arch_prctl(ARCH_SET_FS, 0x5555765af380) = 0 set_tid_address(0x5555765af650) = 5104 set_robust_list(0x5555765af660, 24) = 0 rseq(0x5555765afca0, 0x20, 0, 0x53053053) = 0 prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0 readlink("/proc/self/exe", "/root/syz-executor2959082739", 4096) = 28 getrandom("\xe1\x3b\xbd\x77\xa1\x55\xd5\x2a", 8, GRND_NONBLOCK) = 8 brk(NULL) = 0x5555765afd00 brk(0x5555765d0d00) = 0x5555765d0d00 brk(0x5555765d1000) = 0x5555765d1000 mprotect(0x7f5b6a932000, 16384, PROT_READ) = 0 mmap(0x1ffff000, 4096, PROT_NONE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x1ffff000 mmap(0x20000000, 16777216, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x20000000 mmap(0x21000000, 4096, PROT_NONE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x21000000 openat(AT_FDCWD, "/dev/loop0", O_RDWR) = 3 ioctl(3, LOOP_CLR_FD) = -1 ENXIO (No such device or address) close(3) = 0 clone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD./strace-static-x86_64: Process 5106 attached [pid 5106] set_robust_list(0x5555765af660, 24) = 0 [pid 5106] prctl(PR_SET_PDEATHSIG, SIGKILL [pid 5104] <... clone resumed>, child_tidptr=0x5555765af650) = 5106 [pid 5106] <... prctl resumed>) = 0 [pid 5106] setpgid(0, 0) = 0 [pid 5106] openat(AT_FDCWD, "/proc/self/oom_score_adj", O_WRONLY|O_CLOEXEC) = 3 [pid 5106] write(3, "1000", 4) = 4 [pid 5106] close(3) = 0 [pid 5106] write(1, "executing program\n", 18executing program ) = 18 [pid 5106] memfd_create("syzkaller", 0) = 3 [pid 5106] mmap(NULL, 138412032, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f5b62400000 [pid 5106] write(3, "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"..., 16777216) = 16777216 [pid 5106] munmap(0x7f5b62400000, 138412032) = 0 [pid 5106] openat(AT_FDCWD, "/dev/loop0", O_RDWR) = 4 [pid 5106] ioctl(4, LOOP_SET_FD, 3) = 0 [pid 5106] close(3) = 0 [pid 5106] close(4) = 0 [pid 5106] mkdir("./file1", 0777) = 0 [ 63.330577][ T5106] loop0: detected capacity change from 0 to 32768 [ 63.364900][ T5106] bcachefs (/dev/loop0): error reading default superblock: Not a bcachefs superblock (got magic c68573f6-4e1a-4502-8265-f57f48ba6d81) [ 63.412307][ T5106] bcachefs (loop0): starting version 1.7: mi_btree_bitmap opts=metadata_checksum=none,data_checksum=none,compression=lz4,nojournal_transaction_names [ 63.428213][ T5106] bcachefs (loop0): recovering from clean shutdown, journal seq 13 [ 63.436496][ T5106] bcachefs (loop0): Doing compatible version upgrade from 1.7: mi_btree_bitmap to 1.9: disk_accounting_v2 [ 63.436496][ T5106] running recovery passes: check_allocations [ 63.455937][ T5106] BUG: sleeping function called from invalid context at include/linux/sched/mm.h:337 [ 63.465564][ T5106] in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 5106, name: syz-executor295 [ 63.475063][ T5106] preempt_count: 1, expected: 0 [ 63.479941][ T5106] RCU nest depth: 0, expected: 0 [ 63.484915][ T5106] 2 locks held by syz-executor295/5106: [ 63.490508][ T5106] #0: ffff88807a600278 (&c->state_lock){+.+.}-{3:3}, at: bch2_fs_start+0x45/0x5b0 [ 63.499926][ T5106] #1: ffff88807a64a880 (&j->lock){+.+.}-{2:2}, at: bch2_fs_journal_start+0x1219/0x14a0 [ 63.509741][ T5106] Preemption disabled at: [ 63.509753][ T5106] [<0000000000000000>] 0x0 [ 63.518538][ T5106] CPU: 0 UID: 0 PID: 5106 Comm: syz-executor295 Not tainted 6.10.0-next-20240718-syzkaller #0 [ 63.528862][ T5106] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/27/2024 [ 63.538939][ T5106] Call Trace: [ 63.542214][ T5106] [ 63.545136][ T5106] dump_stack_lvl+0x241/0x360 [ 63.549826][ T5106] ? __pfx_dump_stack_lvl+0x10/0x10 [ 63.555017][ T5106] ? __pfx__printk+0x10/0x10 [ 63.559612][ T5106] __might_resched+0x5d4/0x780 [ 63.564462][ T5106] ? __pfx___might_resched+0x10/0x10 [ 63.569761][ T5106] ? fs_reclaim_acquire+0x93/0x140 [ 63.574880][ T5106] __kmalloc_node_track_caller_noprof+0xcb/0x440 [ 63.581325][ T5106] ? bch2_printbuf_make_room+0x1f1/0x350 [ 63.586979][ T5106] krealloc_noprof+0x7d/0x120 [ 63.591661][ T5106] bch2_printbuf_make_room+0x1f1/0x350 [ 63.597209][ T5106] bch2_prt_printf+0x267/0x6d0 [ 63.601985][ T5106] ? bch2_journal_space_available+0x11c/0x1b00 [ 63.608159][ T5106] ? __pfx_bch2_prt_printf+0x10/0x10 [ 63.613460][ T5106] bch2_journal_space_available+0x89b/0x1b00 [ 63.619449][ T5106] ? poison_slab_object+0xe0/0x150 [ 63.624554][ T5106] ? __kasan_slab_free+0x37/0x60 [ 63.629479][ T5106] ? bch2_journal_space_available+0x11c/0x1b00 [ 63.635629][ T5106] ? __se_sys_mount+0x2d6/0x3c0 [ 63.640565][ T5106] ? __pfx_bch2_journal_space_available+0x10/0x10 [ 63.646975][ T5106] ? mark_lock+0x9a/0x360 [ 63.651303][ T5106] ? __lock_acquire+0x1384/0x2050 [ 63.656342][ T5106] ? kasan_quarantine_put+0xdc/0x230 [ 63.661623][ T5106] ? lockdep_hardirqs_on+0x99/0x150 [ 63.666820][ T5106] ? __pfx_lock_acquire+0x10/0x10 [ 63.671843][ T5106] ? do_raw_spin_lock+0x14f/0x370 [ 63.676871][ T5106] ? __pfx_do_raw_spin_lock+0x10/0x10 [ 63.682234][ T5106] ? __genradix_iter_peek+0x3d0/0x430 [ 63.687617][ T5106] bch2_fs_journal_start+0x1356/0x14a0 [ 63.693085][ T5106] ? __pfx_bch2_fs_journal_start+0x10/0x10 [ 63.698882][ T5106] ? journal_replay_entry_early+0x4d/0xb70 [ 63.704685][ T5106] ? __pfx_bch2_journal_log_msg+0x10/0x10 [ 63.710401][ T5106] ? bch2_recovery_passes_from_stable+0x104/0x120 [ 63.716818][ T5106] bch2_fs_recovery+0x1ec8/0x38d0 [ 63.721882][ T5106] ? __pfx_bch2_fs_recovery+0x10/0x10 [ 63.727269][ T5106] ? __pfx_lock_release+0x10/0x10 [ 63.732289][ T5106] ? bch2_get_next_online_dev+0x2b/0x4f0 [ 63.737913][ T5106] ? __pfx_lock_release+0x10/0x10 [ 63.742939][ T5106] ? bch2_get_next_online_dev+0x2b/0x4f0 [ 63.748565][ T5106] ? bch2_get_next_online_dev+0x4b9/0x4f0 [ 63.754272][ T5106] ? bch2_get_next_online_dev+0x2b/0x4f0 [ 63.759903][ T5106] ? llist_reverse_order+0x72/0x90 [ 63.765015][ T5106] bch2_fs_start+0x356/0x5b0 [ 63.769610][ T5106] bch2_fs_get_tree+0xd61/0x1700 [ 63.774555][ T5106] ? __pfx_bch2_parse_one_mount_opt+0x10/0x10 [ 63.780621][ T5106] ? __pfx_bch2_fs_get_tree+0x10/0x10 [ 63.786102][ T5106] ? generic_parse_monolithic+0x387/0x400 [ 63.791824][ T5106] ? apparmor_capable+0x13b/0x1b0 [ 63.796901][ T5106] ? bpf_lsm_capable+0x9/0x10 [ 63.801585][ T5106] vfs_get_tree+0x90/0x2a0 [ 63.806013][ T5106] do_new_mount+0x2be/0xb40 [ 63.810519][ T5106] ? __pfx_do_new_mount+0x10/0x10 [ 63.815567][ T5106] __se_sys_mount+0x2d6/0x3c0 [ 63.820397][ T5106] ? __pfx___se_sys_mount+0x10/0x10 [ 63.825603][ T5106] ? do_syscall_64+0x100/0x230 [ 63.830462][ T5106] ? __x64_sys_mount+0x20/0xc0 [ 63.835306][ T5106] do_syscall_64+0xf3/0x230 [ 63.839806][ T5106] ? clear_bhb_loop+0x35/0x90 [ 63.844478][ T5106] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 63.850457][ T5106] RIP: 0033:0x7f5b6a8b0dea [ 63.854861][ T5106] Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb a6 e8 5e 04 00 00 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 [ 63.874469][ T5106] RSP: 002b:00007ffd6b545d18 EFLAGS: 00000282 ORIG_RAX: 00000000000000a5 [ 63.882875][ T5106] RAX: ffffffffffffffda RBX: 00007ffd6b545d30 RCX: 00007f5b6a8b0dea [ 63.890838][ T5106] RDX: 0000000020000000 RSI: 000000002000f680 RDI: 00007ffd6b545d30 [ 63.898975][ T5106] RBP: 0000000000000004 R08: 00007ffd6b545d70 R09: 000000000000f626 [ 63.906943][ T5106] R10: 0000000000200012 R11: 0000000000000282 R12: 0000000000200012 [ 63.914901][ T5106] R13: 00007ffd6b545d70 R14: 0000000000000003 R15: 0000000001000000 [ 63.922876][ T5106] [ 63.926080][ T5106] bcachefs (loop0): insufficient writeable journal devices available: have 0, need 1 [ 63.926080][ T5106] rw journal devs: [ 63.950274][ T5106] bcachefs (loop0): accounting_read... done [ 63.956475][ T5106] bcachefs (loop0): alloc_read... done [ 63.962125][ T5106] bcachefs (loop0): stripes_read... done [ 63.967827][ T5106] bcachefs (loop0): snapshots_read... done [ 63.973987][ T5106] bcachefs (loop0): check_allocations... [ 63.976533][ T5106] btree ptr not marked in member info btree allocated bitmap [ 63.976553][ T5106] u64s 11 type btree_ptr_v2 SPOS_MAX len 0 ver 0: seq 1818ce08861e3527 written 40 min_key POS_MIN durability: 1 ptr: 0:26:0 gen 0, shutting down [ 64.005492][ T5106] bcachefs (loop0): inconsistency detected - emergency read only at journal seq 13 [ 64.015043][ T5106] bcachefs (loop0): bch2_gc_mark_key(): error fsck_errors_not_fixed [ 64.023120][ T5106] bcachefs (loop0): bch2_gc_btree(): error fsck_errors_not_fixed [ 64.031613][ T5106] bcachefs (loop0): bch2_gc_btrees(): error fsck_errors_not_fixed [ 64.040396][ T5106] bcachefs (loop0): bch2_check_allocations(): error fsck_errors_not_fixed [ 64.049913][ T5106] bcachefs (loop0): bch2_fs_recovery(): error fsck_errors_not_fixed [ 64.057906][ T5106] bcachefs (loop0): bch2_fs_start(): error starting filesystem fsck_errors_not_fixed [ 64.067456][ T5106] bcachefs (loop0): shutting down [ 64.081557][ T5106] bcachefs (loop0): shutdown complete [pid 5106] mount("/dev/loop0", "./file1", "bcachefs", MS_NOSUID|MS_SYNCHRONOUS|MS_RELATIME, "\xff") = -1 EINVAL (Invalid argument) [pid 5106] openat(AT_FDCWD, "/dev/loop0", O_RDWR) = 3 [pid 5106] ioctl(3, LOOP_CLR_FD) = 0 [ 64.274862][ T5106] bcachefs: bch2_fs_get_tree() error: fsck_errors_not_fixed [pid 5106] close(3) = 0 [pid 5106] exit_group(0) = ? [pid 5106] +++ exited with 0 +++ --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=5106, si_uid=0, si_status=0, si_utime=2 /* 0.02 s */, si_stime=67 /* 0.67 s */} --- restart_syscall(<... resuming interrupted clone ...>) = 0 openat(AT_FDCWD, "/dev/loop0", O_RDWR) = 3 ioctl(3, LOOP_CLR_FD) = -1 ENXIO (No such device or address) close(3) = 0 clone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD./strace-static-x86_64: Process 5116 attached , child_tidptr=0x5555765af650) = 5116 [pid 5116] set_robust_list(0x5555765af660, 24) = 0 [pid 5116] prctl(PR_SET_PDEATHSIG, SIGKILL) = 0 [pid 5116] setpgid(0, 0) = 0 [pid 5116] openat(AT_FDCWD, "/proc/self/oom_score_adj", O_WRONLY|O_CLOEXEC) = 3 [pid 5116] write(3, "1000", 4) = 4 [pid 5116] close(3) = 0 [pid 5116] write(1, "executing program\n", 18executing program ) = 18 [pid 5116] memfd_create("syzkaller", 0) = 3 [pid 5116] mmap(NULL, 138412032, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f5b62400000 [pid 5116] write(3, "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"..., 16777216) = 16777216 [pid 5116] munmap(0x7f5b62400000, 138412032) = 0 [pid 5116] openat(AT_FDCWD, "/dev/loop0", O_RDWR) = 4 [pid 5116] ioctl(4, LOOP_SET_FD, 3) = 0 [pid 5116] close(3) = 0 [pid 5116] close(4) = 0 [pid 5116] mkdir("./file1", 0777) = -1 EEXIST (File exists) [ 64.585145][ T5116] loop0: detected capacity change from 0 to 32768 [ 64.604962][ T5116] bcachefs (/dev/loop0): error reading default superblock: Not a bcachefs superblock (got magic c68573f6-4e1a-4502-8265-f57f48ba6d81) [ 64.647216][ T5116] bcachefs (loop0): starting version 1.7: mi_btree_bitmap opts=metadata_checksum=none,data_checksum=none,compression=lz4,nojournal_transaction_names [ 64.662572][ T5116] bcachefs (loop0): recovering from clean shutdown, journal seq 13 [ 64.670605][ T5116] bcachefs (loop0): Doing compatible version upgrade from 1.7: mi_btree_bitmap to 1.9: disk_accounting_v2 [ 64.670605][ T5116] running recovery passes: check_allocations [ 64.688811][ T5116] BUG: sleeping function called from invalid context at include/linux/sched/mm.h:337 [ 64.698354][ T5116] in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 5116, name: syz-executor295 [ 64.707844][ T5116] preempt_count: 1, expected: 0 [ 64.712718][ T5116] RCU nest depth: 0, expected: 0 [ 64.717747][ T5116] 2 locks held by syz-executor295/5116: [ 64.723346][ T5116] #0: ffff888077900278 (&c->state_lock){+.+.}-{3:3}, at: bch2_fs_start+0x45/0x5b0 [ 64.732776][ T5116] #1: ffff88807794a880 (&j->lock){+.+.}-{2:2}, at: bch2_fs_journal_start+0x1219/0x14a0 [ 64.742600][ T5116] Preemption disabled at: [ 64.742611][ T5116] [<0000000000000000>] 0x0 [ 64.751404][ T5116] CPU: 0 UID: 0 PID: 5116 Comm: syz-executor295 Tainted: G W 6.10.0-next-20240718-syzkaller #0 [ 64.763119][ T5116] Tainted: [W]=WARN [ 64.766924][ T5116] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/27/2024 [ 64.776990][ T5116] Call Trace: [ 64.780274][ T5116] [ 64.783210][ T5116] dump_stack_lvl+0x241/0x360 [ 64.787895][ T5116] ? __pfx_dump_stack_lvl+0x10/0x10 [ 64.793089][ T5116] ? __pfx__printk+0x10/0x10 [ 64.797694][ T5116] __might_resched+0x5d4/0x780 [ 64.802462][ T5116] ? __pfx___might_resched+0x10/0x10 [ 64.807747][ T5116] ? fs_reclaim_acquire+0x93/0x140 [ 64.812860][ T5116] __kmalloc_node_track_caller_noprof+0xcb/0x440 [ 64.819186][ T5116] ? bch2_printbuf_make_room+0x1f1/0x350 [ 64.824819][ T5116] krealloc_noprof+0x7d/0x120 [ 64.829607][ T5116] bch2_printbuf_make_room+0x1f1/0x350 [ 64.835092][ T5116] bch2_prt_printf+0x267/0x6d0 [ 64.839871][ T5116] ? bch2_journal_space_available+0x11c/0x1b00 [ 64.846047][ T5116] ? __pfx_bch2_prt_printf+0x10/0x10 [ 64.851344][ T5116] bch2_journal_space_available+0x89b/0x1b00 [ 64.857325][ T5116] ? kasan_save_track+0x51/0x80 [ 64.862207][ T5116] ? kasan_save_track+0x3f/0x80 [ 64.867071][ T5116] ? poison_slab_object+0xe0/0x150 [ 64.872354][ T5116] ? __kasan_slab_free+0x37/0x60 [ 64.877382][ T5116] ? bch2_journal_space_available+0x11c/0x1b00 [ 64.883537][ T5116] ? bch2_journal_log_msg+0xda/0x120 [ 64.888811][ T5116] ? bch2_fs_recovery+0x1e48/0x38d0 [ 64.894052][ T5116] ? bch2_fs_get_tree+0xd61/0x1700 [ 64.899176][ T5116] ? vfs_get_tree+0x90/0x2a0 [ 64.903758][ T5116] ? do_new_mount+0x2be/0xb40 [ 64.908447][ T5116] ? __se_sys_mount+0x2d6/0x3c0 [ 64.913323][ T5116] ? __pfx_bch2_journal_space_available+0x10/0x10 [ 64.919749][ T5116] ? mark_lock+0x9a/0x360 [ 64.924100][ T5116] ? __lock_acquire+0x1384/0x2050 [ 64.929246][ T5116] ? kasan_quarantine_put+0xdc/0x230 [ 64.934542][ T5116] ? lockdep_hardirqs_on+0x99/0x150 [ 64.939751][ T5116] ? __pfx_lock_acquire+0x10/0x10 [ 64.944793][ T5116] ? do_raw_spin_lock+0x14f/0x370 [ 64.949836][ T5116] ? __pfx_do_raw_spin_lock+0x10/0x10 [ 64.955212][ T5116] ? __genradix_iter_peek+0x3d0/0x430 [ 64.960611][ T5116] bch2_fs_journal_start+0x1356/0x14a0 [ 64.966124][ T5116] ? __pfx_bch2_fs_journal_start+0x10/0x10 [ 64.971928][ T5116] ? journal_replay_entry_early+0x4d/0xb70 [ 64.977739][ T5116] ? __pfx_bch2_journal_log_msg+0x10/0x10 [ 64.983461][ T5116] ? bch2_recovery_passes_from_stable+0x104/0x120 [ 64.989879][ T5116] bch2_fs_recovery+0x1ec8/0x38d0 [ 64.994913][ T5116] ? __pfx_bch2_fs_recovery+0x10/0x10 [ 65.000297][ T5116] ? __pfx_lock_release+0x10/0x10 [ 65.005315][ T5116] ? bch2_get_next_online_dev+0x2b/0x4f0 [ 65.010953][ T5116] ? __pfx_lock_release+0x10/0x10 [ 65.015998][ T5116] ? bch2_get_next_online_dev+0x2b/0x4f0 [ 65.021734][ T5116] ? bch2_get_next_online_dev+0x4b9/0x4f0 [ 65.027475][ T5116] ? bch2_get_next_online_dev+0x2b/0x4f0 [ 65.033122][ T5116] ? llist_reverse_order+0x72/0x90 [ 65.038241][ T5116] bch2_fs_start+0x356/0x5b0 [ 65.042835][ T5116] bch2_fs_get_tree+0xd61/0x1700 [ 65.047780][ T5116] ? __pfx_bch2_parse_one_mount_opt+0x10/0x10 [ 65.053848][ T5116] ? __pfx_bch2_fs_get_tree+0x10/0x10 [ 65.059240][ T5116] ? generic_parse_monolithic+0x387/0x400 [ 65.065046][ T5116] ? apparmor_capable+0x13b/0x1b0 [ 65.070068][ T5116] ? bpf_lsm_capable+0x9/0x10 [ 65.074741][ T5116] vfs_get_tree+0x90/0x2a0 [ 65.079152][ T5116] do_new_mount+0x2be/0xb40 [ 65.083651][ T5116] ? __pfx_do_new_mount+0x10/0x10 [ 65.088671][ T5116] __se_sys_mount+0x2d6/0x3c0 [ 65.093359][ T5116] ? __pfx___se_sys_mount+0x10/0x10 [ 65.098549][ T5116] ? do_syscall_64+0x100/0x230 [ 65.103314][ T5116] ? __x64_sys_mount+0x20/0xc0 [ 65.108073][ T5116] do_syscall_64+0xf3/0x230 [ 65.112574][ T5116] ? clear_bhb_loop+0x35/0x90 [ 65.117247][ T5116] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 65.123134][ T5116] RIP: 0033:0x7f5b6a8b0dea [ 65.127540][ T5116] Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb a6 e8 5e 04 00 00 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 [ 65.147136][ T5116] RSP: 002b:00007ffd6b545d18 EFLAGS: 00000282 ORIG_RAX: 00000000000000a5 [ 65.155718][ T5116] RAX: ffffffffffffffda RBX: 00007ffd6b545d30 RCX: 00007f5b6a8b0dea [ 65.163681][ T5116] RDX: 0000000020000000 RSI: 000000002000f680 RDI: 00007ffd6b545d30 [ 65.171643][ T5116] RBP: 0000000000000004 R08: 00007ffd6b545d70 R09: 000000000000f626 [ 65.179614][ T5116] R10: 0000000000200012 R11: 0000000000000282 R12: 0000000000200012 [ 65.187600][ T5116] R13: 00007ffd6b545d70 R14: 0000000000000003 R15: 0000000001000000 [ 65.195591][ T5116] [ 65.199026][ T5116] bcachefs (loop0): insufficient writeable journal devices available: have 0, need 1 [ 65.199026][ T5116] rw journal devs: [ 65.221183][ T5116] bcachefs (loop0): accounting_read... done [ 65.227138][ T5116] bcachefs (loop0): alloc_read... done [ 65.232905][ T5116] bcachefs (loop0): stripes_read... done [ 65.238592][ T5116] bcachefs (loop0): snapshots_read... done [ 65.244538][ T5116] bcachefs (loop0): check_allocations... [ 65.246358][ T5116] btree ptr not marked in member info btree allocated bitmap [ 65.246371][ T5116] u64s 11 type btree_ptr_v2 SPOS_MAX len 0 ver 0: seq 1818ce08861e3527 written 40 min_key POS_MIN durability: 1 ptr: 0:26:0 gen 0, shutting down [ 65.274440][ T5116] bcachefs (loop0): inconsistency detected - emergency read only at journal seq 13 [ 65.283894][ T5116] bcachefs (loop0): bch2_gc_mark_key(): error fsck_errors_not_fixed [ 65.291964][ T5116] bcachefs (loop0): bch2_gc_btree(): error fsck_errors_not_fixed [ 65.300142][ T5116] bcachefs (loop0): bch2_gc_btrees(): error fsck_errors_not_fixed [ 65.308002][ T5116] bcachefs (loop0): bch2_check_allocations(): error fsck_errors_not_fixed [ 65.316618][ T5116] bcachefs (loop0): bch2_fs_recovery(): error fsck_errors_not_fixed [ 65.324677][ T5116] bcachefs (loop0): bch2_fs_start(): error starting filesystem fsck_errors_not_fixed [ 65.334265][ T5116] bcachefs (loop0): shutting down [ 65.347343][ T5116] bcachefs (loop0): shutdown complete [pid 5116] mount("/dev/loop0", "./file1", "bcachefs", MS_NOSUID|MS_SYNCHRONOUS|MS_RELATIME, "\xff") = -1 EINVAL (Invalid argument) [pid 5116] openat(AT_FDCWD, "/dev/loop0", O_RDWR) = 3 [pid 5116] ioctl(3, LOOP_CLR_FD) = 0 [ 65.546725][ T5116] bcachefs: bch2_fs_get_tree() error: fsck_errors_not_fixed [pid 5116] close(3) = 0 [pid 5116] exit_group(0) = ? [pid 5116] +++ exited with 0 +++ --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=5116, si_uid=0, si_status=0, si_utime=3 /* 0.03 s */, si_stime=67 /* 0.67 s */} --- restart_syscall(<... resuming interrupted clone ...>) = 0 openat(AT_FDCWD, "/dev/loop0", O_RDWR) = 3 ioctl(3, LOOP_CLR_FD) = -1 ENXIO (No such device or address) close(3) = 0 clone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD./strace-static-x86_64: Process 5125 attached , child_tidptr=0x5555765af650) = 5125 [pid 5125] set_robust_list(0x5555765af660, 24) = 0 [pid 5125] prctl(PR_SET_PDEATHSIG, SIGKILL) = 0 [pid 5125] setpgid(0, 0) = 0 [pid 5125] openat(AT_FDCWD, "/proc/self/oom_score_adj", O_WRONLY|O_CLOEXEC) = 3 [pid 5125] write(3, "1000", 4) = 4 [pid 5125] close(3) = 0 executing program [pid 5125] write(1, "executing program\n", 18) = 18 [pid 5125] memfd_create("syzkaller", 0) = 3 [pid 5125] mmap(NULL, 138412032, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f5b62400000 [pid 5125] write(3, "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"..., 16777216) = 16777216 [pid 5125] munmap(0x7f5b62400000, 138412032) = 0 [pid 5125] openat(AT_FDCWD, "/dev/loop0", O_RDWR) = 4 [pid 5125] ioctl(4, LOOP_SET_FD, 3) = 0 [pid 5125] close(3) = 0 [pid 5125] close(4) = 0 [pid 5125] mkdir("./file1", 0777) = -1 EEXIST (File exists) [ 65.833166][ T5125] loop0: detected capacity change from 0 to 32768 [ 65.863946][ T5125] bcachefs (/dev/loop0): error reading default superblock: Not a bcachefs superblock (got magic c68573f6-4e1a-4502-8265-f57f48ba6d81) [ 65.906552][ T5125] bcachefs (loop0): starting version 1.7: mi_btree_bitmap opts=metadata_checksum=none,data_checksum=none,compression=lz4,nojournal_transaction_names [ 65.921928][ T5125] bcachefs (loop0): recovering from clean shutdown, journal seq 13 [ 65.930292][ T5125] bcachefs (loop0): Doing compatible version upgrade from 1.7: mi_btree_bitmap to 1.9: disk_accounting_v2 [ 65.930292][ T5125] running recovery passes: check_allocations [ 65.948916][ T5125] BUG: sleeping function called from invalid context at include/linux/sched/mm.h:337 [ 65.958429][ T5125] in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 5125, name: syz-executor295 [ 65.967926][ T5125] preempt_count: 1, expected: 0 [ 65.972832][ T5125] RCU nest depth: 0, expected: 0 [ 65.977756][ T5125] 2 locks held by syz-executor295/5125: [ 65.983341][ T5125] #0: ffff888077e80278 (&c->state_lock){+.+.}-{3:3}, at: bch2_fs_start+0x45/0x5b0 [ 65.992712][ T5125] #1: ffff888077eca880 (&j->lock){+.+.}-{2:2}, at: bch2_fs_journal_start+0x1219/0x14a0 [ 66.002494][ T5125] Preemption disabled at: [ 66.002506][ T5125] [<0000000000000000>] 0x0 [ 66.011268][ T5125] CPU: 0 UID: 0 PID: 5125 Comm: syz-executor295 Tainted: G W 6.10.0-next-20240718-syzkaller #0 [ 66.022985][ T5125] Tainted: [W]=WARN [ 66.026774][ T5125] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/27/2024 [ 66.036832][ T5125] Call Trace: [ 66.040109][ T5125] [ 66.043033][ T5125] dump_stack_lvl+0x241/0x360 [ 66.047737][ T5125] ? __pfx_dump_stack_lvl+0x10/0x10 [ 66.052952][ T5125] ? __pfx__printk+0x10/0x10 [ 66.057561][ T5125] __might_resched+0x5d4/0x780 [ 66.062444][ T5125] ? __pfx___might_resched+0x10/0x10 [ 66.067834][ T5125] ? fs_reclaim_acquire+0x93/0x140 [ 66.072957][ T5125] __kmalloc_node_track_caller_noprof+0xcb/0x440 [ 66.079285][ T5125] ? bch2_printbuf_make_room+0x1f1/0x350 [ 66.084916][ T5125] krealloc_noprof+0x7d/0x120 [ 66.089589][ T5125] bch2_printbuf_make_room+0x1f1/0x350 [ 66.095045][ T5125] bch2_prt_printf+0x267/0x6d0 [ 66.099801][ T5125] ? bch2_journal_space_available+0x11c/0x1b00 [ 66.105950][ T5125] ? __pfx_bch2_prt_printf+0x10/0x10 [ 66.111236][ T5125] bch2_journal_space_available+0x89b/0x1b00 [ 66.117210][ T5125] ? kasan_save_track+0x51/0x80 [ 66.122054][ T5125] ? kasan_save_track+0x3f/0x80 [ 66.126926][ T5125] ? poison_slab_object+0xe0/0x150 [ 66.132027][ T5125] ? __kasan_slab_free+0x37/0x60 [ 66.136953][ T5125] ? bch2_journal_space_available+0x11c/0x1b00 [ 66.143105][ T5125] ? bch2_journal_log_msg+0xda/0x120 [ 66.148382][ T5125] ? bch2_fs_recovery+0x1e48/0x38d0 [ 66.153629][ T5125] ? bch2_fs_get_tree+0xd61/0x1700 [ 66.158740][ T5125] ? vfs_get_tree+0x90/0x2a0 [ 66.163609][ T5125] ? do_new_mount+0x2be/0xb40 [ 66.168748][ T5125] ? __se_sys_mount+0x2d6/0x3c0 [ 66.173612][ T5125] ? __pfx_bch2_journal_space_available+0x10/0x10 [ 66.180053][ T5125] ? mark_lock+0x9a/0x360 [ 66.184399][ T5125] ? __lock_acquire+0x1384/0x2050 [ 66.189439][ T5125] ? kasan_quarantine_put+0xdc/0x230 [ 66.194752][ T5125] ? lockdep_hardirqs_on+0x99/0x150 [ 66.199967][ T5125] ? __pfx_lock_acquire+0x10/0x10 [ 66.205025][ T5125] ? do_raw_spin_lock+0x14f/0x370 [ 66.210051][ T5125] ? __pfx_do_raw_spin_lock+0x10/0x10 [ 66.215414][ T5125] ? __genradix_iter_peek+0x3d0/0x430 [ 66.220792][ T5125] bch2_fs_journal_start+0x1356/0x14a0 [ 66.226295][ T5125] ? __pfx_bch2_fs_journal_start+0x10/0x10 [ 66.232196][ T5125] ? journal_replay_entry_early+0x4d/0xb70 [ 66.238002][ T5125] ? __pfx_bch2_journal_log_msg+0x10/0x10 [ 66.243740][ T5125] ? bch2_recovery_passes_from_stable+0x104/0x120 [ 66.250183][ T5125] bch2_fs_recovery+0x1ec8/0x38d0 [ 66.255247][ T5125] ? __pfx_bch2_fs_recovery+0x10/0x10 [ 66.260988][ T5125] ? __pfx_lock_release+0x10/0x10 [ 66.266108][ T5125] ? bch2_get_next_online_dev+0x2b/0x4f0 [ 66.271747][ T5125] ? __pfx_lock_release+0x10/0x10 [ 66.276793][ T5125] ? bch2_get_next_online_dev+0x2b/0x4f0 [ 66.282429][ T5125] ? bch2_get_next_online_dev+0x4b9/0x4f0 [ 66.288223][ T5125] ? bch2_get_next_online_dev+0x2b/0x4f0 [ 66.293860][ T5125] ? llist_reverse_order+0x72/0x90 [ 66.298987][ T5125] bch2_fs_start+0x356/0x5b0 [ 66.303586][ T5125] bch2_fs_get_tree+0xd61/0x1700 [ 66.308534][ T5125] ? __pfx_bch2_parse_one_mount_opt+0x10/0x10 [ 66.314695][ T5125] ? __pfx_bch2_fs_get_tree+0x10/0x10 [ 66.320089][ T5125] ? generic_parse_monolithic+0x387/0x400 [ 66.325814][ T5125] ? apparmor_capable+0x13b/0x1b0 [ 66.330870][ T5125] ? bpf_lsm_capable+0x9/0x10 [ 66.335667][ T5125] vfs_get_tree+0x90/0x2a0 [ 66.340094][ T5125] do_new_mount+0x2be/0xb40 [ 66.344604][ T5125] ? __pfx_do_new_mount+0x10/0x10 [ 66.349635][ T5125] __se_sys_mount+0x2d6/0x3c0 [ 66.354314][ T5125] ? __pfx___se_sys_mount+0x10/0x10 [ 66.359504][ T5125] ? do_syscall_64+0x100/0x230 [ 66.364266][ T5125] ? __x64_sys_mount+0x20/0xc0 [ 66.369020][ T5125] do_syscall_64+0xf3/0x230 [ 66.373518][ T5125] ? clear_bhb_loop+0x35/0x90 [ 66.378188][ T5125] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 66.384159][ T5125] RIP: 0033:0x7f5b6a8b0dea [ 66.388564][ T5125] Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb a6 e8 5e 04 00 00 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 [ 66.408164][ T5125] RSP: 002b:00007ffd6b545d18 EFLAGS: 00000282 ORIG_RAX: 00000000000000a5 [ 66.416577][ T5125] RAX: ffffffffffffffda RBX: 00007ffd6b545d30 RCX: 00007f5b6a8b0dea [ 66.424543][ T5125] RDX: 0000000020000000 RSI: 000000002000f680 RDI: 00007ffd6b545d30 [ 66.432503][ T5125] RBP: 0000000000000004 R08: 00007ffd6b545d70 R09: 000000000000f626 [ 66.440464][ T5125] R10: 0000000000200012 R11: 0000000000000282 R12: 0000000000200012 [ 66.448423][ T5125] R13: 00007ffd6b545d70 R14: 0000000000000003 R15: 0000000001000000 [ 66.456398][ T5125] [ 66.459661][ T5125] bcachefs (loop0): insufficient writeable journal devices available: have 0, need 1 [ 66.459661][ T5125] rw journal devs: [ 66.481447][ T5125] bcachefs (loop0): accounting_read... done [ 66.487405][ T5125] bcachefs (loop0): alloc_read... done [ 66.492949][ T5125] bcachefs (loop0): stripes_read... done [ 66.498731][ T5125] bcachefs (loop0): snapshots_read... done [ 66.504645][ T5125] bcachefs (loop0): check_allocations... [ 66.505729][ T5125] btree ptr not marked in member info btree allocated bitmap [ 66.505740][ T5125] u64s 11 type btree_ptr_v2 SPOS_MAX len 0 ver 0: seq 1818ce08861e3527 written 40 min_key POS_MIN durability: 1 ptr: 0:26:0 gen 0, shutting down [ 66.534390][ T5125] bcachefs (loop0): inconsistency detected - emergency read only at journal seq 13 [ 66.543750][ T5125] bcachefs (loop0): bch2_gc_mark_key(): error fsck_errors_not_fixed [ 66.551785][ T5125] bcachefs (loop0): bch2_gc_btree(): error fsck_errors_not_fixed [ 66.559533][ T5125] bcachefs (loop0): bch2_gc_btrees(): error fsck_errors_not_fixed [ 66.567368][ T5125] bcachefs (loop0): bch2_check_allocations(): error fsck_errors_not_fixed [ 66.576028][ T5125] bcachefs (loop0): bch2_fs_recovery(): error fsck_errors_not_fixed [ 66.584089][ T5125] bcachefs (loop0): bch2_fs_start(): error starting filesystem fsck_errors_not_fixed [ 66.593777][ T5125] bcachefs (loop0): shutting down [ 66.606566][ T5125] bcachefs (loop0): shutdown complete [pid 5125] mount("/dev/loop0", "./file1", "bcachefs", MS_NOSUID|MS_SYNCHRONOUS|MS_RELATIME, "\xff") = -1 EINVAL (Invalid argument) [pid 5125] openat(AT_FDCWD, "/dev/loop0", O_RDWR) = 3 [pid 5125] ioctl(3, LOOP_CLR_FD) = 0 [ 66.819972][ T5125] bcachefs: bch2_fs_get_tree() error: fsck_errors_not_fixed [pid 5125] close(3) = 0 [pid 5125] exit_group(0) = ? [pid 5125] +++ exited with 0 +++ --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=5125, si_uid=0, si_status=0, si_utime=4 /* 0.04 s */, si_stime=67 /* 0.67 s */} --- restart_syscall(<... resuming interrupted clone ...>) = 0 openat(AT_FDCWD, "/dev/loop0", O_RDWR) = 3 ioctl(3, LOOP_CLR_FD) = -1 ENXIO (No such device or address) close(3) = 0 clone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD./strace-static-x86_64: Process 5134 attached [pid 5134] set_robust_list(0x5555765af660, 24) = 0 [pid 5134] prctl(PR_SET_PDEATHSIG, SIGKILL [pid 5104] <... clone resumed>, child_tidptr=0x5555765af650) = 5134 [pid 5134] <... prctl resumed>) = 0 [pid 5134] setpgid(0, 0) = 0 [pid 5134] openat(AT_FDCWD, "/proc/self/oom_score_adj", O_WRONLY|O_CLOEXEC) = 3 [pid 5134] write(3, "1000", 4) = 4 [pid 5134] close(3) = 0 [pid 5134] write(1, "executing program\n", 18executing program ) = 18 [pid 5134] memfd_create("syzkaller", 0) = 3 [pid 5134] mmap(NULL, 138412032, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f5b62400000 [pid 5134] write(3, "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"..., 16777216) = 16777216 [pid 5134] munmap(0x7f5b62400000, 138412032) = 0 [pid 5134] openat(AT_FDCWD, "/dev/loop0", O_RDWR) = 4 [pid 5134] ioctl(4, LOOP_SET_FD, 3) = 0 [pid 5134] close(3) = 0 [pid 5134] close(4) = 0 [pid 5134] mkdir("./file1", 0777) = -1 EEXIST (File exists) [ 67.140326][ T5134] loop0: detected capacity change from 0 to 32768 [ 67.150276][ T5134] bcachefs (/dev/loop0): error reading default superblock: Not a bcachefs superblock (got magic c68573f6-4e1a-4502-8265-f57f48ba6d81) [ 67.199243][ T5134] bcachefs (loop0): starting version 1.7: mi_btree_bitmap opts=metadata_checksum=none,data_checksum=none,compression=lz4,nojournal_transaction_names [ 67.214376][ T5134] bcachefs (loop0): recovering from clean shutdown, journal seq 13 [ 67.222379][ T5134] bcachefs (loop0): Doing compatible version upgrade from 1.7: mi_btree_bitmap to 1.9: disk_accounting_v2 [ 67.222379][ T5134] running recovery passes: check_allocations [ 67.240710][ T5134] BUG: sleeping function called from invalid context at include/linux/sched/mm.h:337 [ 67.250221][ T5134] in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 5134, name: syz-executor295 [ 67.259703][ T5134] preempt_count: 1, expected: 0 [ 67.264541][ T5134] RCU nest depth: 0, expected: 0 [ 67.269519][ T5134] 2 locks held by syz-executor295/5134: [ 67.275076][ T5134] #0: ffff888077e80278 (&c->state_lock){+.+.}-{3:3}, at: bch2_fs_start+0x45/0x5b0 [ 67.284747][ T5134] #1: ffff888077eca880 (&j->lock){+.+.}-{2:2}, at: bch2_fs_journal_start+0x1219/0x14a0 [ 67.294563][ T5134] Preemption disabled at: [ 67.294574][ T5134] [<0000000000000000>] 0x0 [ 67.303358][ T5134] CPU: 0 UID: 0 PID: 5134 Comm: syz-executor295 Tainted: G W 6.10.0-next-20240718-syzkaller #0 [ 67.315156][ T5134] Tainted: [W]=WARN [ 67.318970][ T5134] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/27/2024 [ 67.329041][ T5134] Call Trace: [ 67.332410][ T5134] [ 67.335327][ T5134] dump_stack_lvl+0x241/0x360 [ 67.340006][ T5134] ? __pfx_dump_stack_lvl+0x10/0x10 [ 67.345197][ T5134] ? __pfx__printk+0x10/0x10 [ 67.349788][ T5134] __might_resched+0x5d4/0x780 [ 67.354544][ T5134] ? __pfx___might_resched+0x10/0x10 [ 67.359821][ T5134] ? fs_reclaim_acquire+0x93/0x140 [ 67.364920][ T5134] __kmalloc_node_track_caller_noprof+0xcb/0x440 [ 67.371237][ T5134] ? bch2_printbuf_make_room+0x1f1/0x350 [ 67.376858][ T5134] krealloc_noprof+0x7d/0x120 [ 67.381530][ T5134] bch2_printbuf_make_room+0x1f1/0x350 [ 67.386979][ T5134] bch2_prt_printf+0x267/0x6d0 [ 67.391734][ T5134] ? bch2_journal_space_available+0x11c/0x1b00 [ 67.397878][ T5134] ? __pfx_bch2_prt_printf+0x10/0x10 [ 67.403185][ T5134] bch2_journal_space_available+0x89b/0x1b00 [ 67.409191][ T5134] ? kasan_save_track+0x51/0x80 [ 67.414055][ T5134] ? kasan_save_track+0x3f/0x80 [ 67.418928][ T5134] ? poison_slab_object+0xe0/0x150 [ 67.424045][ T5134] ? __kasan_slab_free+0x37/0x60 [ 67.428982][ T5134] ? bch2_journal_space_available+0x11c/0x1b00 [ 67.435151][ T5134] ? bch2_journal_log_msg+0xda/0x120 [ 67.440430][ T5134] ? bch2_fs_recovery+0x1e48/0x38d0 [ 67.445623][ T5134] ? bch2_fs_get_tree+0xd61/0x1700 [ 67.450814][ T5134] ? vfs_get_tree+0x90/0x2a0 [ 67.455413][ T5134] ? do_new_mount+0x2be/0xb40 [ 67.460112][ T5134] ? __se_sys_mount+0x2d6/0x3c0 [ 67.464979][ T5134] ? __pfx_bch2_journal_space_available+0x10/0x10 [ 67.471404][ T5134] ? mark_lock+0x9a/0x360 [ 67.475739][ T5134] ? __lock_acquire+0x1384/0x2050 [ 67.480775][ T5134] ? kasan_quarantine_put+0xdc/0x230 [ 67.486056][ T5134] ? lockdep_hardirqs_on+0x99/0x150 [ 67.491254][ T5134] ? __pfx_lock_acquire+0x10/0x10 [ 67.496273][ T5134] ? do_raw_spin_lock+0x14f/0x370 [ 67.501294][ T5134] ? __pfx_do_raw_spin_lock+0x10/0x10 [ 67.506656][ T5134] ? __genradix_iter_peek+0x3d0/0x430 [ 67.512031][ T5134] bch2_fs_journal_start+0x1356/0x14a0 [ 67.517499][ T5134] ? __pfx_bch2_fs_journal_start+0x10/0x10 [ 67.523295][ T5134] ? journal_replay_entry_early+0x4d/0xb70 [ 67.529097][ T5134] ? __pfx_bch2_journal_log_msg+0x10/0x10 [ 67.534809][ T5134] ? bch2_recovery_passes_from_stable+0x104/0x120 [ 67.541221][ T5134] bch2_fs_recovery+0x1ec8/0x38d0 [ 67.546252][ T5134] ? __pfx_bch2_fs_recovery+0x10/0x10 [ 67.551635][ T5134] ? __pfx_lock_release+0x10/0x10 [ 67.556656][ T5134] ? bch2_get_next_online_dev+0x2b/0x4f0 [ 67.562288][ T5134] ? __pfx_lock_release+0x10/0x10 [ 67.567328][ T5134] ? bch2_get_next_online_dev+0x2b/0x4f0 [ 67.572975][ T5134] ? bch2_get_next_online_dev+0x4b9/0x4f0 [ 67.578793][ T5134] ? bch2_get_next_online_dev+0x2b/0x4f0 [ 67.584445][ T5134] ? llist_reverse_order+0x72/0x90 [ 67.589577][ T5134] bch2_fs_start+0x356/0x5b0 [ 67.594180][ T5134] bch2_fs_get_tree+0xd61/0x1700 [ 67.599146][ T5134] ? __pfx_bch2_parse_one_mount_opt+0x10/0x10 [ 67.605219][ T5134] ? __pfx_bch2_fs_get_tree+0x10/0x10 [ 67.610599][ T5134] ? generic_parse_monolithic+0x387/0x400 [ 67.616317][ T5134] ? apparmor_capable+0x13b/0x1b0 [ 67.621340][ T5134] ? bpf_lsm_capable+0x9/0x10 [ 67.626012][ T5134] vfs_get_tree+0x90/0x2a0 [ 67.630426][ T5134] do_new_mount+0x2be/0xb40 [ 67.634932][ T5134] ? __pfx_do_new_mount+0x10/0x10 [ 67.639954][ T5134] __se_sys_mount+0x2d6/0x3c0 [ 67.644646][ T5134] ? __pfx___se_sys_mount+0x10/0x10 [ 67.649835][ T5134] ? do_syscall_64+0x100/0x230 [ 67.654600][ T5134] ? __x64_sys_mount+0x20/0xc0 [ 67.659444][ T5134] do_syscall_64+0xf3/0x230 [ 67.663947][ T5134] ? clear_bhb_loop+0x35/0x90 [ 67.668619][ T5134] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 67.674511][ T5134] RIP: 0033:0x7f5b6a8b0dea [ 67.678914][ T5134] Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb a6 e8 5e 04 00 00 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 [ 67.698594][ T5134] RSP: 002b:00007ffd6b545d18 EFLAGS: 00000282 ORIG_RAX: 00000000000000a5 [ 67.707000][ T5134] RAX: ffffffffffffffda RBX: 00007ffd6b545d30 RCX: 00007f5b6a8b0dea [ 67.714962][ T5134] RDX: 0000000020000000 RSI: 000000002000f680 RDI: 00007ffd6b545d30 [ 67.722922][ T5134] RBP: 0000000000000004 R08: 00007ffd6b545d70 R09: 000000000000f626 [ 67.730882][ T5134] R10: 0000000000200012 R11: 0000000000000282 R12: 0000000000200012 [ 67.738840][ T5134] R13: 00007ffd6b545d70 R14: 0000000000000003 R15: 0000000001000000 [ 67.746811][ T5134] [ 67.750075][ T5134] bcachefs (loop0): insufficient writeable journal devices available: have 0, need 1 [ 67.750075][ T5134] rw journal devs: [ 67.772273][ T5134] bcachefs (loop0): accounting_read... done [ 67.778232][ T5134] bcachefs (loop0): alloc_read... done [ 67.783791][ T5134] bcachefs (loop0): stripes_read... done [ 67.789501][ T5134] bcachefs (loop0): snapshots_read... done [ 67.795385][ T5134] bcachefs (loop0): check_allocations... [ 67.796493][ T5134] btree ptr not marked in member info btree allocated bitmap [ 67.796505][ T5134] u64s 11 type btree_ptr_v2 SPOS_MAX len 0 ver 0: seq 1818ce08861e3527 written 40 min_key POS_MIN durability: 1 ptr: 0:26:0 gen 0, shutting down [ 67.824637][ T5134] bcachefs (loop0): inconsistency detected - emergency read only at journal seq 13 [ 67.834003][ T5134] bcachefs (loop0): bch2_gc_mark_key(): error fsck_errors_not_fixed [ 67.842033][ T5134] bcachefs (loop0): bch2_gc_btree(): error fsck_errors_not_fixed [ 67.849784][ T5134] bcachefs (loop0): bch2_gc_btrees(): error fsck_errors_not_fixed [ 67.857615][ T5134] bcachefs (loop0): bch2_check_allocations(): error fsck_errors_not_fixed [ 67.866225][ T5134] bcachefs (loop0): bch2_fs_recovery(): error fsck_errors_not_fixed [ 67.874279][ T5134] bcachefs (loop0): bch2_fs_start(): error starting filesystem fsck_errors_not_fixed [ 67.883843][ T5134] bcachefs (loop0): shutting down [ 67.897184][ T5134] bcachefs (loop0): shutdown complete [pid 5134] mount("/dev/loop0", "./file1", "bcachefs", MS_NOSUID|MS_SYNCHRONOUS|MS_RELATIME, "\xff") = -1 EINVAL (Invalid argument) [pid 5134] openat(AT_FDCWD, "/dev/loop0", O_RDWR) = 3 [pid 5134] ioctl(3, LOOP_CLR_FD) = 0 [ 68.082300][ T5134] bcachefs: bch2_fs_get_tree() error: fsck_errors_not_fixed [pid 5134] close(3) = 0 [pid 5134] exit_group(0) = ? [pid 5134] +++ exited with 0 +++ --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=5134, si_uid=0, si_status=0, si_utime=3 /* 0.03 s */, si_stime=63 /* 0.63 s */} --- restart_syscall(<... resuming interrupted clone ...>) = 0 openat(AT_FDCWD, "/dev/loop0", O_RDWR) = 3 ioctl(3, LOOP_CLR_FD) = -1 ENXIO (No such device or address) close(3) = 0 clone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD./strace-static-x86_64: Process 5143 attached [pid 5143] set_robust_list(0x5555765af660, 24) = 0 [pid 5143] prctl(PR_SET_PDEATHSIG, SIGKILL [pid 5104] <... clone resumed>, child_tidptr=0x5555765af650) = 5143 [pid 5143] <... prctl resumed>) = 0 [pid 5143] setpgid(0, 0) = 0 [pid 5143] openat(AT_FDCWD, "/proc/self/oom_score_adj", O_WRONLY|O_CLOEXEC) = 3 [pid 5143] write(3, "1000", 4) = 4 executing program [pid 5143] close(3) = 0 [pid 5143] write(1, "executing program\n", 18) = 18 [pid 5143] memfd_create("syzkaller", 0) = 3 [pid 5143] mmap(NULL, 138412032, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f5b62400000 [pid 5143] write(3, "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"..., 16777216) = 16777216 [pid 5143] munmap(0x7f5b62400000, 138412032) = 0 [pid 5143] openat(AT_FDCWD, "/dev/loop0", O_RDWR) = 4 [pid 5143] ioctl(4, LOOP_SET_FD, 3) = 0 [pid 5143] close(3) = 0 [pid 5143] close(4) = 0 [pid 5143] mkdir("./file1", 0777) = -1 EEXIST (File exists) [ 68.398319][ T5143] loop0: detected capacity change from 0 to 32768 [ 68.420089][ T5143] bcachefs (/dev/loop0): error reading default superblock: Not a bcachefs superblock (got magic c68573f6-4e1a-4502-8265-f57f48ba6d81) [ 68.465494][ T5143] bcachefs (loop0): starting version 1.7: mi_btree_bitmap opts=metadata_checksum=none,data_checksum=none,compression=lz4,nojournal_transaction_names [ 68.480785][ T5143] bcachefs (loop0): recovering from clean shutdown, journal seq 13 [ 68.488727][ T5143] bcachefs (loop0): Doing compatible version upgrade from 1.7: mi_btree_bitmap to 1.9: disk_accounting_v2 [ 68.488727][ T5143] running recovery passes: check_allocations [ 68.507404][ T5143] BUG: sleeping function called from invalid context at include/linux/sched/mm.h:337 [ 68.516956][ T5143] in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 5143, name: syz-executor295 [ 68.526490][ T5143] preempt_count: 1, expected: 0 [ 68.531385][ T5143] RCU nest depth: 0, expected: 0 [ 68.536327][ T5143] 2 locks held by syz-executor295/5143: [ 68.541949][ T5143] #0: ffff888077e80278 (&c->state_lock){+.+.}-{3:3}, at: bch2_fs_start+0x45/0x5b0 [ 68.551371][ T5143] #1: ffff888077eca880 (&j->lock){+.+.}-{2:2}, at: bch2_fs_journal_start+0x1219/0x14a0 [ 68.561268][ T5143] Preemption disabled at: [ 68.561280][ T5143] [<0000000000000000>] 0x0 [ 68.570045][ T5143] CPU: 1 UID: 0 PID: 5143 Comm: syz-executor295 Tainted: G W 6.10.0-next-20240718-syzkaller #0 [ 68.581773][ T5143] Tainted: [W]=WARN [ 68.585586][ T5143] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/27/2024 [ 68.595624][ T5143] Call Trace: [ 68.598887][ T5143] [ 68.601807][ T5143] dump_stack_lvl+0x241/0x360 [ 68.606479][ T5143] ? __pfx_dump_stack_lvl+0x10/0x10 [ 68.611685][ T5143] ? __pfx__printk+0x10/0x10 [ 68.616269][ T5143] __might_resched+0x5d4/0x780 [ 68.621031][ T5143] ? __pfx___might_resched+0x10/0x10 [ 68.626490][ T5143] ? fs_reclaim_acquire+0x93/0x140 [ 68.631767][ T5143] __kmalloc_node_track_caller_noprof+0xcb/0x440 [ 68.638089][ T5143] ? bch2_printbuf_make_room+0x1f1/0x350 [ 68.643715][ T5143] krealloc_noprof+0x7d/0x120 [ 68.648385][ T5143] bch2_printbuf_make_room+0x1f1/0x350 [ 68.653832][ T5143] bch2_prt_printf+0x267/0x6d0 [ 68.658584][ T5143] ? bch2_journal_space_available+0x11c/0x1b00 [ 68.664731][ T5143] ? __pfx_bch2_prt_printf+0x10/0x10 [ 68.670448][ T5143] bch2_journal_space_available+0x89b/0x1b00 [ 68.676423][ T5143] ? kasan_save_track+0x51/0x80 [ 68.681268][ T5143] ? kasan_save_track+0x3f/0x80 [ 68.686118][ T5143] ? poison_slab_object+0xe0/0x150 [ 68.691221][ T5143] ? __kasan_slab_free+0x37/0x60 [ 68.696147][ T5143] ? bch2_journal_space_available+0x11c/0x1b00 [ 68.702298][ T5143] ? bch2_journal_log_msg+0xda/0x120 [ 68.707594][ T5143] ? bch2_fs_recovery+0x1e48/0x38d0 [ 68.712789][ T5143] ? bch2_fs_get_tree+0xd61/0x1700 [ 68.717895][ T5143] ? vfs_get_tree+0x90/0x2a0 [ 68.722476][ T5143] ? do_new_mount+0x2be/0xb40 [ 68.727144][ T5143] ? __se_sys_mount+0x2d6/0x3c0 [ 68.731989][ T5143] ? __pfx_bch2_journal_space_available+0x10/0x10 [ 68.738402][ T5143] ? mark_lock+0x9a/0x360 [ 68.742815][ T5143] ? __lock_acquire+0x1384/0x2050 [ 68.747848][ T5143] ? kasan_quarantine_put+0xdc/0x230 [ 68.753131][ T5143] ? lockdep_hardirqs_on+0x99/0x150 [ 68.758326][ T5143] ? __pfx_lock_acquire+0x10/0x10 [ 68.763348][ T5143] ? do_raw_spin_lock+0x14f/0x370 [ 68.768369][ T5143] ? __pfx_do_raw_spin_lock+0x10/0x10 [ 68.773745][ T5143] ? __genradix_iter_peek+0x3d0/0x430 [ 68.779118][ T5143] bch2_fs_journal_start+0x1356/0x14a0 [ 68.784584][ T5143] ? __pfx_bch2_fs_journal_start+0x10/0x10 [ 68.790387][ T5143] ? journal_replay_entry_early+0x4d/0xb70 [ 68.796187][ T5143] ? __pfx_bch2_journal_log_msg+0x10/0x10 [ 68.801918][ T5143] ? bch2_recovery_passes_from_stable+0x104/0x120 [ 68.808371][ T5143] bch2_fs_recovery+0x1ec8/0x38d0 [ 68.813421][ T5143] ? __pfx_bch2_fs_recovery+0x10/0x10 [ 68.818813][ T5143] ? __pfx_lock_release+0x10/0x10 [ 68.823837][ T5143] ? bch2_get_next_online_dev+0x2b/0x4f0 [ 68.829470][ T5143] ? __pfx_lock_release+0x10/0x10 [ 68.834504][ T5143] ? bch2_get_next_online_dev+0x2b/0x4f0 [ 68.840128][ T5143] ? bch2_get_next_online_dev+0x4b9/0x4f0 [ 68.845836][ T5143] ? bch2_get_next_online_dev+0x2b/0x4f0 [ 68.851467][ T5143] ? llist_reverse_order+0x72/0x90 [ 68.856588][ T5143] bch2_fs_start+0x356/0x5b0 [ 68.861265][ T5143] bch2_fs_get_tree+0xd61/0x1700 [ 68.866207][ T5143] ? __pfx_bch2_parse_one_mount_opt+0x10/0x10 [ 68.872270][ T5143] ? __pfx_bch2_fs_get_tree+0x10/0x10 [ 68.877649][ T5143] ? generic_parse_monolithic+0x387/0x400 [ 68.883369][ T5143] ? apparmor_capable+0x13b/0x1b0 [ 68.888388][ T5143] ? bpf_lsm_capable+0x9/0x10 [ 68.893062][ T5143] vfs_get_tree+0x90/0x2a0 [ 68.897477][ T5143] do_new_mount+0x2be/0xb40 [ 68.901974][ T5143] ? __pfx_do_new_mount+0x10/0x10 [ 68.906997][ T5143] __se_sys_mount+0x2d6/0x3c0 [ 68.911755][ T5143] ? __pfx___se_sys_mount+0x10/0x10 [ 68.916945][ T5143] ? do_syscall_64+0x100/0x230 [ 68.921707][ T5143] ? __x64_sys_mount+0x20/0xc0 [ 68.926461][ T5143] do_syscall_64+0xf3/0x230 [ 68.930963][ T5143] ? clear_bhb_loop+0x35/0x90 [ 68.935635][ T5143] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 68.941521][ T5143] RIP: 0033:0x7f5b6a8b0dea [ 68.945927][ T5143] Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb a6 e8 5e 04 00 00 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 [ 68.965526][ T5143] RSP: 002b:00007ffd6b545d18 EFLAGS: 00000282 ORIG_RAX: 00000000000000a5 [ 68.973932][ T5143] RAX: ffffffffffffffda RBX: 00007ffd6b545d30 RCX: 00007f5b6a8b0dea [ 68.981899][ T5143] RDX: 0000000020000000 RSI: 000000002000f680 RDI: 00007ffd6b545d30 [ 68.989867][ T5143] RBP: 0000000000000004 R08: 00007ffd6b545d70 R09: 000000000000f626 [ 68.997825][ T5143] R10: 0000000000200012 R11: 0000000000000282 R12: 0000000000200012 [ 69.005794][ T5143] R13: 00007ffd6b545d70 R14: 0000000000000003 R15: 0000000001000000 [ 69.013767][ T5143] [ 69.017096][ T5143] bcachefs (loop0): insufficient writeable journal devices available: have 0, need 1 [ 69.017096][ T5143] rw journal devs: [ 69.039041][ T5143] bcachefs (loop0): accounting_read... done [ 69.045027][ T5143] bcachefs (loop0): alloc_read... done [ 69.050766][ T5143] bcachefs (loop0): stripes_read... done [ 69.056469][ T5143] bcachefs (loop0): snapshots_read... done [ 69.062420][ T5143] bcachefs (loop0): check_allocations... [ 69.063540][ T5143] btree ptr not marked in member info btree allocated bitmap [ 69.063552][ T5143] u64s 11 type btree_ptr_v2 SPOS_MAX len 0 ver 0: seq 1818ce08861e3527 written 40 min_key POS_MIN durability: 1 ptr: 0:26:0 gen 0, shutting down [ 69.091986][ T5143] bcachefs (loop0): inconsistency detected - emergency read only at journal seq 13 [ 69.101351][ T5143] bcachefs (loop0): bch2_gc_mark_key(): error fsck_errors_not_fixed [ 69.109477][ T5143] bcachefs (loop0): bch2_gc_btree(): error fsck_errors_not_fixed [ 69.117200][ T5143] bcachefs (loop0): bch2_gc_btrees(): error fsck_errors_not_fixed [ 69.125086][ T5143] bcachefs (loop0): bch2_check_allocations(): error fsck_errors_not_fixed [ 69.133668][ T5143] bcachefs (loop0): bch2_fs_recovery(): error fsck_errors_not_fixed [ 69.141718][ T5143] bcachefs (loop0): bch2_fs_start(): error starting filesystem fsck_errors_not_fixed [ 69.151254][ T5143] bcachefs (loop0): shutting down [ 69.164225][ T5143] bcachefs (loop0): shutdown complete [pid 5143] mount("/dev/loop0", "./file1", "bcachefs", MS_NOSUID|MS_SYNCHRONOUS|MS_RELATIME, "\xff") = -1 EINVAL (Invalid argument) [pid 5143] openat(AT_FDCWD, "/dev/loop0", O_RDWR) = 3 [pid 5143] ioctl(3, LOOP_CLR_FD) = 0 [ 69.366489][ T5143] bcachefs: bch2_fs_get_tree() error: fsck_errors_not_fixed [pid 5143] close(3) = 0 [pid 5143] exit_group(0) = ? [pid 5143] +++ exited with 0 +++ --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=5143, si_uid=0, si_status=0, si_utime=4 /* 0.04 s */, si_stime=65 /* 0.65 s */} --- restart_syscall(<... resuming interrupted clone ...>) = 0 openat(AT_FDCWD, "/dev/loop0", O_RDWR) = 3 ioctl(3, LOOP_CLR_FD) = -1 ENXIO (No such device or address) close(3) = 0 clone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD./strace-static-x86_64: Process 5152 attached , child_tidptr=0x5555765af650) = 5152 [pid 5152] set_robust_list(0x5555765af660, 24) = 0 [pid 5152] prctl(PR_SET_PDEATHSIG, SIGKILL) = 0 [pid 5152] setpgid(0, 0) = 0 [pid 5152] openat(AT_FDCWD, "/proc/self/oom_score_adj", O_WRONLY|O_CLOEXEC) = 3 [pid 5152] write(3, "1000", 4) = 4 [pid 5152] close(3) = 0 [pid 5152] write(1, "executing program\n", 18executing program ) = 18 [pid 5152] memfd_create("syzkaller", 0) = 3 [pid 5152] mmap(NULL, 138412032, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f5b62400000 [pid 5152] write(3, "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"..., 16777216) = 16777216 [pid 5152] munmap(0x7f5b62400000, 138412032) = 0 [pid 5152] openat(AT_FDCWD, "/dev/loop0", O_RDWR) = 4 [pid 5152] ioctl(4, LOOP_SET_FD, 3) = 0 [pid 5152] close(3) = 0 [pid 5152] close(4) = 0 [pid 5152] mkdir("./file1", 0777) = -1 EEXIST (File exists) [ 69.685421][ T5152] loop0: detected capacity change from 0 to 32768 [ 69.695487][ T5152] bcachefs (/dev/loop0): error reading default superblock: Not a bcachefs superblock (got magic c68573f6-4e1a-4502-8265-f57f48ba6d81) [ 69.756072][ T5152] bcachefs (loop0): starting version 1.7: mi_btree_bitmap opts=metadata_checksum=none,data_checksum=none,compression=lz4,nojournal_transaction_names [ 69.771440][ T5152] bcachefs (loop0): recovering from clean shutdown, journal seq 13 [ 69.779600][ T5152] bcachefs (loop0): Doing compatible version upgrade from 1.7: mi_btree_bitmap to 1.9: disk_accounting_v2 [ 69.779600][ T5152] running recovery passes: check_allocations [ 69.797793][ T5152] BUG: sleeping function called from invalid context at include/linux/sched/mm.h:337 [ 69.807323][ T5152] in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 5152, name: syz-executor295 [ 69.816926][ T5152] preempt_count: 1, expected: 0 [ 69.821870][ T5152] RCU nest depth: 0, expected: 0 [ 69.826821][ T5152] 2 locks held by syz-executor295/5152: [ 69.832402][ T5152] #0: ffff888077900278 (&c->state_lock){+.+.}-{3:3}, at: bch2_fs_start+0x45/0x5b0 [ 69.841793][ T5152] #1: ffff88807794a880 (&j->lock){+.+.}-{2:2}, at: bch2_fs_journal_start+0x1219/0x14a0 [ 69.851628][ T5152] Preemption disabled at: [ 69.851640][ T5152] [<0000000000000000>] 0x0 [ 69.860506][ T5152] CPU: 0 UID: 0 PID: 5152 Comm: syz-executor295 Tainted: G W 6.10.0-next-20240718-syzkaller #0 [ 69.872316][ T5152] Tainted: [W]=WARN [ 69.876129][ T5152] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/27/2024 [ 69.886191][ T5152] Call Trace: [ 69.889466][ T5152] [ 69.892385][ T5152] dump_stack_lvl+0x241/0x360 [ 69.897079][ T5152] ? __pfx_dump_stack_lvl+0x10/0x10 [ 69.902272][ T5152] ? __pfx__printk+0x10/0x10 [ 69.906862][ T5152] __might_resched+0x5d4/0x780 [ 69.911633][ T5152] ? __pfx___might_resched+0x10/0x10 [ 69.916916][ T5152] ? fs_reclaim_acquire+0x93/0x140 [ 69.922038][ T5152] __kmalloc_node_track_caller_noprof+0xcb/0x440 [ 69.928530][ T5152] ? bch2_printbuf_make_room+0x1f1/0x350 [ 69.934156][ T5152] krealloc_noprof+0x7d/0x120 [ 69.938826][ T5152] bch2_printbuf_make_room+0x1f1/0x350 [ 69.944273][ T5152] bch2_prt_printf+0x267/0x6d0 [ 69.949046][ T5152] ? bch2_journal_space_available+0x11c/0x1b00 [ 69.955229][ T5152] ? __pfx_bch2_prt_printf+0x10/0x10 [ 69.960536][ T5152] bch2_journal_space_available+0x89b/0x1b00 [ 69.966525][ T5152] ? kasan_save_track+0x51/0x80 [ 69.971375][ T5152] ? kasan_save_track+0x3f/0x80 [ 69.976220][ T5152] ? poison_slab_object+0xe0/0x150 [ 69.981317][ T5152] ? __kasan_slab_free+0x37/0x60 [ 69.986241][ T5152] ? bch2_journal_space_available+0x11c/0x1b00 [ 69.992388][ T5152] ? bch2_journal_log_msg+0xda/0x120 [ 69.997661][ T5152] ? bch2_fs_recovery+0x1e48/0x38d0 [ 70.002874][ T5152] ? bch2_fs_get_tree+0xd61/0x1700 [ 70.007979][ T5152] ? vfs_get_tree+0x90/0x2a0 [ 70.012558][ T5152] ? do_new_mount+0x2be/0xb40 [ 70.017222][ T5152] ? __se_sys_mount+0x2d6/0x3c0 [ 70.022061][ T5152] ? __pfx_bch2_journal_space_available+0x10/0x10 [ 70.028568][ T5152] ? mark_lock+0x9a/0x360 [ 70.032896][ T5152] ? __lock_acquire+0x1384/0x2050 [ 70.037934][ T5152] ? kasan_quarantine_put+0xdc/0x230 [ 70.043212][ T5152] ? lockdep_hardirqs_on+0x99/0x150 [ 70.048407][ T5152] ? __pfx_lock_acquire+0x10/0x10 [ 70.053434][ T5152] ? do_raw_spin_lock+0x14f/0x370 [ 70.058466][ T5152] ? __pfx_do_raw_spin_lock+0x10/0x10 [ 70.063889][ T5152] ? __genradix_iter_peek+0x3d0/0x430 [ 70.069282][ T5152] bch2_fs_journal_start+0x1356/0x14a0 [ 70.074847][ T5152] ? __pfx_bch2_fs_journal_start+0x10/0x10 [ 70.080754][ T5152] ? journal_replay_entry_early+0x4d/0xb70 [ 70.086582][ T5152] ? __pfx_bch2_journal_log_msg+0x10/0x10 [ 70.092330][ T5152] ? bch2_recovery_passes_from_stable+0x104/0x120 [ 70.098839][ T5152] bch2_fs_recovery+0x1ec8/0x38d0 [ 70.103894][ T5152] ? __pfx_bch2_fs_recovery+0x10/0x10 [ 70.109504][ T5152] ? __pfx_lock_release+0x10/0x10 [ 70.114563][ T5152] ? bch2_get_next_online_dev+0x2b/0x4f0 [ 70.120221][ T5152] ? __pfx_lock_release+0x10/0x10 [ 70.125275][ T5152] ? bch2_get_next_online_dev+0x2b/0x4f0 [ 70.130913][ T5152] ? bch2_get_next_online_dev+0x4b9/0x4f0 [ 70.136635][ T5152] ? bch2_get_next_online_dev+0x2b/0x4f0 [ 70.142362][ T5152] ? llist_reverse_order+0x72/0x90 [ 70.147475][ T5152] bch2_fs_start+0x356/0x5b0 [ 70.152066][ T5152] bch2_fs_get_tree+0xd61/0x1700 [ 70.157014][ T5152] ? __pfx_bch2_parse_one_mount_opt+0x10/0x10 [ 70.163076][ T5152] ? __pfx_bch2_fs_get_tree+0x10/0x10 [ 70.168458][ T5152] ? generic_parse_monolithic+0x387/0x400 [ 70.174192][ T5152] ? apparmor_capable+0x13b/0x1b0 [ 70.179258][ T5152] ? bpf_lsm_capable+0x9/0x10 [ 70.183955][ T5152] vfs_get_tree+0x90/0x2a0 [ 70.188469][ T5152] do_new_mount+0x2be/0xb40 [ 70.192990][ T5152] ? __pfx_do_new_mount+0x10/0x10 [ 70.198027][ T5152] __se_sys_mount+0x2d6/0x3c0 [ 70.202734][ T5152] ? __pfx___se_sys_mount+0x10/0x10 [ 70.207943][ T5152] ? do_syscall_64+0x100/0x230 [ 70.212781][ T5152] ? __x64_sys_mount+0x20/0xc0 [ 70.217570][ T5152] do_syscall_64+0xf3/0x230 [ 70.222086][ T5152] ? clear_bhb_loop+0x35/0x90 [ 70.226779][ T5152] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 70.232704][ T5152] RIP: 0033:0x7f5b6a8b0dea [ 70.237145][ T5152] Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb a6 e8 5e 04 00 00 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 [ 70.256865][ T5152] RSP: 002b:00007ffd6b545d18 EFLAGS: 00000282 ORIG_RAX: 00000000000000a5 [ 70.265287][ T5152] RAX: ffffffffffffffda RBX: 00007ffd6b545d30 RCX: 00007f5b6a8b0dea [ 70.273433][ T5152] RDX: 0000000020000000 RSI: 000000002000f680 RDI: 00007ffd6b545d30 [ 70.281417][ T5152] RBP: 0000000000000004 R08: 00007ffd6b545d70 R09: 000000000000f626 [ 70.289482][ T5152] R10: 0000000000200012 R11: 0000000000000282 R12: 0000000000200012 [ 70.297453][ T5152] R13: 00007ffd6b545d70 R14: 0000000000000003 R15: 0000000001000000 [ 70.305428][ T5152] [ 70.308870][ T5152] bcachefs (loop0): insufficient writeable journal devices available: have 0, need 1 [ 70.308870][ T5152] rw journal devs: [ 70.331334][ T5152] bcachefs (loop0): accounting_read... done [ 70.337286][ T5152] bcachefs (loop0): alloc_read... done [ 70.342828][ T5152] bcachefs (loop0): stripes_read... done [ 70.348527][ T5152] bcachefs (loop0): snapshots_read... done [ 70.354481][ T5152] bcachefs (loop0): check_allocations... [ 70.355912][ T5152] btree ptr not marked in member info btree allocated bitmap [ 70.355926][ T5152] u64s 11 type btree_ptr_v2 SPOS_MAX len 0 ver 0: seq 1818ce08861e3527 written 40 min_key POS_MIN durability: 1 ptr: 0:26:0 gen 0, shutting down [ 70.384061][ T5152] bcachefs (loop0): inconsistency detected - emergency read only at journal seq 13 [ 70.393516][ T5152] bcachefs (loop0): bch2_gc_mark_key(): error fsck_errors_not_fixed [ 70.401577][ T5152] bcachefs (loop0): bch2_gc_btree(): error fsck_errors_not_fixed [ 70.409340][ T5152] bcachefs (loop0): bch2_gc_btrees(): error fsck_errors_not_fixed [ 70.417274][ T5152] bcachefs (loop0): bch2_check_allocations(): error fsck_errors_not_fixed [ 70.425920][ T5152] bcachefs (loop0): bch2_fs_recovery(): error fsck_errors_not_fixed [ 70.434019][ T5152] bcachefs (loop0): bch2_fs_start(): error starting filesystem fsck_errors_not_fixed [ 70.443612][ T5152] bcachefs (loop0): shutting down [ 70.456279][ T5152] bcachefs (loop0): shutdown complete [pid 5152] mount("/dev/loop0", "./file1", "bcachefs", MS_NOSUID|MS_SYNCHRONOUS|MS_RELATIME, "\xff") = -1 EINVAL (Invalid argument) [pid 5152] openat(AT_FDCWD, "/dev/loop0", O_RDWR) = 3 [pid 5152] ioctl(3, LOOP_CLR_FD) = 0 [ 70.666847][ T5152] bcachefs: bch2_fs_get_tree() error: fsck_errors_not_fixed [pid 5152] close(3) = 0 [pid 5152] exit_group(0) = ? [pid 5152] +++ exited with 0 +++ --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=5152, si_uid=0, si_status=0, si_utime=1 /* 0.01 s */, si_stime=67 /* 0.67 s */} --- restart_syscall(<... resuming interrupted clone ...>) = 0 openat(AT_FDCWD, "/dev/loop0", O_RDWR) = 3 ioctl(3, LOOP_CLR_FD) = -1 ENXIO (No such device or address) close(3) = 0 clone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD./strace-static-x86_64: Process 5161 attached , child_tidptr=0x5555765af650) = 5161 [pid 5161] set_robust_list(0x5555765af660, 24) = 0 [pid 5161] prctl(PR_SET_PDEATHSIG, SIGKILL) = 0 [pid 5161] setpgid(0, 0) = 0 [pid 5161] openat(AT_FDCWD, "/proc/self/oom_score_adj", O_WRONLY|O_CLOEXEC) = 3 [pid 5161] write(3, "1000", 4) = 4 [pid 5161] close(3) = 0 executing program [pid 5161] write(1, "executing program\n", 18) = 18 [pid 5161] memfd_create("syzkaller", 0) = 3 [pid 5161] mmap(NULL, 138412032, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f5b62400000 [pid 5161] write(3, "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"..., 16777216) = 16777216 [pid 5161] munmap(0x7f5b62400000, 138412032) = 0 [pid 5161] openat(AT_FDCWD, "/dev/loop0", O_RDWR) = 4 [pid 5161] ioctl(4, LOOP_SET_FD, 3) = 0 [pid 5161] close(3) = 0 [pid 5161] close(4) = 0 [pid 5161] mkdir("./file1", 0777) = -1 EEXIST (File exists) [ 70.983224][ T5161] loop0: detected capacity change from 0 to 32768 [ 71.004898][ T5161] bcachefs (/dev/loop0): error reading default superblock: Not a bcachefs superblock (got magic c68573f6-4e1a-4502-8265-f57f48ba6d81) [ 71.047294][ T5161] bcachefs (loop0): starting version 1.7: mi_btree_bitmap opts=metadata_checksum=none,data_checksum=none,compression=lz4,nojournal_transaction_names [ 71.062747][ T5161] bcachefs (loop0): recovering from clean shutdown, journal seq 13 [ 71.071103][ T5161] bcachefs (loop0): Doing compatible version upgrade from 1.7: mi_btree_bitmap to 1.9: disk_accounting_v2 [ 71.071103][ T5161] running recovery passes: check_allocations [ 71.089507][ T5161] BUG: sleeping function called from invalid context at include/linux/sched/mm.h:337 [ 71.099124][ T5161] in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 5161, name: syz-executor295 [ 71.108744][ T5161] preempt_count: 1, expected: 0 [ 71.113660][ T5161] RCU nest depth: 0, expected: 0 [ 71.118609][ T5161] 2 locks held by syz-executor295/5161: [ 71.124245][ T5161] #0: ffff888077900278 (&c->state_lock){+.+.}-{3:3}, at: bch2_fs_start+0x45/0x5b0 [ 71.133776][ T5161] #1: ffff88807794a880 (&j->lock){+.+.}-{2:2}, at: bch2_fs_journal_start+0x1219/0x14a0 [ 71.143605][ T5161] Preemption disabled at: [ 71.143617][ T5161] [<0000000000000000>] 0x0 [ 71.152374][ T5161] CPU: 1 UID: 0 PID: 5161 Comm: syz-executor295 Tainted: G W 6.10.0-next-20240718-syzkaller #0 [ 71.164081][ T5161] Tainted: [W]=WARN [ 71.167963][ T5161] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/27/2024 [ 71.178004][ T5161] Call Trace: [ 71.181277][ T5161] [ 71.184194][ T5161] dump_stack_lvl+0x241/0x360 [ 71.188870][ T5161] ? __pfx_dump_stack_lvl+0x10/0x10 [ 71.194087][ T5161] ? __pfx__printk+0x10/0x10 [ 71.198796][ T5161] __might_resched+0x5d4/0x780 [ 71.203597][ T5161] ? __pfx___might_resched+0x10/0x10 [ 71.209084][ T5161] ? fs_reclaim_acquire+0x93/0x140 [ 71.214194][ T5161] __kmalloc_node_track_caller_noprof+0xcb/0x440 [ 71.220516][ T5161] ? bch2_printbuf_make_room+0x1f1/0x350 [ 71.226134][ T5161] krealloc_noprof+0x7d/0x120 [ 71.230806][ T5161] bch2_printbuf_make_room+0x1f1/0x350 [ 71.236281][ T5161] bch2_prt_printf+0x267/0x6d0 [ 71.241045][ T5161] ? bch2_journal_space_available+0x11c/0x1b00 [ 71.247411][ T5161] ? __pfx_bch2_prt_printf+0x10/0x10 [ 71.252713][ T5161] bch2_journal_space_available+0x89b/0x1b00 [ 71.258784][ T5161] ? kasan_save_track+0x51/0x80 [ 71.263637][ T5161] ? kasan_save_track+0x3f/0x80 [ 71.268489][ T5161] ? poison_slab_object+0xe0/0x150 [ 71.273684][ T5161] ? __kasan_slab_free+0x37/0x60 [ 71.278615][ T5161] ? bch2_journal_space_available+0x11c/0x1b00 [ 71.284808][ T5161] ? bch2_journal_log_msg+0xda/0x120 [ 71.290084][ T5161] ? bch2_fs_recovery+0x1e48/0x38d0 [ 71.295281][ T5161] ? bch2_fs_get_tree+0xd61/0x1700 [ 71.300387][ T5161] ? vfs_get_tree+0x90/0x2a0 [ 71.304967][ T5161] ? do_new_mount+0x2be/0xb40 [ 71.309642][ T5161] ? __se_sys_mount+0x2d6/0x3c0 [ 71.314484][ T5161] ? __pfx_bch2_journal_space_available+0x10/0x10 [ 71.320907][ T5161] ? mark_lock+0x9a/0x360 [ 71.325247][ T5161] ? __lock_acquire+0x1384/0x2050 [ 71.330284][ T5161] ? kasan_quarantine_put+0xdc/0x230 [ 71.335563][ T5161] ? lockdep_hardirqs_on+0x99/0x150 [ 71.340757][ T5161] ? __pfx_lock_acquire+0x10/0x10 [ 71.345780][ T5161] ? do_raw_spin_lock+0x14f/0x370 [ 71.350800][ T5161] ? __pfx_do_raw_spin_lock+0x10/0x10 [ 71.356158][ T5161] ? __genradix_iter_peek+0x3d0/0x430 [ 71.361530][ T5161] bch2_fs_journal_start+0x1356/0x14a0 [ 71.366997][ T5161] ? __pfx_bch2_fs_journal_start+0x10/0x10 [ 71.372791][ T5161] ? journal_replay_entry_early+0x4d/0xb70 [ 71.378595][ T5161] ? __pfx_bch2_journal_log_msg+0x10/0x10 [ 71.384319][ T5161] ? bch2_recovery_passes_from_stable+0x104/0x120 [ 71.390739][ T5161] bch2_fs_recovery+0x1ec8/0x38d0 [ 71.395778][ T5161] ? __pfx_bch2_fs_recovery+0x10/0x10 [ 71.401174][ T5161] ? __pfx_lock_release+0x10/0x10 [ 71.406193][ T5161] ? bch2_get_next_online_dev+0x2b/0x4f0 [ 71.411905][ T5161] ? __pfx_lock_release+0x10/0x10 [ 71.416933][ T5161] ? bch2_get_next_online_dev+0x2b/0x4f0 [ 71.422560][ T5161] ? bch2_get_next_online_dev+0x4b9/0x4f0 [ 71.428269][ T5161] ? bch2_get_next_online_dev+0x2b/0x4f0 [ 71.433898][ T5161] ? llist_reverse_order+0x72/0x90 [ 71.439013][ T5161] bch2_fs_start+0x356/0x5b0 [ 71.443604][ T5161] bch2_fs_get_tree+0xd61/0x1700 [ 71.448550][ T5161] ? __pfx_bch2_parse_one_mount_opt+0x10/0x10 [ 71.454619][ T5161] ? __pfx_bch2_fs_get_tree+0x10/0x10 [ 71.460001][ T5161] ? generic_parse_monolithic+0x387/0x400 [ 71.465723][ T5161] ? apparmor_capable+0x13b/0x1b0 [ 71.470835][ T5161] ? bpf_lsm_capable+0x9/0x10 [ 71.475508][ T5161] vfs_get_tree+0x90/0x2a0 [ 71.479921][ T5161] do_new_mount+0x2be/0xb40 [ 71.484424][ T5161] ? __pfx_do_new_mount+0x10/0x10 [ 71.489518][ T5161] __se_sys_mount+0x2d6/0x3c0 [ 71.494209][ T5161] ? __pfx___se_sys_mount+0x10/0x10 [ 71.499416][ T5161] ? do_syscall_64+0x100/0x230 [ 71.504194][ T5161] ? __x64_sys_mount+0x20/0xc0 [ 71.508974][ T5161] do_syscall_64+0xf3/0x230 [ 71.513496][ T5161] ? clear_bhb_loop+0x35/0x90 [ 71.518204][ T5161] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 71.524104][ T5161] RIP: 0033:0x7f5b6a8b0dea [ 71.528516][ T5161] Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb a6 e8 5e 04 00 00 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 [ 71.548113][ T5161] RSP: 002b:00007ffd6b545d18 EFLAGS: 00000282 ORIG_RAX: 00000000000000a5 [ 71.556524][ T5161] RAX: ffffffffffffffda RBX: 00007ffd6b545d30 RCX: 00007f5b6a8b0dea [ 71.564588][ T5161] RDX: 0000000020000000 RSI: 000000002000f680 RDI: 00007ffd6b545d30 [ 71.572555][ T5161] RBP: 0000000000000004 R08: 00007ffd6b545d70 R09: 000000000000f626 [ 71.580520][ T5161] R10: 0000000000200012 R11: 0000000000000282 R12: 0000000000200012 [ 71.588483][ T5161] R13: 00007ffd6b545d70 R14: 0000000000000003 R15: 0000000001000000 [ 71.596476][ T5161] [ 71.599860][ T5161] bcachefs (loop0): insufficient writeable journal devices available: have 0, need 1 [ 71.599860][ T5161] rw journal devs: [ 71.622108][ T5161] bcachefs (loop0): accounting_read... done [ 71.628059][ T5161] bcachefs (loop0): alloc_read... done [ 71.633592][ T5161] bcachefs (loop0): stripes_read... done [ 71.639321][ T5161] bcachefs (loop0): snapshots_read... done [ 71.645200][ T5161] bcachefs (loop0): check_allocations... [ 71.646755][ T5161] btree ptr not marked in member info btree allocated bitmap [ 71.646767][ T5161] u64s 11 type btree_ptr_v2 SPOS_MAX len 0 ver 0: seq 1818ce08861e3527 written 40 min_key POS_MIN durability: 1 ptr: 0:26:0 gen 0, shutting down [ 71.675015][ T5161] bcachefs (loop0): inconsistency detected - emergency read only at journal seq 13 [ 71.684420][ T5161] bcachefs (loop0): bch2_gc_mark_key(): error fsck_errors_not_fixed [ 71.692498][ T5161] bcachefs (loop0): bch2_gc_btree(): error fsck_errors_not_fixed [ 71.700345][ T5161] bcachefs (loop0): bch2_gc_btrees(): error fsck_errors_not_fixed [ 71.708176][ T5161] bcachefs (loop0): bch2_check_allocations(): error fsck_errors_not_fixed [ 71.716797][ T5161] bcachefs (loop0): bch2_fs_recovery(): error fsck_errors_not_fixed [ 71.724878][ T5161] bcachefs (loop0): bch2_fs_start(): error starting filesystem fsck_errors_not_fixed [ 71.734451][ T5161] bcachefs (loop0): shutting down [ 71.747493][ T5161] bcachefs (loop0): shutdown complete [pid 5161] mount("/dev/loop0", "./file1", "bcachefs", MS_NOSUID|MS_SYNCHRONOUS|MS_RELATIME, "\xff") = -1 EINVAL (Invalid argument) [pid 5161] openat(AT_FDCWD, "/dev/loop0", O_RDWR) = 3 [pid 5161] ioctl(3, LOOP_CLR_FD) = 0 [ 71.941023][ T5161] bcachefs: bch2_fs_get_tree() error: fsck_errors_not_fixed [pid 5161] close(3) = 0 [pid 5161] exit_group(0) = ? [pid 5161] +++ exited with 0 +++ --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=5161, si_uid=0, si_status=0, si_utime=5 /* 0.05 s */, si_stime=59 /* 0.59 s */} --- restart_syscall(<... resuming interrupted clone ...>) = 0 openat(AT_FDCWD, "/dev/loop0", O_RDWR) = 3 ioctl(3, LOOP_CLR_FD) = -1 ENXIO (No such device or address) close(3) = 0 clone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD./strace-static-x86_64: Process 5170 attached , child_tidptr=0x5555765af650) = 5170 [pid 5170] set_robust_list(0x5555765af660, 24) = 0 [pid 5170] prctl(PR_SET_PDEATHSIG, SIGKILL) = 0 [pid 5170] setpgid(0, 0) = 0 [pid 5170] openat(AT_FDCWD, "/proc/self/oom_score_adj", O_WRONLY|O_CLOEXEC) = 3 [pid 5170] write(3, "1000", 4) = 4 [pid 5170] close(3) = 0 [pid 5170] write(1, "executing program\n", 18executing program ) = 18 [pid 5170] memfd_create("syzkaller", 0) = 3 [pid 5170] mmap(NULL, 138412032, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f5b62400000 [pid 5170] write(3, "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"..., 16777216) = 16777216 [pid 5170] munmap(0x7f5b62400000, 138412032) = 0 [pid 5170] openat(AT_FDCWD, "/dev/loop0", O_RDWR) = 4 [pid 5170] ioctl(4, LOOP_SET_FD, 3) = 0 [pid 5170] close(3) = 0 [pid 5170] close(4) = 0 [pid 5170] mkdir("./file1", 0777) = -1 EEXIST (File exists) [ 72.248598][ T5170] loop0: detected capacity change from 0 to 32768 [ 72.279540][ T5170] bcachefs (/dev/loop0): error reading default superblock: Not a bcachefs superblock (got magic c68573f6-4e1a-4502-8265-f57f48ba6d81) [ 72.324812][ T5170] bcachefs (loop0): starting version 1.7: mi_btree_bitmap opts=metadata_checksum=none,data_checksum=none,compression=lz4,nojournal_transaction_names [ 72.339997][ T5170] bcachefs (loop0): recovering from clean shutdown, journal seq 13 [ 72.347950][ T5170] bcachefs (loop0): Doing compatible version upgrade from 1.7: mi_btree_bitmap to 1.9: disk_accounting_v2 [ 72.347950][ T5170] running recovery passes: check_allocations [ 72.366113][ T5170] BUG: sleeping function called from invalid context at include/linux/sched/mm.h:337 [ 72.375656][ T5170] in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 5170, name: syz-executor295 [ 72.385185][ T5170] preempt_count: 1, expected: 0 [ 72.390098][ T5170] RCU nest depth: 0, expected: 0 [ 72.395041][ T5170] 2 locks held by syz-executor295/5170: [ 72.400649][ T5170] #0: ffff888077900278 (&c->state_lock){+.+.}-{3:3}, at: bch2_fs_start+0x45/0x5b0 [ 72.410133][ T5170] #1: ffff88807794a880 (&j->lock){+.+.}-{2:2}, at: bch2_fs_journal_start+0x1219/0x14a0 [ 72.420056][ T5170] Preemption disabled at: [ 72.420070][ T5170] [<0000000000000000>] 0x0 [ 72.428842][ T5170] CPU: 1 UID: 0 PID: 5170 Comm: syz-executor295 Tainted: G W 6.10.0-next-20240718-syzkaller #0 [ 72.440550][ T5170] Tainted: [W]=WARN [ 72.444382][ T5170] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/27/2024 [ 72.454446][ T5170] Call Trace: [ 72.457714][ T5170] [ 72.460630][ T5170] dump_stack_lvl+0x241/0x360 [ 72.465392][ T5170] ? __pfx_dump_stack_lvl+0x10/0x10 [ 72.470580][ T5170] ? __pfx__printk+0x10/0x10 [ 72.475166][ T5170] __might_resched+0x5d4/0x780 [ 72.479920][ T5170] ? __pfx___might_resched+0x10/0x10 [ 72.485203][ T5170] ? fs_reclaim_acquire+0x93/0x140 [ 72.490302][ T5170] __kmalloc_node_track_caller_noprof+0xcb/0x440 [ 72.496633][ T5170] ? bch2_printbuf_make_room+0x1f1/0x350 [ 72.502256][ T5170] krealloc_noprof+0x7d/0x120 [ 72.506922][ T5170] bch2_printbuf_make_room+0x1f1/0x350 [ 72.512374][ T5170] bch2_prt_printf+0x267/0x6d0 [ 72.517125][ T5170] ? bch2_journal_space_available+0x11c/0x1b00 [ 72.523279][ T5170] ? __pfx_bch2_prt_printf+0x10/0x10 [ 72.528574][ T5170] bch2_journal_space_available+0x89b/0x1b00 [ 72.534559][ T5170] ? kasan_save_track+0x51/0x80 [ 72.539406][ T5170] ? kasan_save_track+0x3f/0x80 [ 72.544248][ T5170] ? poison_slab_object+0xe0/0x150 [ 72.549347][ T5170] ? __kasan_slab_free+0x37/0x60 [ 72.554269][ T5170] ? bch2_journal_space_available+0x11c/0x1b00 [ 72.560416][ T5170] ? bch2_journal_log_msg+0xda/0x120 [ 72.565688][ T5170] ? bch2_fs_recovery+0x1e48/0x38d0 [ 72.570880][ T5170] ? bch2_fs_get_tree+0xd61/0x1700 [ 72.575983][ T5170] ? vfs_get_tree+0x90/0x2a0 [ 72.580561][ T5170] ? do_new_mount+0x2be/0xb40 [ 72.585226][ T5170] ? __se_sys_mount+0x2d6/0x3c0 [ 72.590071][ T5170] ? __pfx_bch2_journal_space_available+0x10/0x10 [ 72.596501][ T5170] ? mark_lock+0x9a/0x360 [ 72.601011][ T5170] ? __lock_acquire+0x1384/0x2050 [ 72.606047][ T5170] ? kasan_quarantine_put+0xdc/0x230 [ 72.611335][ T5170] ? lockdep_hardirqs_on+0x99/0x150 [ 72.616534][ T5170] ? __pfx_lock_acquire+0x10/0x10 [ 72.621554][ T5170] ? do_raw_spin_lock+0x14f/0x370 [ 72.626574][ T5170] ? __pfx_do_raw_spin_lock+0x10/0x10 [ 72.631937][ T5170] ? __genradix_iter_peek+0x3d0/0x430 [ 72.637325][ T5170] bch2_fs_journal_start+0x1356/0x14a0 [ 72.642792][ T5170] ? __pfx_bch2_fs_journal_start+0x10/0x10 [ 72.648592][ T5170] ? journal_replay_entry_early+0x4d/0xb70 [ 72.654485][ T5170] ? __pfx_bch2_journal_log_msg+0x10/0x10 [ 72.660213][ T5170] ? bch2_recovery_passes_from_stable+0x104/0x120 [ 72.666630][ T5170] bch2_fs_recovery+0x1ec8/0x38d0 [ 72.671663][ T5170] ? __pfx_bch2_fs_recovery+0x10/0x10 [ 72.677052][ T5170] ? __pfx_lock_release+0x10/0x10 [ 72.682072][ T5170] ? bch2_get_next_online_dev+0x2b/0x4f0 [ 72.687692][ T5170] ? __pfx_lock_release+0x10/0x10 [ 72.692718][ T5170] ? bch2_get_next_online_dev+0x2b/0x4f0 [ 72.698340][ T5170] ? bch2_get_next_online_dev+0x4b9/0x4f0 [ 72.704047][ T5170] ? bch2_get_next_online_dev+0x2b/0x4f0 [ 72.709674][ T5170] ? llist_reverse_order+0x72/0x90 [ 72.714782][ T5170] bch2_fs_start+0x356/0x5b0 [ 72.719380][ T5170] bch2_fs_get_tree+0xd61/0x1700 [ 72.724322][ T5170] ? __pfx_bch2_parse_one_mount_opt+0x10/0x10 [ 72.730390][ T5170] ? __pfx_bch2_fs_get_tree+0x10/0x10 [ 72.735791][ T5170] ? generic_parse_monolithic+0x387/0x400 [ 72.741513][ T5170] ? apparmor_capable+0x13b/0x1b0 [ 72.746539][ T5170] ? bpf_lsm_capable+0x9/0x10 [ 72.751210][ T5170] vfs_get_tree+0x90/0x2a0 [ 72.755617][ T5170] do_new_mount+0x2be/0xb40 [ 72.760117][ T5170] ? __pfx_do_new_mount+0x10/0x10 [ 72.765158][ T5170] __se_sys_mount+0x2d6/0x3c0 [ 72.769847][ T5170] ? __pfx___se_sys_mount+0x10/0x10 [ 72.775053][ T5170] ? do_syscall_64+0x100/0x230 [ 72.779826][ T5170] ? __x64_sys_mount+0x20/0xc0 [ 72.784590][ T5170] do_syscall_64+0xf3/0x230 [ 72.789091][ T5170] ? clear_bhb_loop+0x35/0x90 [ 72.793866][ T5170] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 72.799762][ T5170] RIP: 0033:0x7f5b6a8b0dea [ 72.804167][ T5170] Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb a6 e8 5e 04 00 00 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 [ 72.823850][ T5170] RSP: 002b:00007ffd6b545d18 EFLAGS: 00000282 ORIG_RAX: 00000000000000a5 [ 72.832278][ T5170] RAX: ffffffffffffffda RBX: 00007ffd6b545d30 RCX: 00007f5b6a8b0dea [ 72.840341][ T5170] RDX: 0000000020000000 RSI: 000000002000f680 RDI: 00007ffd6b545d30 [ 72.848306][ T5170] RBP: 0000000000000004 R08: 00007ffd6b545d70 R09: 000000000000f626 [ 72.856267][ T5170] R10: 0000000000200012 R11: 0000000000000282 R12: 0000000000200012 [ 72.864231][ T5170] R13: 00007ffd6b545d70 R14: 0000000000000003 R15: 0000000001000000 [ 72.872204][ T5170] [ 72.875471][ T5170] bcachefs (loop0): insufficient writeable journal devices available: have 0, need 1 [ 72.875471][ T5170] rw journal devs: [ 72.897362][ T5170] bcachefs (loop0): accounting_read... done [ 72.903388][ T5170] bcachefs (loop0): alloc_read... done [ 72.908894][ T5170] bcachefs (loop0): stripes_read... done [ 72.914590][ T5170] bcachefs (loop0): snapshots_read... done [ 72.920557][ T5170] bcachefs (loop0): check_allocations... [ 72.921632][ T5170] btree ptr not marked in member info btree allocated bitmap [ 72.921645][ T5170] u64s 11 type btree_ptr_v2 SPOS_MAX len 0 ver 0: seq 1818ce08861e3527 written 40 min_key POS_MIN durability: 1 ptr: 0:26:0 gen 0, shutting down [ 72.949567][ T5170] bcachefs (loop0): inconsistency detected - emergency read only at journal seq 13 [ 72.959107][ T5170] bcachefs (loop0): bch2_gc_mark_key(): error fsck_errors_not_fixed [ 72.967117][ T5170] bcachefs (loop0): bch2_gc_btree(): error fsck_errors_not_fixed [ 72.974926][ T5170] bcachefs (loop0): bch2_gc_btrees(): error fsck_errors_not_fixed [ 72.982862][ T5170] bcachefs (loop0): bch2_check_allocations(): error fsck_errors_not_fixed [ 72.991506][ T5170] bcachefs (loop0): bch2_fs_recovery(): error fsck_errors_not_fixed [ 72.999529][ T5170] bcachefs (loop0): bch2_fs_start(): error starting filesystem fsck_errors_not_fixed [ 73.009213][ T5170] bcachefs (loop0): shutting down [ 73.023420][ T5170] bcachefs (loop0): shutdown complete [pid 5170] mount("/dev/loop0", "./file1", "bcachefs", MS_NOSUID|MS_SYNCHRONOUS|MS_RELATIME, "\xff") = -1 EINVAL (Invalid argument) [pid 5170] openat(AT_FDCWD, "/dev/loop0", O_RDWR) = 3 [pid 5170] ioctl(3, LOOP_CLR_FD) = 0 [ 73.200682][ T5170] bcachefs: bch2_fs_get_tree() error: fsck_errors_not_fixed [pid 5170] close(3) = 0 [pid 5170] exit_group(0) = ? [pid 5170] +++ exited with 0 +++ --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=5170, si_uid=0, si_status=0, si_utime=3 /* 0.03 s */, si_stime=61 /* 0.61 s */} --- restart_syscall(<... resuming interrupted clone ...>) = 0 openat(AT_FDCWD, "/dev/loop0", O_RDWR) = 3 ioctl(3, LOOP_CLR_FD) = -1 ENXIO (No such device or address) close(3) = 0 clone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD./strace-static-x86_64: Process 5179 attached , child_tidptr=0x5555765af650) = 5179 [pid 5179] set_robust_list(0x5555765af660, 24) = 0 [pid 5179] prctl(PR_SET_PDEATHSIG, SIGKILL) = 0 [pid 5179] setpgid(0, 0) = 0 [pid 5179] openat(AT_FDCWD, "/proc/self/oom_score_adj", O_WRONLY|O_CLOEXEC) = 3 [pid 5179] write(3, "1000", 4) = 4 [pid 5179] close(3) = 0 executing program [pid 5179] write(1, "executing program\n", 18) = 18 [pid 5179] memfd_create("syzkaller", 0) = 3 [pid 5179] mmap(NULL, 138412032, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f5b62400000