./strace-static-x86_64 -e \!wait4,clock_nanosleep,nanosleep -s 100 -x -f ./syz-executor1533250851 <...> Warning: Permanently added '10.128.0.192' (ED25519) to the list of known hosts. execve("./syz-executor1533250851", ["./syz-executor1533250851"], 0x7ffdecff5250 /* 10 vars */) = 0 brk(NULL) = 0x55555e8a6000 brk(0x55555e8a6d00) = 0x55555e8a6d00 arch_prctl(ARCH_SET_FS, 0x55555e8a6380) = 0 set_tid_address(0x55555e8a6650) = 5829 set_robust_list(0x55555e8a6660, 24) = 0 rseq(0x55555e8a6ca0, 0x20, 0, 0x53053053) = 0 prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0 readlink("/proc/self/exe", "/root/syz-executor1533250851", 4096) = 28 getrandom("\x36\x84\x70\xff\xa6\xbc\xa2\x15", 8, GRND_NONBLOCK) = 8 brk(NULL) = 0x55555e8a6d00 brk(0x55555e8c7d00) = 0x55555e8c7d00 brk(0x55555e8c8000) = 0x55555e8c8000 mprotect(0x7f3749821000, 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) = 0x7f3741200000 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(0x7f3741200000, 138412032) = 0 openat(AT_FDCWD, "/dev/loop0", O_RDWR) = 4 ioctl(4, LOOP_SET_FD, 3) = 0 close(3) = 0 close(4) = 0 mkdir("./file0", 0777) = 0 [ 61.137681][ T5829] loop0: detected capacity change from 0 to 32768 [ 61.226469][ T5829] bcachefs (loop0): starting version 1.7: mi_btree_bitmap opts=metadata_checksum=none,data_checksum=none,compression=lz4,usrquota,grpquota,fsck,fix_errors=yes,nojournal_transaction_names,no_data_io [ 61.247076][ T5829] invalid bkey u64s 11 type btree_ptr_v2 SPOS_MAX len 0 ver 0: seq 28f61e078e70b95c written 16 min_key POS_MIN durability: 1 ptr: 0:28:0 gen 0 [ 61.247095][ T5829] nonzero snapshot: delete?, fixing [ 61.267166][ T5829] bcachefs (loop0): recovering from clean shutdown, journal seq 10 [ 61.275373][ T5829] bcachefs (loop0): Version upgrade required: [ 61.275373][ T5829] Version upgrade from 0.128: (unknown version) to 1.7: mi_btree_bitmap incomplete [ 61.275373][ T5829] Doing incompatible version upgrade from 0.128: (unknown version) to 1.13: inode_has_child_snapshots [ 61.275373][ T5829] running recovery passes: check_allocations,check_snapshots,check_subvols,check_inodes,check_dirents,set_fs_needs_rebalance [ 61.321144][ T5829] invalid bkey u64s 17 type inode_v3 0:4097:U32_MAX len 0 ver 0: (unpack error) [ 61.321163][ T5829] invalid variable length fields: delete?, fixing [ 61.339433][ T5829] bcachefs (loop0): error validating btree node at btree alloc level 0/0 [ 61.339447][ T5829] u64s 11 type btree_ptr_v2 SPOS_MAX len 0 ver 0: seq ac62141f8dc7e261 written 24 min_key POS_MIN durability: 1 ptr: 0:26:0 gen 0 [ 61.339455][ T5829] node offset 8/24 bset u64s 375 bset byte offset 184: keys out of order: u64s 11 type alloc_v4 0:32:0 len 0 ver 0 > u64s 11 type alloc_v4 0:2:0 len 0 ver 0, fixing [ 61.379097][ T5829] invalid bkey u64s 12 type alloc_v4 0:28:0 len 0 ver 0: [ 61.379110][ T5829] gen 0 oldest_gen 0 data_type btree [ 61.379116][ T5829] journal_seq 6 [ 61.379121][ T5829] need_discard 1 [ 61.379126][ T5829] need_inc_gen 1 [ 61.379131][ T5829] dirty_sectors 0 [ 61.379136][ T5829] stripe_sectors 0 [ 61.379141][ T5829] cached_sectors 0 [ 61.379146][ T5829] stripe 0 [ 61.379151][ T5829] stripe_redundancy 0 [ 61.379156][ T5829] io_time[READ] 1 [ 61.379161][ T5829] io_time[WRITE] 768 [ 61.379166][ T5829] fragmentation 0 [ 61.379171][ T5829] bp_start 8 [ 61.379176][ T5829] [ 61.379181][ T5829] invalid data type (got 3 should be 9): delete?, fixing [ 61.451797][ T5829] bcachefs (loop0): btree_node_read_work: rewriting btree node at due to error [ 61.451797][ T5829] btree=alloc level=0 u64s 11 type btree_ptr_v2 SPOS_MAX len 0 ver 0: seq ac62141f8dc7e261 written 24 min_key POS_MIN durability: 1 ptr: 0:26:0 gen 0 [ 61.479924][ T5829] bcachefs (loop0): check_topology... done [ 61.485882][ T5829] bcachefs (loop0): accounting_read... done [ 61.493019][ T5829] bcachefs (loop0): alloc_read... done [ 61.498556][ T5829] bcachefs (loop0): stripes_read... done [ 61.504375][ T5829] bcachefs (loop0): snapshots_read... done [ 61.510606][ T5829] bcachefs (loop0): check_allocations... [ 61.514158][ T5829] bucket 0:26 data type btree ptr gen 0 missing in alloc btree [ 61.514177][ T5829] while marking u64s 11 type btree_ptr_v2 SPOS_MAX len 0 ver 0: seq ac62141f8dc7e261 written 24 min_key POS_MIN durability: 1 ptr: 0:26:0 gen 0, fixing [ 61.545399][ T5829] bucket 0:38 data type btree ptr gen 0 missing in alloc btree [ 61.545414][ T5829] while marking u64s 11 type btree_ptr_v2 SPOS_MAX len 0 ver 0: seq 7589ab5e0c11cc7a written 24 min_key POS_MIN durability: 1 ptr: 0:38:0 gen 0, fixing [ 61.570670][ T5829] bucket 0:41 data type btree ptr gen 0 missing in alloc btree [ 61.570691][ T5829] while marking u64s 11 type btree_ptr_v2 SPOS_MAX len 0 ver 0: seq 9aa2895aefce4bdf written 24 min_key POS_MIN durability: 1 ptr: 0:41:0 gen 0, fixing [ 61.595261][ T5829] bucket 0:35 data type btree ptr gen 0 missing in alloc btree [ 61.595274][ T5829] while marking u64s 11 type btree_ptr_v2 SPOS_MAX len 0 ver 0: seq c0bef60d07ceb940 written 16 min_key POS_MIN durability: 1 ptr: 0:35:0 gen 0, fixing [ 61.620687][ T5829] bucket 0:29 data type btree ptr gen 0 missing in alloc btree [ 61.620701][ T5829] while marking u64s 11 type btree_ptr_v2 SPOS_MAX len 0 ver 0: seq e81e1ed936acf3df written 32 min_key POS_MIN durability: 1 ptr: 0:29:0 gen 0, fixing [ 61.644725][ T5829] bucket 0:1 gen 0 has wrong data_type: got free, should be sb, fixing [ 61.653275][ T5829] bucket 0:1 gen 0 data type sb has wrong dirty_sectors: got 0, should be 256, fixing [ 61.663992][ T5829] bucket 0:2 gen 0 has wrong data_type: got free, should be sb, fixing [ 61.672470][ T5829] bucket 0:2 gen 0 data type sb has wrong dirty_sectors: got 0, should be 256, fixing [ 61.682461][ T5829] bucket 0:3 gen 0 has wrong data_type: got free, should be sb, fixing [ 61.690857][ T5829] bucket 0:3 gen 0 data type sb has wrong dirty_sectors: got 0, should be 256, fixing [ 61.700673][ T5829] bucket 0:4 gen 0 has wrong data_type: got free, should be sb, fixing [ 61.708947][ T5829] bucket 0:4 gen 0 data type sb has wrong dirty_sectors: got 0, should be 256, fixing [ 61.718765][ T5829] bucket 0:5 gen 0 has wrong data_type: got free, should be sb, fixing [ 61.727156][ T5829] bucket 0:5 gen 0 data type sb has wrong dirty_sectors: got 0, should be 256, fixing [ 61.736980][ T5829] bucket 0:6 gen 0 has wrong data_type: got free, should be sb, fixing [ 61.745410][ T5829] bucket 0:6 gen 0 data type sb has wrong dirty_sectors: got 0, should be 256, fixing [ 61.755190][ T5829] bucket 0:7 gen 0 has wrong data_type: got free, should be sb, fixing [ 61.763678][ T5829] bucket 0:7 gen 0 data type sb has wrong dirty_sectors: got 0, should be 256, fixing [ 61.773441][ T5829] bucket 0:8 gen 0 has wrong data_type: got free, should be sb, fixing [ 61.781787][ T5829] bucket 0:8 gen 0 data type sb has wrong dirty_sectors: got 0, should be 8, fixing [ 61.791333][ T5829] bucket 0:9 gen 0 has wrong data_type: got free, should be journal, fixing [ 61.800209][ T5829] bucket 0:9 gen 0 data type journal has wrong dirty_sectors: got 0, should be 256, fixing [ 61.810478][ T5829] bucket 0:10 gen 0 has wrong data_type: got free, should be journal, fixing [ 61.819317][ T5829] bucket 0:10 gen 0 data type journal has wrong dirty_sectors: got 0, should be 256, fixing [ 61.829733][ T5829] bucket 0:11 gen 0 has wrong data_type: got free, should be journal, fixing [ 61.838517][ T5829] bcachefs (loop0): Ratelimiting new instances of previous error [ 61.846445][ T5829] bucket 0:11 gen 0 data type journal has wrong dirty_sectors: got 0, should be 256, fixing [ 61.856581][ T5829] bcachefs (loop0): Ratelimiting new instances of previous error [ 61.870188][ T5829] done [ 61.874486][ T5829] bcachefs (loop0): going read-write [ 61.881812][ T5829] bcachefs (loop0): journal_replay... [ 61.885123][ T12] u64s 13 type alloc_v4 0:23:0 len 0 ver 0: [ 61.885141][ T12] gen 0 oldest_gen 0 data_type sb [ 61.885147][ T12] journal_seq 0 [ 61.885153][ T12] need_discard 0 [ 61.885159][ T12] need_inc_gen 0 [ 61.885164][ T12] dirty_sectors 256 [ 61.885170][ T12] stripe_sectors 0 [ 61.885176][ T12] cached_sectors 0 [ 61.885181][ T12] stripe 0 [ 61.885187][ T12] stripe_redundancy 0 [ 61.885192][ T12] io_time[READ] 0 [ 61.885198][ T12] io_time[WRITE] 0 [ 61.885203][ T12] fragmentation 0 [ 61.885209][ T12] bp_start 8 [ 61.885214][ T12] [ 61.885220][ T12] incorrectly set at freespace:0:23:0 (free 0, genbits 0 should be 0), fixing [ 61.968629][ T12] u64s 13 type alloc_v4 0:24:0 len 0 ver 0: [ 61.968649][ T12] gen 0 oldest_gen 0 data_type journal [ 61.968656][ T12] journal_seq 0 [ 61.968661][ T12] need_discard 0 [ 61.968667][ T12] need_inc_gen 0 [ 61.968673][ T12] dirty_sectors 256 [ 61.968678][ T12] stripe_sectors 0 [ 61.968684][ T12] cached_sectors 0 [ 61.968690][ T12] stripe 0 [ 61.968695][ T12] stripe_redundancy 0 [ 61.968701][ T12] io_time[READ] 0 [ 61.968706][ T12] io_time[WRITE] 0 [ 61.968712][ T12] fragmentation 0 [ 61.968718][ T12] bp_start 8 [ 61.968723][ T12] [ 61.968728][ T12] incorrectly set at freespace:0:24:0 (free 0, genbits 0 should be 0), fixing [ 62.045276][ T12] ------------[ cut here ]------------ [ 62.050920][ T12] kernel BUG at fs/bcachefs/btree_locking.h:306! [ 62.057273][ T12] Oops: invalid opcode: 0000 [#1] PREEMPT SMP KASAN PTI [ 62.064218][ T12] CPU: 0 UID: 0 PID: 12 Comm: kworker/u8:1 Not tainted 6.12.0-next-20241120-syzkaller #0 [ 62.074017][ T12] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/30/2024 [ 62.084063][ T12] Workqueue: btree_node_rewrite async_btree_node_rewrite_work [ 62.091536][ T12] RIP: 0010:bch2_btree_node_lock_write+0x400/0x430 [ 62.098029][ T12] Code: 06 be 03 00 00 00 48 c7 c7 80 97 f2 8e 48 89 da e8 a5 c3 d4 00 49 bf 00 00 00 00 00 fc ff df e9 f2 fd ff ff e8 b1 69 79 fd 90 <0f> 0b e8 a9 69 79 fd 90 0f 0b e8 a1 69 79 fd 90 0f 0b 48 8b 4c 24 [ 62.117648][ T12] RSP: 0018:ffffc90000117778 EFLAGS: 00010293 [ 62.123713][ T12] RAX: ffffffff8426110f RBX: ffff88802a1c0288 RCX: ffff88801cebda00 [ 62.131677][ T12] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000004 [ 62.139642][ T12] RBP: ffff88802a1c0000 R08: ffffffff84260d65 R09: 1ffffffff2030b7e [ 62.147618][ T12] R10: dffffc0000000000 R11: fffffbfff2030b7f R12: ffff88802a1c0268 [ 62.155579][ T12] R13: 1ffff110061eb513 R14: ffff888030f5a800 R15: dffffc0000000000 [ 62.163544][ T12] FS: 0000000000000000(0000) GS:ffff8880b8600000(0000) knlGS:0000000000000000 [ 62.172468][ T12] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 62.179475][ T12] CR2: 0000562cc6e38028 CR3: 000000007c9ca000 CR4: 00000000003526f0 [ 62.187440][ T12] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 62.195410][ T12] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 62.203370][ T12] Call Trace: [ 62.206637][ T12] [ 62.209561][ T12] ? __die_body+0x5f/0xb0 [ 62.213893][ T12] ? die+0x9e/0xc0 [ 62.217601][ T12] ? do_trap+0x15a/0x3a0 [ 62.221839][ T12] ? bch2_btree_node_lock_write+0x400/0x430 [ 62.227724][ T12] ? do_error_trap+0x1dc/0x2c0 [ 62.232485][ T12] ? bch2_btree_node_lock_write+0x400/0x430 [ 62.238368][ T12] ? __pfx_do_error_trap+0x10/0x10 [ 62.243477][ T12] ? handle_invalid_op+0x34/0x40 [ 62.248418][ T12] ? bch2_btree_node_lock_write+0x400/0x430 [ 62.254312][ T12] ? exc_invalid_op+0x38/0x50 [ 62.258993][ T12] ? asm_exc_invalid_op+0x1a/0x20 [ 62.264006][ T12] ? bch2_btree_node_lock_write+0x55/0x430 [ 62.269801][ T12] ? bch2_btree_node_lock_write+0x3ff/0x430 [ 62.275687][ T12] ? bch2_btree_node_lock_write+0x400/0x430 [ 62.281572][ T12] ? bch2_btree_node_lock_write+0x3ff/0x430 [ 62.287458][ T12] bch2_btree_set_root+0x1d8/0xd10 [ 62.292569][ T12] ? bch2_btree_path_level_init+0x555/0x9f0 [ 62.298458][ T12] bch2_btree_node_rewrite+0x69d/0x1280 [ 62.304005][ T12] ? bch2_btree_node_rewrite+0x225/0x1280 [ 62.309721][ T12] ? __pfx_bch2_btree_node_rewrite+0x10/0x10 [ 62.315702][ T12] ? __asan_memset+0x23/0x50 [ 62.320282][ T12] async_btree_node_rewrite_work+0x31e/0xdf0 [ 62.326296][ T12] ? __pfx_async_btree_node_rewrite_work+0x10/0x10 [ 62.332793][ T12] ? async_btree_node_rewrite_work+0x232/0xdf0 [ 62.338942][ T12] ? __pfx_lockdep_hardirqs_on_prepare+0x10/0x10 [ 62.345270][ T12] ? process_scheduled_works+0x976/0x1850 [ 62.350989][ T12] process_scheduled_works+0xa63/0x1850 [ 62.356539][ T12] ? __pfx_process_scheduled_works+0x10/0x10 [ 62.362553][ T12] ? assign_work+0x364/0x3d0 [ 62.367141][ T12] worker_thread+0x870/0xd30 [ 62.371726][ T12] ? __kthread_parkme+0x169/0x1d0 [ 62.376742][ T12] ? __pfx_worker_thread+0x10/0x10 [ 62.381847][ T12] kthread+0x2f0/0x390 [ 62.385906][ T12] ? __pfx_worker_thread+0x10/0x10 [ 62.391016][ T12] ? __pfx_kthread+0x10/0x10 [ 62.395598][ T12] ret_from_fork+0x4b/0x80 [ 62.400008][ T12] ? __pfx_kthread+0x10/0x10 [ 62.404590][ T12] ret_from_fork_asm+0x1a/0x30 [ 62.409355][ T12] [ 62.412367][ T12] Modules linked in: [ 62.416598][ T12] ---[ end trace 0000000000000000 ]--- [ 62.422312][ T12] RIP: 0010:bch2_btree_node_lock_write+0x400/0x430 [ 62.428836][ T12] Code: 06 be 03 00 00 00 48 c7 c7 80 97 f2 8e 48 89 da e8 a5 c3 d4 00 49 bf 00 00 00 00 00 fc ff df e9 f2 fd ff ff e8 b1 69 79 fd 90 <0f> 0b e8 a9 69 79 fd 90 0f 0b e8 a1 69 79 fd 90 0f 0b 48 8b 4c 24 [ 62.448632][ T12] RSP: 0018:ffffc90000117778 EFLAGS: 00010293 [ 62.454743][ T12] RAX: ffffffff8426110f RBX: ffff88802a1c0288 RCX: ffff88801cebda00 [ 62.462773][ T12] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000004 [ 62.470787][ T12] RBP: ffff88802a1c0000 R08: ffffffff84260d65 R09: 1ffffffff2030b7e [ 62.478766][ T12] R10: dffffc0000000000 R11: fffffbfff2030b7f R12: ffff88802a1c0268 [ 62.486879][ T12] R13: 1ffff110061eb513 R14: ffff888030f5a800 R15: dffffc0000000000 [ 62.494977][ T12] FS: 0000000000000000(0000) GS:ffff8880b8700000(0000) knlGS:0000000000000000 [ 62.503943][ T12] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 62.510655][ T12] CR2: 00007ffdad32efa0 CR3: 000000000e736000 CR4: 00000000003526f0 [ 62.518631][ T12] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 62.526697][ T12] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 62.534768][ T12] Kernel panic - not syncing: Fatal exception [ 62.541087][ T12] Kernel Offset: disabled [ 62.545405][ T12] Rebooting in 86400 seconds..