All of lore.kernel.org
 help / color / mirror / Atom feed
From: syzbot <syzbot+3ba6dd3d414ec2296f3c@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?] kernel BUG in bch2_btree_node_iter_init (2)
Date: Wed, 09 Jul 2025 10:38:30 -0700	[thread overview]
Message-ID: <686ea916.050a0220.385921.0013.GAE@google.com> (raw)

Hello,

syzbot found the following issue on:

HEAD commit:    733923397fd9 Merge tag 'pwm/for-6.16-rc6-fixes' of git://g..
git tree:       upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=10d4b582580000
kernel config:  https://syzkaller.appspot.com/x/.config?x=b309c907eaab29da
dashboard link: https://syzkaller.appspot.com/bug?extid=3ba6dd3d414ec2296f3c
compiler:       Debian clang version 20.1.7 (++20250616065708+6146a88f6049-1~exp1~20250616065826.132), Debian LLD 20.1.7
syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=15fd2a8c580000
C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=115bea8c580000

Downloadable assets:
disk image (non-bootable): https://storage.googleapis.com/syzbot-assets/d900f083ada3/non_bootable_disk-73392339.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/be7feaa77b8c/vmlinux-73392339.xz
kernel image: https://storage.googleapis.com/syzbot-assets/a663b3e31463/bzImage-73392339.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/3e7303eff7fc/mount_0.gz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+3ba6dd3d414ec2296f3c@syzkaller.appspotmail.com

bcachefs (loop0): bucket 0:26 data type btree ptr gen 0 missing in alloc btree
  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
------------[ cut here ]------------
kernel BUG at fs/bcachefs/bset.h:287!
Oops: invalid opcode: 0000 [#1] SMP KASAN NOPTI
CPU: 0 UID: 0 PID: 5498 Comm: syz.0.16 Not tainted 6.16.0-rc5-syzkaller-00038-g733923397fd9 #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:bkey_cmp_p_or_unp fs/bcachefs/bset.h:287 [inline]
RIP: 0010:bset_search_tree fs/bcachefs/bset.c:1129 [inline]
RIP: 0010:__bch2_bset_search fs/bcachefs/bset.c:1181 [inline]
RIP: 0010:bch2_btree_node_iter_init+0x3961/0x3a50 fs/bcachefs/bset.c:1334
Code: fd 90 0f 0b e8 90 a8 a3 fd 90 0f 0b e8 88 a8 a3 fd 90 0f 0b e8 80 a8 a3 fd 90 0f 0b e8 78 a8 a3 fd 90 0f 0b e8 70 a8 a3 fd 90 <0f> 0b e8 68 a8 a3 fd 90 0f 0b e8 60 a8 a3 fd 90 0f 0b e8 58 a8 a3
RSP: 0018:ffffc90002b5e300 EFLAGS: 00010293
RAX: ffffffff841c7e00 RBX: 000000000000004e RCX: ffff888032b52440
RDX: 0000000000000000 RSI: 000000000000004e RDI: 0000000000000001
RBP: ffffc90002b5e530 R08: ffff888032b52440 R09: 0000000000000002
R10: 000000000000ffff R11: 0000000000000000 R12: dffffc0000000000
R13: ffff88803f849908 R14: ffff888011900288 R15: 0000000000000001
FS:  0000555588091500(0000) GS:ffff88808d21b000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007faae076b5a3 CR3: 000000001ee4f000 CR4: 0000000000352ef0
Call Trace:
 <TASK>
 __btree_path_level_init fs/bcachefs/btree_iter.c:617 [inline]
 bch2_btree_path_level_init+0x50b/0xa20 fs/bcachefs/btree_iter.c:637
 btree_path_lock_root fs/bcachefs/btree_iter.c:787 [inline]
 bch2_btree_path_traverse_one+0xfec/0x21d0 fs/bcachefs/btree_iter.c:1203
 bch2_btree_path_traverse fs/bcachefs/btree_iter.h:250 [inline]
 __bch2_btree_iter_peek fs/bcachefs/btree_iter.c:2267 [inline]
 bch2_btree_iter_peek_max+0x9e8/0x58f0 fs/bcachefs/btree_iter.c:2384
 bch2_btree_iter_peek_max_type fs/bcachefs/btree_iter.h:743 [inline]
 bch2_gc_btree fs/bcachefs/btree_gc.c:729 [inline]
 bch2_gc_btrees fs/bcachefs/btree_gc.c:792 [inline]
 bch2_check_allocations+0x120d/0x57b0 fs/bcachefs/btree_gc.c:1094
 bch2_run_recovery_pass fs/bcachefs/recovery_passes.c:484 [inline]
 __bch2_run_recovery_passes+0x392/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:0x7f6704d900ca
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:00007ffd3cd859c8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007ffd3cd85a50 RCX: 00007f6704d900ca
RDX: 00002000000058c0 RSI: 0000200000005900 RDI: 00007ffd3cd85a10
RBP: 00002000000058c0 R08: 00007ffd3cd85a50 R09: 0000000000010000
R10: 0000000000010000 R11: 0000000000000246 R12: 0000200000005900
R13: 00007ffd3cd85a10 R14: 0000000000005923 R15: 0000200000000040
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:bkey_cmp_p_or_unp fs/bcachefs/bset.h:287 [inline]
RIP: 0010:bset_search_tree fs/bcachefs/bset.c:1129 [inline]
RIP: 0010:__bch2_bset_search fs/bcachefs/bset.c:1181 [inline]
RIP: 0010:bch2_btree_node_iter_init+0x3961/0x3a50 fs/bcachefs/bset.c:1334
Code: fd 90 0f 0b e8 90 a8 a3 fd 90 0f 0b e8 88 a8 a3 fd 90 0f 0b e8 80 a8 a3 fd 90 0f 0b e8 78 a8 a3 fd 90 0f 0b e8 70 a8 a3 fd 90 <0f> 0b e8 68 a8 a3 fd 90 0f 0b e8 60 a8 a3 fd 90 0f 0b e8 58 a8 a3
RSP: 0018:ffffc90002b5e300 EFLAGS: 00010293
RAX: ffffffff841c7e00 RBX: 000000000000004e RCX: ffff888032b52440
RDX: 0000000000000000 RSI: 000000000000004e RDI: 0000000000000001
RBP: ffffc90002b5e530 R08: ffff888032b52440 R09: 0000000000000002
R10: 000000000000ffff R11: 0000000000000000 R12: dffffc0000000000
R13: ffff88803f849908 R14: ffff888011900288 R15: 0000000000000001
FS:  0000555588091500(0000) GS:ffff88808d21b000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007faae06c8120 CR3: 000000001ee4f000 CR4: 0000000000352ef0


---
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 syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.

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 17:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-09 17:38 syzbot [this message]
2025-07-10 16:40 ` [syzbot] [bcachefs?] kernel BUG in bch2_btree_node_iter_init (2) syzbot
2025-07-19  1:55 ` Kent Overstreet

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=686ea916.050a0220.385921.0013.GAE@google.com \
    --to=syzbot+3ba6dd3d414ec2296f3c@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.