linux-bcachefs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [syzbot] [bcachefs?] kernel BUG in bch2_trans_update_by_path
@ 2025-06-19 11:18 syzbot
  2025-07-06 22:48 ` syzbot
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: syzbot @ 2025-06-19 11:18 UTC (permalink / raw)
  To: kent.overstreet, linux-bcachefs, linux-kernel, syzkaller-bugs

Hello,

syzbot found the following issue on:

HEAD commit:    fb4d33ab452e Merge tag '6.16-rc2-ksmbd-server-fixes' of gi..
git tree:       upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=12eb6d0c580000
kernel config:  https://syzkaller.appspot.com/x/.config?x=d11f52d3049c3790
dashboard link: https://syzkaller.appspot.com/bug?extid=210dfbddd64294066983
compiler:       Debian clang version 20.1.6 (++20250514063057+1e4d39e07757-1~exp1~20250514183223.118), Debian LLD 20.1.6

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-fb4d33ab.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/123054ec64c2/vmlinux-fb4d33ab.xz
kernel image: https://storage.googleapis.com/syzbot-assets/5e5e20b8a324/bzImage-fb4d33ab.xz

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

bcachefs (loop0): no nodes found for btree extents, continuing
bcachefs (loop0): btree root inodes unreadable, must recover from scan
bcachefs (loop0): bch2_get_scanned_nodes(): recovery btree=inodes 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 7589ab5e0c11cc7a written 24 min_key POS_MIN durability: 1 ptr: 0:38:0 gen 0
bcachefs (loop0): empty interior btree node at btree=inodes 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 inodes
bcachefs (loop0): btree root subvolumes unreadable, must recover from scan
bcachefs (loop0): bch2_get_scanned_nodes(): recovery btree=subvolumes 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 c0bef60d07ceb940 written 16 min_key POS_MIN durability: 1 ptr: 0:35:0 gen 0
 done
bcachefs (loop0): accounting_read... done
bcachefs (loop0): alloc_read... done
bcachefs (loop0): snapshots_read... done
bcachefs (loop0): check_allocations...
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
bcachefs (loop0): bucket 0:41 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 9aa2895aefce4bdf written 24 min_key POS_MIN durability: 1 ptr: 0:41:0 gen 0, fixing
bcachefs (loop0): bucket 0:35 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 c0bef60d07ceb940 written 16 min_key POS_MIN durability: 1 ptr: 0:35:0 gen 0, fixing
bcachefs (loop0): bucket 0:1 gen 0 has wrong data_type: got free, should be sb, fixing
bcachefs (loop0): bucket 0:1 gen 0 data type sb has wrong dirty_sectors: got 0, should be 256, fixing
bcachefs (loop0): bucket 0:2 gen 0 has wrong data_type: got free, should be sb, fixing
bcachefs (loop0): bucket 0:2 gen 0 data type sb has wrong dirty_sectors: got 0, should be 256, fixing
bcachefs (loop0): bucket 0:3 gen 0 has wrong data_type: got free, should be sb, fixing
bcachefs (loop0): bucket 0:3 gen 0 data type sb has wrong dirty_sectors: got 0, should be 256, fixing
bcachefs (loop0): bucket 0:4 gen 0 has wrong data_type: got free, should be sb, fixing
bcachefs (loop0): bucket 0:4 gen 0 data type sb has wrong dirty_sectors: got 0, should be 256, fixing
bcachefs (loop0): bucket 0:5 gen 0 has wrong data_type: got free, should be sb, fixing
bcachefs (loop0): bucket 0:5 gen 0 data type sb has wrong dirty_sectors: got 0, should be 256, fixing
bcachefs (loop0): bucket 0:6 gen 0 has wrong data_type: got free, should be sb, fixing
bcachefs (loop0): bucket 0:6 gen 0 data type sb has wrong dirty_sectors: got 0, should be 256, fixing
bcachefs (loop0): bucket 0:7 gen 0 has wrong data_type: got free, should be sb, fixing
bcachefs (loop0): bucket 0:7 gen 0 data type sb has wrong dirty_sectors: got 0, should be 256, fixing
bcachefs (loop0): bucket 0:8 gen 0 has wrong data_type: got free, should be sb, fixing
bcachefs (loop0): bucket 0:8 gen 0 data type sb has wrong dirty_sectors: got 0, should be 8, fixing
bcachefs (loop0): bucket 0:9 gen 0 has wrong data_type: got free, should be journal, fixing
bcachefs (loop0): bucket 0:9 gen 0 data type journal has wrong dirty_sectors: got 0, should be 256, fixing
bcachefs (loop0): bucket 0:10 gen 0 has wrong data_type: got free, should be journal, fixing
bcachefs (loop0): bucket 0:10 gen 0 data type journal has wrong dirty_sectors: got 0, should be 256, fixing
bcachefs (loop0): bucket 0:11 gen 0 has wrong data_type: got free, should be journal, fixing
  Ratelimiting new instances of previous error
bcachefs (loop0): bucket 0:11 gen 0 data type journal has wrong dirty_sectors: got 0, should be 256, fixing
  Ratelimiting new instances of previous error
 done
bcachefs (loop0): going read-write
bcachefs (loop0): journal_replay...
------------[ cut here ]------------
kernel BUG at fs/bcachefs/btree_update.c:375!
Oops: invalid opcode: 0000 [#1] SMP KASAN NOPTI
CPU: 0 UID: 0 PID: 5324 Comm: syz.0.0 Not tainted 6.16.0-rc2-syzkaller-00082-gfb4d33ab452e #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:bch2_trans_update_by_path+0x1efb/0x1f30 fs/bcachefs/btree_update.c:375
Code: 80 e1 07 fe c1 38 c1 0f 8c 40 f7 ff ff 48 8b 7c 24 28 e8 88 5e fa fd e9 31 f7 ff ff e8 ce df 96 fd 90 0f 0b e8 c6 df 96 fd 90 <0f> 0b e8 be df 96 fd 90 0f 0b e8 b6 df 96 fd 90 0f 0b e8 ae df 96
RSP: 0018:ffffc9000d6be9c8 EFLAGS: 00010283
RAX: ffffffff84297c8a RBX: 0000000000008541 RCX: 0000000000100000
RDX: ffffc9000e002000 RSI: 00000000000b63ac RDI: 00000000000b63ad
RBP: 1ffff1100a622002 R08: ffffffff844d525f R09: 0000000000000002
R10: 0000000000000003 R11: 0000000000000002 R12: 1ffff1100a62205e
R13: ffff888053110010 R14: 0000000000000088 R15: ffff8880531102f0
FS:  00007f529748d6c0(0000) GS:ffff88808d251000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fffb9f0fabc CR3: 0000000043ca6000 CR4: 0000000000352ef0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 bch2_trans_update_ip+0x9a6/0x1db0 fs/bcachefs/btree_update.c:531
 bch2_trans_update fs/bcachefs/btree_update.h:123 [inline]
 bch2_journal_replay_key+0x46a/0xb10 fs/bcachefs/recovery.c:311
 bch2_journal_replay+0x1727/0x2620 fs/bcachefs/recovery.c:396
 bch2_run_recovery_pass fs/bcachefs/recovery_passes.c:485 [inline]
 __bch2_run_recovery_passes+0x395/0x1010 fs/bcachefs/recovery_passes.c:540
 bch2_run_recovery_passes+0x184/0x210 fs/bcachefs/recovery_passes.c:611
 bch2_fs_recovery+0x25fd/0x3950 fs/bcachefs/recovery.c:989
 bch2_fs_start+0xa99/0xd90 fs/bcachefs/super.c:1203
 bch2_fs_get_tree+0xb02/0x14f0 fs/bcachefs/fs.c:2489
 vfs_get_tree+0x8f/0x2b0 fs/super.c:1804
 do_new_mount+0x24a/0xa40 fs/namespace.c:3885
 do_mount fs/namespace.c:4222 [inline]
 __do_sys_mount fs/namespace.c:4433 [inline]
 __se_sys_mount+0x317/0x410 fs/namespace.c:4410
 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:0x7f52965900ca
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:00007f529748ce68 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007f529748cef0 RCX: 00007f52965900ca
RDX: 00002000000000c0 RSI: 0000200000000080 RDI: 00007f529748ceb0
RBP: 00002000000000c0 R08: 00007f529748cef0 R09: 0000000000818001
R10: 0000000000818001 R11: 0000000000000246 R12: 0000200000000080
R13: 00007f529748ceb0 R14: 00000000000059a7 R15: 0000200000000200
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:bch2_trans_update_by_path+0x1efb/0x1f30 fs/bcachefs/btree_update.c:375
Code: 80 e1 07 fe c1 38 c1 0f 8c 40 f7 ff ff 48 8b 7c 24 28 e8 88 5e fa fd e9 31 f7 ff ff e8 ce df 96 fd 90 0f 0b e8 c6 df 96 fd 90 <0f> 0b e8 be df 96 fd 90 0f 0b e8 b6 df 96 fd 90 0f 0b e8 ae df 96
RSP: 0018:ffffc9000d6be9c8 EFLAGS: 00010283
RAX: ffffffff84297c8a RBX: 0000000000008541 RCX: 0000000000100000
RDX: ffffc9000e002000 RSI: 00000000000b63ac RDI: 00000000000b63ad
RBP: 1ffff1100a622002 R08: ffffffff844d525f R09: 0000000000000002
R10: 0000000000000003 R11: 0000000000000002 R12: 1ffff1100a62205e
R13: ffff888053110010 R14: 0000000000000088 R15: ffff8880531102f0
FS:  00007f529748d6c0(0000) GS:ffff88808d251000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fffb9f0fabc CR3: 0000000043ca6000 CR4: 0000000000352ef0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400


---
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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [syzbot] [bcachefs?] kernel BUG in bch2_trans_update_by_path
  2025-06-19 11:18 [syzbot] [bcachefs?] kernel BUG in bch2_trans_update_by_path syzbot
@ 2025-07-06 22:48 ` syzbot
  2025-07-07 12:00 ` syzbot
  2025-08-05  3:52 ` Alan Huang
  2 siblings, 0 replies; 4+ messages in thread
