From: syzbot <syzbot+6f91a1a3e34f980bb72c@syzkaller.appspotmail.com>
To: kent.overstreet@linux.dev, linux-bcachefs@vger.kernel.org,
linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: [syzbot] [bcachefs?] WARNING in bch2_btree_node_mem_alloc (2)
Date: Wed, 09 Jul 2025 03:19:35 -0700 [thread overview]
Message-ID: <686e4237.a00a0220.296254.038a.GAE@google.com> (raw)
Hello,
syzbot found the following issue on:
HEAD commit: c435a4f487e8 Merge tag 'riscv-for-linus-6.16-rc5' of git:/..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=13c4cf70580000
kernel config: https://syzkaller.appspot.com/x/.config?x=b29b1a0d7330d4a8
dashboard link: https://syzkaller.appspot.com/bug?extid=6f91a1a3e34f980bb72c
compiler: Debian clang version 20.1.7 (++20250616065708+6146a88f6049-1~exp1~20250616065826.132), Debian LLD 20.1.7
Unfortunately, I don't have any reproducer for this issue yet.
Downloadable assets:
disk image (non-bootable): https://storage.googleapis.com/syzbot-assets/d900f083ada3/non_bootable_disk-c435a4f4.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/3a184d1ad283/vmlinux-c435a4f4.xz
kernel image: https://storage.googleapis.com/syzbot-assets/db5931917c56/bzImage-c435a4f4.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+6f91a1a3e34f980bb72c@syzkaller.appspotmail.com
loop0: detected capacity change from 0 to 32768
bcachefs (loop0): starting version 1.519: (unknown version) opts=metadata_checksum=none,data_checksum=none,checksum_err_retry_nr=0,compression=lz4,nopromote_whole_extents,fsck,norecovery,nojournal_transaction_names,allocator_stuck_timeout=3,version_upgrade=incompatible
allowing incompatible features above 0.0: (unknown version)
features: lz4,new_siphash,inline_data,new_extent_overwrite,btree_ptr_v2,new_varint,journal_no_flush,alloc_v2,extents_across_btree_nodes
bcachefs (loop0): Using encoding defined by superblock: utf8-12.1.0
bcachefs (loop0): invalid bkey in superblock btree=extents level=1: u64s 11 type btree_ptr_v2 SPOS_MAX len 0 ver 0: seq c6c25c03258c59c5 written 16 min_key 360287970189639680:0:0 durability: 0 (invalid extent entry 000000000001b000)
invalid extent entry type (got 12, max 7), deleting
bcachefs (loop0): recovering from clean shutdown, journal seq 10
bcachefs (loop0): Version downgrade required:
bcachefs (loop0): Version upgrade required:
Version upgrade from 0.24: unwritten_extents to 1.519: (unknown version) incomplete
Doing incompatible version upgrade from 0.24: unwritten_extents to 1.28: inode_has_case_insensitive
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,check_rebalance_work,set_fs_needs_rebalance
bcachefs (loop0): Now allowing incompatible features up to 1.28: inode_has_case_insensitive, previously allowed up to 0.0: (unknown version)
bcachefs (loop0): error reading btree root btree=dirents level=0: btree_node_read_error, fixing
bcachefs (loop0): invalid bkey in btree_node btree=alloc level=0: u64s 11 type xattr POS_MIN len 0 ver 0: (type 1):
invalid key type for btree alloc (xattr), deleting
bcachefs (loop0): error reading btree root btree=alloc level=0: btree_node_read_error, fixing
bcachefs (loop0): btree node read error at btree snapshots level 0/0
u64s 11 type btree_ptr_v2 SPOS_MAX len 0 ver 0: seq ebb8d5a9e3463bdb written 16 min_key 0:262144:0 durability: 1 ptr: 0:32:0 gen 0
loop0 node offset 0/16: incorrect min_key: got POS_MIN should be 0:262144:0
flagging btree snapshots lost data
running recovery pass reconstruct_snapshots (21), currently at recovery_pass_empty (0)
ret btree_node_read_validate_error
bcachefs (loop0): error reading btree root btree=snapshots level=0: btree_node_read_error, fixing
bcachefs (loop0): error reading btree root btree=freespace level=0: btree_node_read_error, fixing
bcachefs (loop0): check_topology...
bcachefs (loop0): btree root dirents unreadable, must recover from scan
bcachefs (loop0): running recovery pass scan_for_btree_nodes (1), currently at check_topology (2) - rewinding
bcachefs (loop0): bch2_check_root(): error restart_recovery
bcachefs (loop0): scan_for_btree_nodes...
bcachefs (loop0): btree node scan found 7 nodes after overwrites
done
bcachefs (loop0): check_topology...
bcachefs (loop0): btree root dirents unreadable, must recover from scan
bcachefs (loop0): bch2_get_scanned_nodes(): recovery btree=dirents level=0 POS_MIN - SPOS_MAX
bcachefs (loop0): bch2_get_scanned_nodes(): recovering 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
bcachefs (loop0): empty interior btree node at btree=dirents level=1
u64s 5 type btree_ptr SPOS_MAX len 0 ver 0, fixing
bcachefs (loop0): bch2_btree_repair_topology_recurse(): error ECHILD
bcachefs (loop0): empty btree root dirents
bcachefs (loop0): btree root snapshots unreadable, must recover from scan
------------[ cut here ]------------
btree cache cannibalize failed
WARNING: CPU: 0 PID: 5351 at fs/bcachefs/btree_cache.c:771 btree_node_cannibalize fs/bcachefs/btree_cache.c:771 [inline]
WARNING: CPU: 0 PID: 5351 at fs/bcachefs/btree_cache.c:771 bch2_btree_node_mem_alloc+0x1015/0x1820 fs/bcachefs/btree_cache.c:871
Modules linked in:
CPU: 0 UID: 0 PID: 5351 Comm: syz.0.0 Not tainted 6.16.0-rc4-syzkaller-00286-gc435a4f487e8 #0 PREEMPT(full)
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014
RIP: 0010:btree_node_cannibalize fs/bcachefs/btree_cache.c:771 [inline]
RIP: 0010:bch2_btree_node_mem_alloc+0x1015/0x1820 fs/bcachefs/btree_cache.c:871
Code: d2 e8 8f ca 74 fd 2e 2e 2e 31 c0 e9 a6 fe ff ff e8 c0 ae a2 fd c6 05 4d 27 6e 0b 01 90 48 c7 c7 c0 24 d3 8b e8 3c 57 66 fd 90 <0f> 0b 90 90 eb c3 e8 a0 ae a2 fd eb 05 e8 99 ae a2 fd 49 8d bf b0
RSP: 0018:ffffc9000d4b6d40 EFLAGS: 00010246
RAX: 35dc07f7034c9600 RBX: ffff888059d80000 RCX: 0000000000100000
RDX: ffffc9000f7e1000 RSI: 00000000000fffff RDI: 0000000000100000
RBP: ffff888059d81ce8 R08: ffff88801fc24293 R09: 1ffff11003f84852
R10: dffffc0000000000 R11: ffffed1003f84853 R12: ffff888059cfc800
R13: ffff888059cfca28 R14: ffff888059d81cf0 R15: dffffc0000000000
FS: 00007f3575bd46c0(0000) GS:ffff88808d21c000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055558c3af5f8 CR3: 0000000011c4d000 CR4: 0000000000352ef0
Call Trace:
<TASK>
bch2_btree_root_alloc_fake_trans+0x141/0xb00 fs/bcachefs/btree_update_interior.c:2655
bch2_check_root fs/bcachefs/btree_gc.c:566 [inline]
bch2_check_topology+0x390/0xe00 fs/bcachefs/btree_gc.c:594
bch2_run_recovery_pass fs/bcachefs/recovery_passes.c:484 [inline]
__bch2_run_recovery_passes+0x395/0x1010 fs/bcachefs/recovery_passes.c:539
bch2_run_recovery_passes+0x184/0x210 fs/bcachefs/recovery_passes.c:610
bch2_fs_recovery+0x2690/0x3a50 fs/bcachefs/recovery.c:1005
bch2_fs_start+0xaaf/0xda0 fs/bcachefs/super.c:1213
bch2_fs_get_tree+0xb39/0x1520 fs/bcachefs/fs.c:2488
vfs_get_tree+0x92/0x2b0 fs/super.c:1804
do_new_mount+0x24a/0xa40 fs/namespace.c:3902
do_mount fs/namespace.c:4239 [inline]
__do_sys_mount fs/namespace.c:4450 [inline]
__se_sys_mount+0x317/0x410 fs/namespace.c:4427
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f35797900ca
Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb a6 e8 de 1a 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 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f3575bd3e68 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007f3575bd3ef0 RCX: 00007f35797900ca
RDX: 00002000000000c0 RSI: 0000200000000100 RDI: 00007f3575bd3eb0
RBP: 00002000000000c0 R08: 00007f3575bd3ef0 R09: 000000000000001e
R10: 000000000000001e R11: 0000000000000246 R12: 0000200000000100
R13: 00007f3575bd3eb0 R14: 0000000000005aa7 R15: 00002000000001c0
</TASK>
---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzkaller@googlegroups.com.
syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title
If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)
If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report
If you want to undo deduplication, reply with:
#syz undup
reply other threads:[~2025-07-09 10:19 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=686e4237.a00a0220.296254.038a.GAE@google.com \
--to=syzbot+6f91a1a3e34f980bb72c@syzkaller.appspotmail.com \
--cc=kent.overstreet@linux.dev \
--cc=linux-bcachefs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=syzkaller-bugs@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.