./strace-static-x86_64 -e \!wait4,clock_nanosleep,nanosleep -s 100 -x -f ./syz-executor3135990184 <...> Warning: Permanently added '10.128.0.48' (ED25519) to the list of known hosts. execve("./syz-executor3135990184", ["./syz-executor3135990184"], 0x7ffe3db29010 /* 10 vars */) = 0 brk(NULL) = 0x555594cd0000 brk(0x555594cd0d00) = 0x555594cd0d00 arch_prctl(ARCH_SET_FS, 0x555594cd0380) = 0 set_tid_address(0x555594cd0650) = 5830 set_robust_list(0x555594cd0660, 24) = 0 rseq(0x555594cd0ca0, 0x20, 0, 0x53053053) = 0 prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0 readlink("/proc/self/exe", "/root/syz-executor3135990184", 4096) = 28 getrandom("\x94\xce\x73\x42\xd4\x03\x8a\x95", 8, GRND_NONBLOCK) = 8 brk(NULL) = 0x555594cd0d00 brk(0x555594cf1d00) = 0x555594cf1d00 brk(0x555594cf2000) = 0x555594cf2000 mprotect(0x7fa5e638e000, 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, 0executing program ) = 0x21000000 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) = 0x7fa5dde00000 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(0x7fa5dde00000, 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 [ 59.819612][ T5830] loop0: detected capacity change from 0 to 32768 [ 59.887429][ T5830] 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 [ 59.907799][ T5830] 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 [ 59.907818][ T5830] nonzero snapshot: delete?, fixing [ 59.928071][ T5830] bcachefs (loop0): recovering from clean shutdown, journal seq 10 [ 59.936214][ T5830] bcachefs (loop0): Version upgrade required: [ 59.936214][ T5830] Version upgrade from 0.128: (unknown version) to 1.7: mi_btree_bitmap incomplete [ 59.936214][ T5830] Doing incompatible version upgrade from 0.128: (unknown version) to 1.13: inode_has_child_snapshots [ 59.936214][ T5830] running recovery passes: check_allocations,check_snapshots,check_subvols,check_inodes,check_dirents,set_fs_needs_rebalance [ 59.982424][ T5830] invalid bkey u64s 17 type inode_v3 0:4097:U32_MAX len 0 ver 0: (unpack error) [ 59.982444][ T5830] invalid variable length fields: delete?, fixing [ 60.000614][ T5830] bcachefs (loop0): error validating btree node at btree alloc level 0/0 [ 60.000629][ T5830] 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 [ 60.000637][ T5830] 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 [ 60.040069][ T5830] invalid bkey u64s 12 type alloc_v4 0:28:0 len 0 ver 0: [ 60.040083][ T5830] gen 0 oldest_gen 0 data_type btree [ 60.040089][ T5830] journal_seq 6 [ 60.040094][ T5830] need_discard 1 [ 60.040100][ T5830] need_inc_gen 1 [ 60.040105][ T5830] dirty_sectors 0 [ 60.040110][ T5830] stripe_sectors 0 [ 60.040115][ T5830] cached_sectors 0 [ 60.040120][ T5830] stripe 0 [ 60.040125][ T5830] stripe_redundancy 0 [ 60.040130][ T5830] io_time[READ] 1 [ 60.040135][ T5830] io_time[WRITE] 768 [ 60.040140][ T5830] fragmentation 0 [ 60.040145][ T5830] bp_start 8 [ 60.040150][ T5830] [ 60.040155][ T5830] invalid data type (got 3 should be 9): delete?, fixing [ 60.112964][ T5830] bcachefs (loop0): btree_node_read_work: rewriting btree node at due to error [ 60.112964][ T5830] 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 [ 60.141054][ T5830] bcachefs (loop0): check_topology... done [ 60.147077][ T5830] bcachefs (loop0): accounting_read... done [ 60.154515][ T5830] bcachefs (loop0): alloc_read... done [ 60.160115][ T5830] bcachefs (loop0): stripes_read... done [ 60.165822][ T5830] bcachefs (loop0): snapshots_read... done [ 60.172013][ T5830] bcachefs (loop0): check_allocations... [ 60.175592][ T5830] bucket 0:26 data type btree ptr gen 0 missing in alloc btree [ 60.175611][ T5830] 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 [ 60.206518][ T5830] bucket 0:38 data type btree ptr gen 0 missing in alloc btree [ 60.206538][ T5830] 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 [ 60.230851][ T5830] bucket 0:41 data type btree ptr gen 0 missing in alloc btree [ 60.230863][ T5830] 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 [ 60.255805][ T5830] bucket 0:35 data type btree ptr gen 0 missing in alloc btree [ 60.255819][ T5830] 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 [ 60.281622][ T5830] bucket 0:29 data type btree ptr gen 0 missing in alloc btree [ 60.281636][ T5830] 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 [ 60.305459][ T5830] bucket 0:1 gen 0 has wrong data_type: got free, should be sb, fixing [ 60.313968][ T5830] bucket 0:1 gen 0 data type sb has wrong dirty_sectors: got 0, should be 256, fixing [ 60.324853][ T5830] bucket 0:2 gen 0 has wrong data_type: got free, should be sb, fixing [ 60.333386][ T5830] bucket 0:2 gen 0 data type sb has wrong dirty_sectors: got 0, should be 256, fixing [ 60.343623][ T5830] bucket 0:3 gen 0 has wrong data_type: got free, should be sb, fixing [ 60.352031][ T5830] bucket 0:3 gen 0 data type sb has wrong dirty_sectors: got 0, should be 256, fixing [ 60.362088][ T5830] bucket 0:4 gen 0 has wrong data_type: got free, should be sb, fixing [ 60.370522][ T5830] bucket 0:4 gen 0 data type sb has wrong dirty_sectors: got 0, should be 256, fixing [ 60.380261][ T5830] bucket 0:5 gen 0 has wrong data_type: got free, should be sb, fixing [ 60.388668][ T5830] bucket 0:5 gen 0 data type sb has wrong dirty_sectors: got 0, should be 256, fixing [ 60.398415][ T5830] bucket 0:6 gen 0 has wrong data_type: got free, should be sb, fixing [ 60.406818][ T5830] bucket 0:6 gen 0 data type sb has wrong dirty_sectors: got 0, should be 256, fixing [ 60.416618][ T5830] bucket 0:7 gen 0 has wrong data_type: got free, should be sb, fixing [ 60.424900][ T5830] bucket 0:7 gen 0 data type sb has wrong dirty_sectors: got 0, should be 256, fixing [ 60.434760][ T5830] bucket 0:8 gen 0 has wrong data_type: got free, should be sb, fixing [ 60.443107][ T5830] bucket 0:8 gen 0 data type sb has wrong dirty_sectors: got 0, should be 8, fixing [ 60.452765][ T5830] bucket 0:9 gen 0 has wrong data_type: got free, should be journal, fixing [ 60.461551][ T5830] bucket 0:9 gen 0 data type journal has wrong dirty_sectors: got 0, should be 256, fixing [ 60.471852][ T5830] bucket 0:10 gen 0 has wrong data_type: got free, should be journal, fixing [ 60.480792][ T5830] bucket 0:10 gen 0 data type journal has wrong dirty_sectors: got 0, should be 256, fixing [ 60.491262][ T5830] bucket 0:11 gen 0 has wrong data_type: got free, should be journal, fixing [ 60.500105][ T5830] bcachefs (loop0): Ratelimiting new instances of previous error [ 60.508015][ T5830] bucket 0:11 gen 0 data type journal has wrong dirty_sectors: got 0, should be 256, fixing [ 60.518164][ T5830] bcachefs (loop0): Ratelimiting new instances of previous error [ 60.531790][ T5830] done [ 60.536086][ T5830] bcachefs (loop0): going read-write [ 60.543902][ T5830] bcachefs (loop0): journal_replay... [ 60.546639][ T11] u64s 13 type alloc_v4 0:23:0 len 0 ver 0: [ 60.546657][ T11] gen 0 oldest_gen 0 data_type sb [ 60.546664][ T11] journal_seq 0 [ 60.546670][ T11] need_discard 0 [ 60.546675][ T11] need_inc_gen 0 [ 60.546681][ T11] dirty_sectors 256 [ 60.546686][ T11] stripe_sectors 0 [ 60.546699][ T11] cached_sectors 0 [ 60.546704][ T11] stripe 0 [ 60.546710][ T11] stripe_redundancy 0 [ 60.546716][ T11] io_time[READ] 0 [ 60.546721][ T11] io_time[WRITE] 0 [ 60.546727][ T11] fragmentation 0 [ 60.546732][ T11] bp_start 8 [ 60.546738][ T11] [ 60.546743][ T11] incorrectly set at freespace:0:23:0 (free 0, genbits 0 should be 0), fixing [ 60.629748][ T11] u64s 13 type alloc_v4 0:24:0 len 0 ver 0: [ 60.629769][ T11] gen 0 oldest_gen 0 data_type journal [ 60.629776][ T11] journal_seq 0 [ 60.629782][ T11] need_discard 0 [ 60.629787][ T11] need_inc_gen 0 [ 60.629793][ T11] dirty_sectors 256 [ 60.629799][ T11] stripe_sectors 0 [ 60.629804][ T11] cached_sectors 0 [ 60.629810][ T11] stripe 0 [ 60.629815][ T11] stripe_redundancy 0 [ 60.629821][ T11] io_time[READ] 0 [ 60.629826][ T11] io_time[WRITE] 0 [ 60.629832][ T11] fragmentation 0 [ 60.629837][ T11] bp_start 8 [ 60.629843][ T11] [ 60.629848][ T11] incorrectly set at freespace:0:24:0 (free 0, genbits 0 should be 0), fixing [ 60.708378][ T11] ------------[ cut here ]------------ [ 60.713980][ T11] kernel BUG at fs/bcachefs/btree_locking.h:306! [ 60.720586][ T11] Oops: invalid opcode: 0000 [#1] PREEMPT SMP KASAN PTI [ 60.727573][ T11] CPU: 1 UID: 0 PID: 11 Comm: kworker/u8:0 Not tainted 6.12.0-next-20241120-syzkaller #0 [ 60.737361][ T11] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/30/2024 [ 60.747419][ T11] Workqueue: btree_node_rewrite async_btree_node_rewrite_work [ 60.754877][ T11] RIP: 0010:bch2_btree_node_lock_write+0x400/0x430 [ 60.761503][ T11] 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 [ 60.781104][ T11] RSP: 0018:ffffc90000107778 EFLAGS: 00010293 [ 60.787169][ T11] RAX: ffffffff8426110f RBX: ffff88803485c288 RCX: ffff88801befbc00 [ 60.795132][ T11] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000004 [ 60.803117][ T11] RBP: ffff88803485c000 R08: ffffffff84260d65 R09: 1ffffffff2030b7e [ 60.811082][ T11] R10: dffffc0000000000 R11: fffffbfff2030b7f R12: ffff88803485c268 [ 60.819039][ T11] R13: 1ffff110061a4b13 R14: ffff888030d25800 R15: dffffc0000000000 [ 60.827011][ T11] FS: 0000000000000000(0000) GS:ffff8880b8700000(0000) knlGS:0000000000000000 [ 60.835930][ T11] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 60.842499][ T11] CR2: 000055976c6126b8 CR3: 000000007b348000 CR4: 00000000003526f0 [ 60.850457][ T11] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 60.858410][ T11] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 60.866381][ T11] Call Trace: [ 60.869662][ T11] [ 60.872586][ T11] ? __die_body+0x5f/0xb0 [ 60.876927][ T11] ? die+0x9e/0xc0 [ 60.880645][ T11] ? do_trap+0x15a/0x3a0 [ 60.884877][ T11] ? bch2_btree_node_lock_write+0x400/0x430 [ 60.890872][ T11] ? do_error_trap+0x1dc/0x2c0 [ 60.895664][ T11] ? bch2_btree_node_lock_write+0x400/0x430 [ 60.901557][ T11] ? __pfx_do_error_trap+0x10/0x10 [ 60.906667][ T11] ? handle_invalid_op+0x34/0x40 [ 60.911593][ T11] ? bch2_btree_node_lock_write+0x400/0x430 [ 60.917481][ T11] ? exc_invalid_op+0x38/0x50 [ 60.922154][ T11] ? asm_exc_invalid_op+0x1a/0x20 [ 60.927173][ T11] ? bch2_btree_node_lock_write+0x55/0x430 [ 60.933047][ T11] ? bch2_btree_node_lock_write+0x3ff/0x430 [ 60.938942][ T11] ? bch2_btree_node_lock_write+0x400/0x430 [ 60.944820][ T11] ? bch2_btree_node_lock_write+0x3ff/0x430 [ 60.951128][ T11] bch2_btree_set_root+0x1d8/0xd10 [ 60.956228][ T11] ? bch2_btree_path_level_init+0x555/0x9f0 [ 60.962104][ T11] bch2_btree_node_rewrite+0x69d/0x1280 [ 60.967642][ T11] ? bch2_btree_node_rewrite+0x225/0x1280 [ 60.973348][ T11] ? __pfx_bch2_btree_node_rewrite+0x10/0x10 [ 60.979339][ T11] ? __asan_memset+0x23/0x50 [ 60.983913][ T11] async_btree_node_rewrite_work+0x31e/0xdf0 [ 60.989878][ T11] ? __pfx_async_btree_node_rewrite_work+0x10/0x10 [ 60.996374][ T11] ? async_btree_node_rewrite_work+0x232/0xdf0 [ 61.002542][ T11] ? __pfx_lockdep_hardirqs_on_prepare+0x10/0x10 [ 61.008941][ T11] ? process_scheduled_works+0x976/0x1850 [ 61.014648][ T11] process_scheduled_works+0xa63/0x1850 [ 61.020206][ T11] ? __pfx_process_scheduled_works+0x10/0x10 [ 61.026171][ T11] ? assign_work+0x364/0x3d0 [ 61.030848][ T11] worker_thread+0x870/0xd30 [ 61.035423][ T11] ? __kthread_parkme+0x169/0x1d0 [ 61.040440][ T11] ? __pfx_worker_thread+0x10/0x10 [ 61.045534][ T11] kthread+0x2f0/0x390 [ 61.049582][ T11] ? __pfx_worker_thread+0x10/0x10 [ 61.054688][ T11] ? __pfx_kthread+0x10/0x10 [ 61.059258][ T11] ret_from_fork+0x4b/0x80 [ 61.063673][ T11] ? __pfx_kthread+0x10/0x10 [ 61.068264][ T11] ret_from_fork_asm+0x1a/0x30 [ 61.073025][ T11] [ 61.076048][ T11] Modules linked in: [ 61.080123][ T11] ---[ end trace 0000000000000000 ]--- [ 61.085770][ T11] RIP: 0010:bch2_btree_node_lock_write+0x400/0x430 [ 61.092456][ T11] 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 [ 61.112198][ T11] RSP: 0018:ffffc90000107778 EFLAGS: 00010293 [ 61.118450][ T11] RAX: ffffffff8426110f RBX: ffff88803485c288 RCX: ffff88801befbc00 [ 61.126422][ T11] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000004 [ 61.134449][ T11] RBP: ffff88803485c000 R08: ffffffff84260d65 R09: 1ffffffff2030b7e [ 61.142471][ T11] R10: dffffc0000000000 R11: fffffbfff2030b7f R12: ffff88803485c268 [ 61.150525][ T11] R13: 1ffff110061a4b13 R14: ffff888030d25800 R15: dffffc0000000000 [ 61.158548][ T11] FS: 0000000000000000(0000) GS:ffff8880b8700000(0000) knlGS:0000000000000000 [ 61.167506][ T11] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 61.174094][ T11] CR2: 000055976c6126b8 CR3: 000000000e736000 CR4: 00000000003526f0 [ 61.182134][ T11] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 61.190172][ T11] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 61.198435][ T11] Kernel panic - not syncing: Fatal exception [ 61.204640][ T11] Kernel Offset: disabled [ 61.208951][ T11] Rebooting in 86400 seconds..