From: syzbot @ 2025-07-06 22:48 UTC (permalink / raw)
  To: kent.overstreet, linux-bcachefs, linux-kernel, syzkaller-bugs

syzbot has found a reproducer for the following issue on:

HEAD commit:    7482bb149b9f Merge branch 'for-next/core' into for-kernelci
git tree:       git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci
console output: https://syzkaller.appspot.com/x/log.txt?x=1675e582580000
kernel config:  https://syzkaller.appspot.com/x/.config?x=3c06e3e2454512b3
dashboard link: https://syzkaller.appspot.com/bug?extid=210dfbddd64294066983
compiler:       Debian clang version 20.1.7 (++20250616065708+6146a88f6049-1~exp1~20250616065826.132), Debian LLD 20.1.7
userspace arch: arm64
syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=1412628c580000
C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=13d5ef70580000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/f623d741d651/disk-7482bb14.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/483e23ae71b1/vmlinux-7482bb14.xz
kernel image: https://storage.googleapis.com/syzbot-assets/79b5baaa1b50/Image-7482bb14.gz.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/da659f915c60/mount_0.gz

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

bcachefs (loop0): bucket 0:34 gen 0 data type need_discard has wrong dirty_sectors: got 16, should be 0, fixing
 done
bcachefs (loop0): going read-write
bcachefs (loop0): journal_replay...
------------[ cut here ]------------
kernel BUG at fs/bcachefs/btree_update.c:375!
Internal error: Oops - BUG: 00000000f2000800 [#1]  SMP
Modules linked in:
CPU: 0 UID: 0 PID: 6741 Comm: syz.0.16 Not tainted 6.16.0-rc4-syzkaller-g7482bb149b9f #0 PREEMPT 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
pstate: 80400005 (Nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : bch2_trans_update_by_path+0x17bc/0x17f0 fs/bcachefs/btree_update.c:375
lr : bch2_trans_update_by_path+0x17bc/0x17f0 fs/bcachefs/btree_update.c:375
sp : ffff80009e1165c0
x29: ffff80009e116780 x28: 0000000000008540 x27: ffff0000c34aca80
x26: ffff0000ec7e0000 x25: ffff700013c22ce0 x24: 1fffe0001d8fc002
x23: ffff0000ec7e0010 x22: ffff0000ec7e02f0 x21: 1fffe0001d8fc05e
x20: dfff800000000000 x19: ffff0000eb400000 x18: 00000000ffffffff
x17: ffff800093363000 x16: ffff80008aefca08 x15: 0000000000000003
x14: 0000000000000000 x13: 0000000000000003 x12: 0000000000ff0100
x11: ffff0000c8ae3d00 x10: 0000000000ff0100 x9 : 0000000000000000
x8 : ffff0000c8ae3d00 x7 : ffffffffffffffff x6 : ffffffffffffffff
x5 : ffff0000ec7e02f0 x4 : ffff800082a4ca28 x3 : 0000000000180000
x2 : ffff0000c34aca80 x1 : 0000000000000000 x0 : 0000000000000000
Call trace:
 bch2_trans_update_by_path+0x17bc/0x17f0 fs/bcachefs/btree_update.c:375 (P)
 bch2_trans_update_ip+0x7bc/0x17ec fs/bcachefs/btree_update.c:531
 bch2_trans_update+0x4c/0x60 fs/bcachefs/btree_update.h:123
 bch2_journal_replay_key+0x348/0x68c fs/bcachefs/recovery.c:311
 bch2_journal_replay+0xfdc/0x1c44 fs/bcachefs/recovery.c:396
 bch2_run_recovery_pass fs/bcachefs/recovery_passes.c:484 [inline]
 __bch2_run_recovery_passes+0x29c/0xd18 fs/bcachefs/recovery_passes.c:539
 bch2_run_recovery_passes+0x174/0x1f4 fs/bcachefs/recovery_passes.c:610
 bch2_fs_recovery+0x1c34/0x2fb4 fs/bcachefs/recovery.c:1005
 bch2_fs_start+0x914/0xbc0 fs/bcachefs/super.c:1212
 bch2_fs_get_tree+0x880/0x1030 fs/bcachefs/fs.c:2490
 vfs_get_tree+0x90/0x28c fs/super.c:1804
 do_new_mount+0x228/0x814 fs/namespace.c:3902
 path_mount+0x5b4/0xde0 fs/namespace.c:4226
 do_mount fs/namespace.c:4239 [inline]
 __do_sys_mount fs/namespace.c:4450 [inline]
 __se_sys_mount fs/namespace.c:4427 [inline]
 __arm64_sys_mount+0x3e8/0x468 fs/namespace.c:4427
 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline]
 invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:49
 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:132
 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:151
 el0_svc+0x58/0x180 arch/arm64/kernel/entry-common.c:879
 el0t_64_sync_handler+0x84/0x12c arch/arm64/kernel/entry-common.c:898
 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:600
Code: 17fffe3f 977aae52 d4210000 977aae50 (d4210000) 
---[ end trace 0000000000000000 ]---


---
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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [syzbot] [bcachefs?] kernel BUG in bch2_trans_update_by_path
  2025-06-19 11:18 [syzbot] [bcachefs?] kernel BUG in bch2_trans_update_by_path syzbot
  2025-07-06 22:48 ` syzbot
@ 2025-07-07 12:00 ` syzbot
  2025-08-05  3:52 ` Alan Huang
  2 siblings, 0 replies; 4+ messages in thread
From: syzbot @ 2025-07-07 12:00 UTC (permalink / raw)
  To: kent.overstreet, linux-bcachefs, linux-kernel, syzkaller-bugs

syzbot has bisected this issue to:

commit d21262d4e35d448cbc80092c91f04cc0a5f2b0b4
Author: Kent Overstreet <kent.overstreet@linux.dev>
Date:   Wed May 28 18:26:33 2025 +0000

    bcachefs: bch2_dev_journal_bucket_delete()

bisection log:  https://syzkaller.appspot.com/x/bisect.txt?x=100a928c580000
start commit:   d7b8f8e20813 Linux 6.16-rc5
git tree:       upstream
final oops:     https://syzkaller.appspot.com/x/report.txt?x=120a928c580000
console output: https://syzkaller.appspot.com/x/log.txt?x=140a928c580000
kernel config:  https://syzkaller.appspot.com/x/.config?x=72aa0474e3c3b9ac
dashboard link: https://syzkaller.appspot.com/bug?extid=210dfbddd64294066983
syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=141a1f70580000
C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=121a1f70580000

Reported-by: syzbot+210dfbddd64294066983@syzkaller.appspotmail.com
Fixes: d21262d4e35d ("bcachefs: bch2_dev_journal_bucket_delete()")

For information about bisection process see: https://goo.gl/tpsmEJ#bisection

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [syzbot] [bcachefs?] kernel BUG in bch2_trans_update_by_path
  2025-06-19 11:18 [syzbot] [bcachefs?] kernel BUG in bch2_trans_update_by_path syzbot
  2025-07-06 22:48 ` syzbot
  2025-07-07 12:00 ` syzbot
@ 2025-08-05  3:52 ` Alan Huang
  2 siblings, 0 replies; 4+ messages in thread
From: Alan Huang @ 2025-08-05  3:52 UTC (permalink / raw)
  To: syzbot; +Cc: kent.overstreet, linux-bcachefs, linux-kernel, syzkaller-bugs

On Jun 19, 2025, at 19:18, syzbot <syzbot+210dfbddd64294066983@syzkaller.appspotmail.com> wrote:
> 
> Hello,
> 
> syzbot found the following issue on:
> 
> HEAD commit:    fb4d33ab452e Merge tag '6.16-rc2-ksmbd-server-fixes' of gi..
> git tree:       upstream
> console output: https://syzkaller.appspot.com/x/log.txt?x=12eb6d0c580000
> kernel config:  https://syzkaller.appspot.com/x/.config?x=d11f52d3049c3790
> dashboard link: https://syzkaller.appspot.com/bug?extid=210dfbddd64294066983
> compiler:       Debian clang version 20.1.6 (++20250514063057+1e4d39e07757-1~exp1~20250514183223.118), Debian LLD 20.1.6
> 
> 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-fb4d33ab.raw.xz
> vmlinux: https://storage.googleapis.com/syzbot-assets/123054ec64c2/vmlinux-fb4d33ab.xz
> kernel image: https://storage.googleapis.com/syzbot-assets/5e5e20b8a324/bzImage-fb4d33ab.xz
> 
> IMPORTANT: if you fix the issue, please add the following tag to the commit:
> Reported-by: syzbot+210dfbddd64294066983@syzkaller.appspotmail.com
> 
> bcachefs (loop0): no nodes found for btree extents, continuing
> bcachefs (loop0): btree root inodes unreadable, must recover from scan
> bcachefs (loop0): bch2_get_scanned_nodes(): recovery btree=inodes 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 7589ab5e0c11cc7a written 24 min_key POS_MIN durability: 1 ptr: 0:38:0 gen 0
> bcachefs (loop0): empty interior btree node at btree=inodes 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 inodes
> bcachefs (loop0): btree root subvolumes unreadable, must recover from scan
> bcachefs (loop0): bch2_get_scanned_nodes(): recovery btree=subvolumes 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 c0bef60d07ceb940 written 16 min_key POS_MIN durability: 1 ptr: 0:35:0 gen 0
> done
> bcachefs (loop0): accounting_read... done
> bcachefs (loop0): alloc_read... done
> bcachefs (loop0): snapshots_read... done
> bcachefs (loop0): check_allocations...
> 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
> bcachefs (loop0): bucket 0:41 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 9aa2895aefce4bdf written 24 min_key POS_MIN durability: 1 ptr: 0:41:0 gen 0, fixing
> bcachefs (loop0): bucket 0:35 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 c0bef60d07ceb940 written 16 min_key POS_MIN durability: 1 ptr: 0:35:0 gen 0, fixing
> bcachefs (loop0): bucket 0:1 gen 0 has wrong data_type: got free, should be sb, fixing
> bcachefs (loop0): bucket 0:1 gen 0 data type sb has wrong dirty_sectors: got 0, should be 256, fixing
> bcachefs (loop0): bucket 0:2 gen 0 has wrong data_type: got free, should be sb, fixing
> bcachefs (loop0): bucket 0:2 gen 0 data type sb has wrong dirty_sectors: got 0, should be 256, fixing
> bcachefs (loop0): bucket 0:3 gen 0 has wrong data_type: got free, should be sb, fixing
> bcachefs (loop0): bucket 0:3 gen 0 data type sb has wrong dirty_sectors: got 0, should be 256, fixing
> bcachefs (loop0): bucket 0:4 gen 0 has wrong data_type: got free, should be sb, fixing
> bcachefs (loop0): bucket 0:4 gen 0 data type sb has wrong dirty_sectors: got 0, should be 256, fixing
> bcachefs (loop0): bucket 0:5 gen 0 has wrong data_type: got free, should be sb, fixing
> bcachefs (loop0): bucket 0:5 gen 0 data type sb has wrong dirty_sectors: got 0, should be 256, fixing
> bcachefs (loop0): bucket 0:6 gen 0 has wrong data_type: got free, should be sb, fixing
> bcachefs (loop0): bucket 0:6 gen 0 data type sb has wrong dirty_sectors: got 0, should be 256, fixing
> bcachefs (loop0): bucket 0:7 gen 0 has wrong data_type: got free, should be sb, fixing
> bcachefs (loop0): bucket 0:7 gen 0 data type sb has wrong dirty_sectors: got 0, should be 256, fixing
> bcachefs (loop0): bucket 0:8 gen 0 has wrong data_type: got free, should be sb, fixing
> bcachefs (loop0): bucket 0:8 gen 0 data type sb has wrong dirty_sectors: got 0, should be 8, fixing
> bcachefs (loop0): bucket 0:9 gen 0 has wrong data_type: got free, should be journal, fixing
> bcachefs (loop0): bucket 0:9 gen 0 data type journal has wrong dirty_sectors: got 0, should be 256, fixing
> bcachefs (loop0): bucket 0:10 gen 0 has wrong data_type: got free, should be journal, fixing
> bcachefs (loop0): bucket 0:10 gen 0 data type journal has wrong dirty_sectors: got 0, should be 256, fixing
> bcachefs (loop0): bucket 0:11 gen 0 has wrong data_type: got free, should be journal, fixing
>  Ratelimiting new instances of previous error
> bcachefs (loop0): bucket 0:11 gen 0 data type journal has wrong dirty_sectors: got 0, should be 256, fixing
>  Ratelimiting new instances of previous error
> done
> bcachefs (loop0): going read-write
> bcachefs (loop0): journal_replay...
> ------------[ cut here ]------------
> kernel BUG at fs/bcachefs/btree_update.c:375!
> Oops: invalid opcode: 0000 [#1] SMP KASAN NOPTI
> CPU: 0 UID: 0 PID: 5324 Comm: syz.0.0 Not tainted 6.16.0-rc2-syzkaller-00082-gfb4d33ab452e #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:bch2_trans_update_by_path+0x1efb/0x1f30 fs/bcachefs/btree_update.c:375
> Code: 80 e1 07 fe c1 38 c1 0f 8c 40 f7 ff ff 48 8b 7c 24 28 e8 88 5e fa fd e9 31 f7 ff ff e8 ce df 96 fd 90 0f 0b e8 c6 df 96 fd 90 <0f> 0b e8 be df 96 fd 90 0f 0b e8 b6 df 96 fd 90 0f 0b e8 ae df 96
> RSP: 0018:ffffc9000d6be9c8 EFLAGS: 00010283
> RAX: ffffffff84297c8a RBX: 0000000000008541 RCX: 0000000000100000
> RDX: ffffc9000e002000 RSI: 00000000000b63ac RDI: 00000000000b63ad
> RBP: 1ffff1100a622002 R08: ffffffff844d525f R09: 0000000000000002
> R10: 0000000000000003 R11: 0000000000000002 R12: 1ffff1100a62205e
> R13: ffff888053110010 R14: 0000000000000088 R15: ffff8880531102f0
> FS:  00007f529748d6c0(0000) GS:ffff88808d251000(0000) knlGS:0000000000000000
> CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> CR2: 00007fffb9f0fabc CR3: 0000000043ca6000 CR4: 0000000000352ef0
> DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
> DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
> Call Trace:
> <TASK>
> bch2_trans_update_ip+0x9a6/0x1db0 fs/bcachefs/btree_update.c:531
> bch2_trans_update fs/bcachefs/btree_update.h:123 [inline]
> bch2_journal_replay_key+0x46a/0xb10 fs/bcachefs/recovery.c:311
> bch2_journal_replay+0x1727/0x2620 fs/bcachefs/recovery.c:396
> bch2_run_recovery_pass fs/bcachefs/recovery_passes.c:485 [inline]
> __bch2_run_recovery_passes+0x395/0x1010 fs/bcachefs/recovery_passes.c:540
> bch2_run_recovery_passes+0x184/0x210 fs/bcachefs/recovery_passes.c:611
> bch2_fs_recovery+0x25fd/0x3950 fs/bcachefs/recovery.c:989
> bch2_fs_start+0xa99/0xd90 fs/bcachefs/super.c:1203
> bch2_fs_get_tree+0xb02/0x14f0 fs/bcachefs/fs.c:2489
> vfs_get_tree+0x8f/0x2b0 fs/super.c:1804
> do_new_mount+0x24a/0xa40 fs/namespace.c:3885
> do_mount fs/namespace.c:4222 [inline]
> __do_sys_mount fs/namespace.c:4433 [inline]
> __se_sys_mount+0x317/0x410 fs/namespace.c:4410
> 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:0x7f52965900ca
> 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:00007f529748ce68 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5
> RAX: ffffffffffffffda RBX: 00007f529748cef0 RCX: 00007f52965900ca
> RDX: 00002000000000c0 RSI: 0000200000000080 RDI: 00007f529748ceb0
> RBP: 00002000000000c0 R08: 00007f529748cef0 R09: 0000000000818001
> R10: 0000000000818001 R11: 0000000000000246 R12: 0000200000000080
> R13: 00007f529748ceb0 R14: 00000000000059a7 R15: 0000200000000200
> </TASK>
> Modules linked in:
> ---[ end trace 0000000000000000 ]---
> RIP: 0010:bch2_trans_update_by_path+0x1efb/0x1f30 fs/bcachefs/btree_update.c:375
> Code: 80 e1 07 fe c1 38 c1 0f 8c 40 f7 ff ff 48 8b 7c 24 28 e8 88 5e fa fd e9 31 f7 ff ff e8 ce df 96 fd 90 0f 0b e8 c6 df 96 fd 90 <0f> 0b e8 be df 96 fd 90 0f 0b e8 b6 df 96 fd 90 0f 0b e8 ae df 96
> RSP: 0018:ffffc9000d6be9c8 EFLAGS: 00010283
> RAX: ffffffff84297c8a RBX: 0000000000008541 RCX: 0000000000100000
> RDX: ffffc9000e002000 RSI: 00000000000b63ac RDI: 00000000000b63ad
> RBP: 1ffff1100a622002 R08: ffffffff844d525f R09: 0000000000000002
> R10: 0000000000000003 R11: 0000000000000002 R12: 1ffff1100a62205e
> R13: ffff888053110010 R14: 0000000000000088 R15: ffff8880531102f0
> FS:  00007f529748d6c0(0000) GS:ffff88808d251000(0000) knlGS:0000000000000000
> CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> CR2: 00007fffb9f0fabc CR3: 0000000043ca6000 CR4: 0000000000352ef0
> DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
> DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
> 
> 
> ---
> 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
> 


#syz fix: bcachefs: Fix btree for nonexistent tree depth


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-08-05  3:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-19 11:18 [syzbot] [bcachefs?] kernel BUG in bch2_trans_update_by_path syzbot
2025-07-06 22:48 ` syzbot
2025-07-07 12:00 ` syzbot
2025-08-05  3:52 ` Alan Huang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).