./strace-static-x86_64 -e \!wait4,clock_nanosleep,nanosleep -s 100 -x -f ./syz-executor3412331688 <...> Warning: Permanently added '10.128.1.148' (ED25519) to the list of known hosts. execve("./syz-executor3412331688", ["./syz-executor3412331688"], 0x7fffda8b5440 /* 10 vars */) = 0 brk(NULL) = 0x555584e7a000 brk(0x555584e7ad00) = 0x555584e7ad00 arch_prctl(ARCH_SET_FS, 0x555584e7a380) = 0 set_tid_address(0x555584e7a650) = 5831 set_robust_list(0x555584e7a660, 24) = 0 rseq(0x555584e7aca0, 0x20, 0, 0x53053053) = 0 prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0 readlink("/proc/self/exe", "/root/syz-executor3412331688", 4096) = 28 getrandom("\xcd\x3e\xa6\x6d\x7d\x2d\x60\x61", 8, GRND_NONBLOCK) = 8 brk(NULL) = 0x555584e7ad00 brk(0x555584e9bd00) = 0x555584e9bd00 brk(0x555584e9c000) = 0x555584e9c000 mprotect(0x7f8b2497c000, 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 executing program write(1, "executing program\n", 18) = 18 memfd_create("syzkaller", 0) = 3 mmap(NULL, 138412032, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f8b1c400000 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 munmap(0x7f8b1c400000, 138412032) = 0 openat(AT_FDCWD, "/dev/loop0", O_RDWR) = 4 ioctl(4, LOOP_SET_FD, 3) = 0 close(3) = 0 close(4) = 0 mkdir("./bus", 0777) = 0 [ 64.191332][ T5831] loop0: detected capacity change from 0 to 32768 [ 64.273252][ T5831] bcachefs (loop0): starting version 1.7: mi_btree_bitmap opts=errors=continue,metadata_checksum=none,data_checksum=none,compression=lz4,str_hash=crc32c,journal_flush_disabled,norecovery,nojournal_transaction_names,reconstruct_alloc [ 64.296193][ T5831] bcachefs (loop0): recovering from clean shutdown, journal seq 10 [ 64.304522][ T5831] bcachefs (loop0): Version upgrade required: [ 64.304522][ T5831] Version upgrade from 0.24: unwritten_extents to 1.7: mi_btree_bitmap incomplete [ 64.304522][ T5831] Doing incompatible version upgrade from 0.24: unwritten_extents to 1.13: inode_has_child_snapshots [ 64.304522][ T5831] running recovery passes: check_allocations,check_alloc_info,check_lrus,check_btree_backpointers,check_backpointers_to_extents,check_extents_to_backpointers,check_alloc_to_lru_refs,bucket_gens_init,check_snapshot_trees,check_snapshots,check_subvols,check_subvol_children,delete_dead_snapshots,check_inodes,check_extents,check_indirect_extents,check_dirents,check_xattrs,check_root,check_unreachable_inodes,check_subvolume_structure,check_directory_structure,check_nlinks,set_fs_needs_rebalance [ 64.376087][ T5831] bcachefs (loop0): dropping and reconstructing all alloc info [ 64.390433][ T5831] bcachefs (loop0): error validating btree node on loop0 at btree xattrs level 0/0 [ 64.390452][ T5831] u64s 11 type btree_ptr_v2 SPOS_MAX len 0 ver 0: seq 2285c34bed0abe32 written 16 min_key POS_MIN durability: 1 ptr: 0:31:0 gen 0 [ 64.390460][ T5831] node offset 0/16: got wrong btree node: got [ 64.390466][ T5831] btree=xattrs level=0 seq 2449958200410816050x [ 64.390471][ T5831] min: POS_MIN [ 64.390476][ T5831] max: SPOS_MAX [ 64.434140][ T5831] bcachefs (loop0): running explicit recovery pass check_topology (2), currently at recovery_pass_empty (0) [ 64.446073][ T5831] bcachefs (loop0): flagging btree xattrs lost data [ 64.452930][ T5831] bcachefs (loop0): running explicit recovery pass scan_for_btree_nodes (1), currently at recovery_pass_empty (0) [ 64.466431][ T5831] error reading btree root btree=xattrs level=0: btree_node_read_error, fixing [ 64.478753][ T5831] bcachefs (loop0): scan_for_btree_nodes... [ 64.499442][ T5831] bch2_scan_for_btree_nodes: nodes found after overwrites: [ 64.499463][ T5831] btree=extents level=0 seq=1 journal_seq=5 cookie=c6c25c03258c59c5 POS_MIN-SPOS_MAX ptr: 0:27:0 gen 0 [ 64.499470][ T5831] btree=inodes level=0 seq=1 journal_seq=5 cookie=7589ab5e0c11cc7a POS_MIN-SPOS_MAX ptr: 0:38:0 gen 0 [ 64.499477][ T5831] btree=dirents level=0 seq=1 journal_seq=4 cookie=9aa2895aefce4bdf POS_MIN-SPOS_MAX ptr: 0:41:0 gen 0 [ 64.499484][ T5831] btree=xattrs level=0 seq=1 journal_seq=0 cookie=22000000ba0abe32 POS_MIN-SPOS_MAX ptr: 0:31:0 gen 0 [ 64.499490][ T5831] btree=subvolumes level=0 seq=1 journal_seq=1 cookie=c0bef60d07ceb940 POS_MIN-SPOS_MAX ptr: 0:35:0 gen 0 [ 64.499497][ T5831] btree=snapshots level=0 seq=1 journal_seq=1 cookie=ebb8d5a9e3463bdb POS_MIN-SPOS_MAX ptr: 0:32:0 gen 0 [ 64.499504][ T5831] btree=deleted_inodes level=0 seq=1 journal_seq=0 cookie=1db8f60c84bb244c POS_MIN-SPOS_MAX ptr: 0:42:0 gen 0 [ 64.499511][ T5831] [ 64.594727][ T5831] done [ 64.597867][ T5831] bcachefs (loop0): check_topology... [ 64.598169][ T5831] bcachefs (loop0): btree root extentsinodesdirentsxattrs unreadable, must recover from scan [ 64.613919][ T5831] bcachefs (loop0): bch2_get_scanned_nodes(): recovery btree=xattrs level=0 POS_MIN - SPOS_MAX [ 64.624414][ T5831] bcachefs (loop0): bch2_get_scanned_nodes(): recovering u64s 11 type btree_ptr_v2 SPOS_MAX len 0 ver 0: seq 22000000ba0abe32 written 8 min_key POS_MIN durability: 1 ptr: 0:31:0 gen 0 [ 64.642877][ T5831] invalid bkey in btree_node btree=xattrs level=0: u64s 11 type btree_ptr_v2 SPOS_MAX len 0 ver 0: seq 22000000ba0abe32 written 8 min_key POS_MIN durability: 1 ptr: 0:31:0 gen 0 [ 64.642897][ T5831] key at POS_MAX: delete?, fixing [ 64.666062][ T5831] ------------[ cut here ]------------ [ 64.671523][ T5831] kernel BUG at fs/bcachefs/btree_node_scan.c:546! [ 64.678131][ T5831] Oops: invalid opcode: 0000 [#1] PREEMPT SMP KASAN PTI [ 64.685084][ T5831] CPU: 0 UID: 0 PID: 5831 Comm: syz-executor341 Not tainted 6.12.0-next-20241128-syzkaller #0 [ 64.695302][ T5831] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 [ 64.705345][ T5831] RIP: 0010:bch2_get_scanned_nodes+0x1e23/0x1e30 [ 64.711694][ T5831] Code: 24 18 48 8d b4 24 f0 03 00 00 48 8b 94 24 00 01 00 00 e9 17 e8 ff ff e8 4b de a7 07 e8 f6 74 73 fd 90 0f 0b e8 ee 74 73 fd 90 <0f> 0b 66 2e 0f 1f 84 00 00 00 00 00 90 90 90 90 90 90 90 90 90 90 [ 64.731326][ T5831] RSP: 0018:ffffc90003e36cc0 EFLAGS: 00010293 [ 64.737384][ T5831] RAX: ffffffff842c0012 RBX: ffff888074b80000 RCX: ffff888035983c00 [ 64.745339][ T5831] RDX: 0000000000000000 RSI: 00000000fffff75b RDI: 0000000000000000 [ 64.753331][ T5831] RBP: ffffc90003e37160 R08: ffffffff842bf611 R09: 1ffffffff285892b [ 64.761340][ T5831] R10: dffffc0000000000 R11: fffffbfff285892c R12: 1ffff920007c6dcc [ 64.769325][ T5831] R13: ffffc90003e37020 R14: 00000000fffff75b R15: dffffc0000000000 [ 64.777289][ T5831] FS: 0000555584e7a380(0000) GS:ffff8880b8600000(0000) knlGS:0000000000000000 [ 64.786200][ T5831] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 64.792768][ T5831] CR2: 00005590e5ed3c28 CR3: 0000000074aca000 CR4: 00000000003526f0 [ 64.800721][ T5831] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 64.808674][ T5831] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 64.816646][ T5831] Call Trace: [ 64.819917][ T5831] [ 64.822856][ T5831] ? __die_body+0x5f/0xb0 [ 64.827174][ T5831] ? die+0x9e/0xc0 [ 64.830875][ T5831] ? do_trap+0x15a/0x3a0 [ 64.835103][ T5831] ? bch2_get_scanned_nodes+0x1e23/0x1e30 [ 64.840813][ T5831] ? do_error_trap+0x1dc/0x2c0 [ 64.845557][ T5831] ? bch2_get_scanned_nodes+0x1e23/0x1e30 [ 64.851261][ T5831] ? __pfx_do_error_trap+0x10/0x10 [ 64.856357][ T5831] ? handle_invalid_op+0x34/0x40 [ 64.861277][ T5831] ? bch2_get_scanned_nodes+0x1e23/0x1e30 [ 64.867000][ T5831] ? exc_invalid_op+0x38/0x50 [ 64.871676][ T5831] ? asm_exc_invalid_op+0x1a/0x20 [ 64.876684][ T5831] ? bch2_get_scanned_nodes+0x1421/0x1e30 [ 64.882407][ T5831] ? bch2_get_scanned_nodes+0x1e22/0x1e30 [ 64.888112][ T5831] ? bch2_get_scanned_nodes+0x1e23/0x1e30 [ 64.893827][ T5831] ? __pfx_bch2_get_scanned_nodes+0x10/0x10 [ 64.899705][ T5831] ? six_unlock_ip+0x2ce/0x3e0 [ 64.904460][ T5831] ? bch2_btree_root_alloc_fake_trans+0x8f8/0xc20 [ 64.910864][ T5831] ? __pfx_bch2_btree_root_alloc_fake_trans+0x10/0x10 [ 64.917625][ T5831] ? bch2_run_explicit_recovery_pass+0x36c/0x580 [ 64.923939][ T5831] ? prt_str+0x4af/0x7d0 [ 64.928165][ T5831] bch2_check_topology+0x597/0xbb0 [ 64.933289][ T5831] ? __pfx_console_unlock+0x10/0x10 [ 64.938479][ T5831] ? bch2_check_topology+0x5f1/0xbb0 [ 64.943754][ T5831] ? __pfx_bch2_check_topology+0x10/0x10 [ 64.949387][ T5831] ? __bch2_print+0x17a/0x220 [ 64.954151][ T5831] ? bch2_run_recovery_pass+0x6d/0x1e0 [ 64.959611][ T5831] ? __pfx_lockdep_hardirqs_on_prepare+0x10/0x10 [ 64.965933][ T5831] ? _raw_spin_lock_irq+0xdf/0x120 [ 64.971055][ T5831] bch2_run_recovery_pass+0xf0/0x1e0 [ 64.976338][ T5831] bch2_run_recovery_passes+0x290/0x9f0 [ 64.981880][ T5831] bch2_fs_recovery+0x2660/0x3ab0 [ 64.986899][ T5831] ? __pfx_bch2_fs_recovery+0x10/0x10 [ 64.992263][ T5831] ? __pfx_lock_release+0x10/0x10 [ 64.997273][ T5831] ? bch2_get_next_online_dev+0x2b/0x4f0 [ 65.002894][ T5831] ? __pfx_lock_release+0x10/0x10 [ 65.007904][ T5831] ? percpu_ref_put+0x62/0x250 [ 65.012655][ T5831] ? bch2_get_next_online_dev+0x2b/0x4f0 [ 65.018285][ T5831] ? bch2_get_next_online_dev+0x4b9/0x4f0 [ 65.024007][ T5831] ? bch2_get_next_online_dev+0x2b/0x4f0 [ 65.029641][ T5831] ? llist_reverse_order+0x72/0x90 [ 65.034788][ T5831] bch2_fs_start+0x37c/0x610 [ 65.039382][ T5831] bch2_fs_get_tree+0xd8d/0x1740 [ 65.044324][ T5831] ? __pfx_bch2_fs_get_tree+0x10/0x10 [ 65.049698][ T5831] ? generic_parse_monolithic+0x387/0x400 [ 65.055424][ T5831] ? apparmor_capable+0x13b/0x1b0 [ 65.060444][ T5831] vfs_get_tree+0x90/0x2b0 [ 65.064883][ T5831] do_new_mount+0x2be/0xb40 [ 65.069388][ T5831] ? __pfx_do_new_mount+0x10/0x10 [ 65.074412][ T5831] __se_sys_mount+0x2d6/0x3c0 [ 65.079173][ T5831] ? __pfx___se_sys_mount+0x10/0x10 [ 65.084364][ T5831] ? do_syscall_64+0x100/0x230 [ 65.089136][ T5831] ? __x64_sys_mount+0x20/0xc0 [ 65.093911][ T5831] do_syscall_64+0xf3/0x230 [ 65.098410][ T5831] ? clear_bhb_loop+0x35/0x90 [ 65.103100][ T5831] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 65.108999][ T5831] RIP: 0033:0x7f8b2490497a [ 65.113414][ T5831] 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.133016][ T5831] RSP: 002b:00007fffe3bd4ff8 EFLAGS: 00000282 ORIG_RAX: 00000000000000a5 [ 65.141431][ T5831] RAX: ffffffffffffffda RBX: 00007fffe3bd5010 RCX: 00007f8b2490497a [ 65.149426][ T5831] RDX: 00000000200000c0 RSI: 0000000020000040 RDI: 00007fffe3bd5010 [ 65.157393][ T5831] RBP: 0000000000000004 R08: 00007fffe3bd5050 R09: 000000000000595a [ 65.165359][ T5831] R10: 0000000000800000 R11: 0000000000000282 R12: 0000000000800000 [ 65.173324][ T5831] R13: 00007fffe3bd5050 R14: 0000000000000003 R15: 0000000001000000 [ 65.181297][ T5831] [ 65.184315][ T5831] Modules linked in: [ 65.188375][ T5831] ---[ end trace 0000000000000000 ]--- [ 65.193923][ T5831] RIP: 0010:bch2_get_scanned_nodes+0x1e23/0x1e30 [ 65.200320][ T5831] Code: 24 18 48 8d b4 24 f0 03 00 00 48 8b 94 24 00 01 00 00 e9 17 e8 ff ff e8 4b de a7 07 e8 f6 74 73 fd 90 0f 0b e8 ee 74 73 fd 90 <0f> 0b 66 2e 0f 1f 84 00 00 00 00 00 90 90 90 90 90 90 90 90 90 90 [ 65.220006][ T5831] RSP: 0018:ffffc90003e36cc0 EFLAGS: 00010293 [ 65.226114][ T5831] RAX: ffffffff842c0012 RBX: ffff888074b80000 RCX: ffff888035983c00 [ 65.234114][ T5831] RDX: 0000000000000000 RSI: 00000000fffff75b RDI: 0000000000000000 [ 65.242143][ T5831] RBP: ffffc90003e37160 R08: ffffffff842bf611 R09: 1ffffffff285892b [ 65.250166][ T5831] R10: dffffc0000000000 R11: fffffbfff285892c R12: 1ffff920007c6dcc [ 65.258206][ T5831] R13: ffffc90003e37020 R14: 00000000fffff75b R15: dffffc0000000000 [ 65.266228][ T5831] FS: 0000555584e7a380(0000) GS:ffff8880b8600000(0000) knlGS:0000000000000000 [ 65.275232][ T5831] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 65.281858][ T5831] CR2: 00005590e5ed3c28 CR3: 0000000074aca000 CR4: 00000000003526f0 [ 65.289869][ T5831] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 65.297966][ T5831] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 65.306005][ T5831] Kernel panic - not syncing: Fatal exception [ 65.312308][ T5831] Kernel Offset: disabled [ 65.316623][ T5831] Rebooting in 86400 seconds..