linux-bcachefs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [syzbot] [bcachefs?] kernel BUG in __bch2_trans_commit (3)
@ 2025-07-12  8:32 syzbot
  2025-08-23 17:35 ` syzbot
  2025-09-01 14:28 ` syzbot
  0 siblings, 2 replies; 3+ messages in thread
From: syzbot @ 2025-07-12  8:32 UTC (permalink / raw)
  To: kent.overstreet, linux-bcachefs, linux-kernel, syzkaller-bugs

Hello,

syzbot found the following issue on:

HEAD commit:    40f92e79b0aa Merge tag 'block-6.16-20250710' of git://git...
git tree:       upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=169a7bd4580000
kernel config:  https://syzkaller.appspot.com/x/.config?x=b309c907eaab29da
dashboard link: https://syzkaller.appspot.com/bug?extid=b6ef9edaba01d5b4e43f
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-40f92e79.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/8022f6fa9a48/vmlinux-40f92e79.xz
kernel image: https://storage.googleapis.com/syzbot-assets/565fa9fa3299/bzImage-40f92e79.xz

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

bcachefs (loop0): btree ptr not marked in member info btree allocated bitmap
  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: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): btree ptr not marked in member info btree allocated bitmap
  u64s 11 type btree_ptr_v2 SPOS_MAX len 0 ver 0: seq ebb8d5a9e3463bdb written 16 min_key POS_MIN durability: 1 ptr: 0:32:0 gen 0, fixing
bcachefs (loop0): btree ptr not marked in member info btree allocated bitmap
  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
bcachefs (loop0): bucket 0:29 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 e81e1ed936acf3df written 32 min_key POS_MIN durability: 1 ptr: 0:29: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... done
bcachefs (loop0): check_extents_to_backpointers...
bcachefs (loop0): scanning for missing backpointers in 4/128 buckets
 done
bcachefs (loop0): check_inodes... done
bcachefs (loop0): resume_logged_ops... done
bcachefs (loop0): delete_dead_inodes... done
bcachefs (loop0): done starting filesystem
=======================================================
WARNING: The mand mount option has been deprecated and
         and is ignored by this kernel. Remove the mand
         option from the mount to silence this warning.
=======================================================
------------[ cut here ]------------
kernel BUG at fs/bcachefs/btree_trans_commit.c:348!
Oops: invalid opcode: 0000 [#1] SMP KASAN NOPTI
CPU: 0 UID: 0 PID: 5344 Comm: syz.0.0 Not tainted 6.16.0-rc5-syzkaller-00193-g40f92e79b0aa #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_insert_entry_checks fs/bcachefs/btree_trans_commit.c:343 [inline]
RIP: 0010:bch2_trans_commit_write_locked fs/bcachefs/btree_trans_commit.c:725 [inline]
RIP: 0010:do_bch2_trans_commit fs/bcachefs/btree_trans_commit.c:854 [inline]
RIP: 0010:__bch2_trans_commit+0x86e5/0x8870 fs/bcachefs/btree_trans_commit.c:1085
Code: 97 fd eb 0c e8 2c 78 97 fd eb 05 e8 25 78 97 fd 49 bd 00 00 00 00 00 fc ff df 4c 8b 64 24 48 e9 e1 af ff ff e8 0c 78 97 fd 90 <0f> 0b e8 04 78 97 fd 90 0f 0b e8 fc 77 97 fd 90 0f 0b e8 f4 77 97
RSP: 0018:ffffc9000d357780 EFLAGS: 00010287
RAX: ffffffff8428be64 RBX: ffffffff84288035 RCX: 0000000000100000
RDX: ffffc9000df42000 RSI: 0000000000004ab7 RDI: 0000000000004ab8
RBP: ffffc9000d357a70 R08: 0000000000000000 R09: ffffffff84288035
R10: dffffc0000000000 R11: ffffed100a6a9309 R12: ffff8880525b4020
R13: dffffc0000000000 R14: ffff8880525b64d8 R15: 0000000000000001
FS:  00007fe567cac6c0(0000) GS:ffff88808d21b000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f10bffd2000 CR3: 000000003f923000 CR4: 0000000000352ef0
Call Trace:
 <TASK>
 bch2_trans_commit fs/bcachefs/btree_update.h:241 [inline]
 __bch2_unlink+0x2b9/0x530 fs/bcachefs/fs.c:827
 bch2_unlink+0xb1/0xf0 fs/bcachefs/fs.c:864
 vfs_unlink+0x391/0x650 fs/namei.c:4595
 do_unlinkat+0x350/0x560 fs/namei.c:4659
 __do_sys_unlink fs/namei.c:4705 [inline]
 __se_sys_unlink fs/namei.c:4703 [inline]
 __x64_sys_unlink+0x47/0x50 fs/namei.c:4703
 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:0x7fe566d8e929
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 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:00007fe567cac038 EFLAGS: 00000246 ORIG_RAX: 0000000000000057
RAX: ffffffffffffffda RBX: 00007fe566fb5fa0 RCX: 00007fe566d8e929
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000200000000180
RBP: 00007fe566e10b39 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007fe566fb5fa0 R15: 00007fff2f8fbd98
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:btree_insert_entry_checks fs/bcachefs/btree_trans_commit.c:343 [inline]
RIP: 0010:bch2_trans_commit_write_locked fs/bcachefs/btree_trans_commit.c:725 [inline]
RIP: 0010:do_bch2_trans_commit fs/bcachefs/btree_trans_commit.c:854 [inline]
RIP: 0010:__bch2_trans_commit+0x86e5/0x8870 fs/bcachefs/btree_trans_commit.c:1085
Code: 97 fd eb 0c e8 2c 78 97 fd eb 05 e8 25 78 97 fd 49 bd 00 00 00 00 00 fc ff df 4c 8b 64 24 48 e9 e1 af ff ff e8 0c 78 97 fd 90 <0f> 0b e8 04 78 97 fd 90 0f 0b e8 fc 77 97 fd 90 0f 0b e8 f4 77 97
RSP: 0018:ffffc9000d357780 EFLAGS: 00010287
RAX: ffffffff8428be64 RBX: ffffffff84288035 RCX: 0000000000100000
RDX: ffffc9000df42000 RSI: 0000000000004ab7 RDI: 0000000000004ab8
RBP: ffffc9000d357a70 R08: 0000000000000000 R09: ffffffff84288035
R10: dffffc0000000000 R11: ffffed100a6a9309 R12: ffff8880525b4020
R13: dffffc0000000000 R14: ffff8880525b64d8 R15: 0000000000000001
FS:  00007fe567cac6c0(0000) GS:ffff88808d21b000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fe567c8afc8 CR3: 000000003f923000 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 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] 3+ messages in thread

* Re: [syzbot] [bcachefs?] kernel BUG in __bch2_trans_commit (3)
  2025-07-12  8:32 [syzbot] [bcachefs?] kernel BUG in __bch2_trans_commit (3) syzbot
@ 2025-08-23 17:35 ` syzbot
  2025-09-01 14:28 ` syzbot
  1 sibling, 0 replies; 3+ messages in thread
From: syzbot @ 2025-08-23 17:35 UTC (permalink / raw)
  To: kent.overstreet, linux-bcachefs, linux-kernel, syzkaller-bugs

syzbot has found a reproducer for the following issue on:

HEAD commit:    8f5ae30d69d7 Linux 6.17-rc1
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=1157bfa2580000
kernel config:  https://syzkaller.appspot.com/x/.config?x=8c5ac3d8b8abfcb
dashboard link: https://syzkaller.appspot.com/bug?extid=b6ef9edaba01d5b4e43f
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=1424cc42580000
C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=1120a7bc580000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/18a2e4bd0c4a/disk-8f5ae30d.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/3b5395881b25/vmlinux-8f5ae30d.xz
kernel image: https://storage.googleapis.com/syzbot-assets/e875f4e3b7ff/Image-8f5ae30d.gz.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/42de714fb1cc/mount_0.gz

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

------------[ cut here ]------------
kernel BUG at fs/bcachefs/btree_trans_commit.c:348!
Internal error: Oops - BUG: 00000000f2000800 [#1]  SMP
Modules linked in:
CPU: 1 UID: 0 PID: 15 Comm: kworker/u8:1 Not tainted 6.17.0-rc1-syzkaller-g8f5ae30d69d7 #0 PREEMPT 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/30/2025
Workqueue: writeback wb_workfn (flush-bcachefs-1)
pstate: 83400005 (Nzcv daif +PAN -UAO +TCO +DIT -SSBS BTYPE=--)
pc : btree_insert_entry_checks fs/bcachefs/btree_trans_commit.c:343 [inline]
pc : bch2_trans_commit_write_locked fs/bcachefs/btree_trans_commit.c:725 [inline]
pc : do_bch2_trans_commit fs/bcachefs/btree_trans_commit.c:854 [inline]
pc : __bch2_trans_commit+0x6054/0x625c fs/bcachefs/btree_trans_commit.c:1085
lr : btree_insert_entry_checks fs/bcachefs/btree_trans_commit.c:343 [inline]
lr : bch2_trans_commit_write_locked fs/bcachefs/btree_trans_commit.c:725 [inline]
lr : do_bch2_trans_commit fs/bcachefs/btree_trans_commit.c:854 [inline]
lr : __bch2_trans_commit+0x6054/0x625c fs/bcachefs/btree_trans_commit.c:1085
sp : ffff800097c46c40
x29: ffff800097c46f60 x28: 00000000ffffffff x27: ffff0000cbb7e4d8
x26: ffff800092df2000 x25: 0000000000000000 x24: dfff800000000000
x23: ffff800092df2000 x22: ffff0000cbb7c020 x21: ffff0000cbb7c042
x20: 0000000000000001 x19: 0000000000000001 x18: 00000000ffffffff
x17: ffff800093507000 x16: ffff80008b007340 x15: 0000000000000002
x14: 1ffff00012f88cb0 x13: 0000000000000000 x12: 0000000000000000
x11: 00000000eacee03a x10: 0000000000ff0100 x9 : 0000000000000000
x8 : ffff0000c1a03d00 x7 : ffff8000828f3158 x6 : 0000000000000000
x5 : 0000000000000000 x4 : 0000000000000000 x3 : 0000000000000002
x2 : 0000000000000008 x1 : 0000000000000080 x0 : ffff0000c1a03d00
Call trace:
 btree_insert_entry_checks fs/bcachefs/btree_trans_commit.c:343 [inline] (P)
 bch2_trans_commit_write_locked fs/bcachefs/btree_trans_commit.c:725 [inline] (P)
 do_bch2_trans_commit fs/bcachefs/btree_trans_commit.c:854 [inline] (P)
 __bch2_trans_commit+0x6054/0x625c fs/bcachefs/btree_trans_commit.c:1085 (P)
 bch2_trans_commit fs/bcachefs/btree_update.h:241 [inline]
 bch2_write_inode+0x52c/0x92c fs/bcachefs/fs.c:136
 bch2_vfs_write_inode+0x84/0xcc fs/bcachefs/fs.c:2148
 write_inode fs/fs-writeback.c:1525 [inline]
 __writeback_single_inode+0x5ac/0x13e8 fs/fs-writeback.c:1745
 writeback_sb_inodes+0x55c/0xe40 fs/fs-writeback.c:1976
 wb_writeback+0x3cc/0xd70 fs/fs-writeback.c:2156
 wb_do_writeback fs/fs-writeback.c:2303 [inline]
 wb_workfn+0x338/0xdc0 fs/fs-writeback.c:2343
 process_one_work+0x7e8/0x155c kernel/workqueue.c:3236
 process_scheduled_works kernel/workqueue.c:3319 [inline]
 worker_thread+0x958/0xed8 kernel/workqueue.c:3400
 kthread+0x5fc/0x75c kernel/kthread.c:463
 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:844
Code: f940abe0 978e09e2 17ffffe0 97790f85 (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] 3+ messages in thread

* Re: [syzbot] [bcachefs?] kernel BUG in __bch2_trans_commit (3)
  2025-07-12  8:32 [syzbot] [bcachefs?] kernel BUG in __bch2_trans_commit (3) syzbot
  2025-08-23 17:35 ` syzbot
@ 2025-09-01 14:28 ` syzbot
  1 sibling, 0 replies; 3+ messages in thread
From: syzbot @ 2025-09-01 14:28 UTC (permalink / raw)
  To: kent.overstreet, linux-bcachefs, linux-kernel, syzkaller-bugs

syzbot has bisected this issue to:

commit d0855e210675b8018f4e89ca77cbfa133bce3a71
Author: Kent Overstreet <kent.overstreet@linux.dev>
Date:   Thu Dec 12 09:03:32 2024 +0000

    bcachefs: Kill snapshot_t->equiv

bisection log:  https://syzkaller.appspot.com/x/bisect.txt?x=14f2e242580000
start commit:   c330cb607721 Merge tag 'i2c-for-6.17-rc3' of git://git.ker..
git tree:       upstream
final oops:     https://syzkaller.appspot.com/x/report.txt?x=16f2e242580000
console output: https://syzkaller.appspot.com/x/log.txt?x=12f2e242580000
kernel config:  https://syzkaller.appspot.com/x/.config?x=e1e1566c7726877e
dashboard link: https://syzkaller.appspot.com/bug?extid=b6ef9edaba01d5b4e43f
syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=163eac42580000
C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=136c1862580000

Reported-by: syzbot+b6ef9edaba01d5b4e43f@syzkaller.appspotmail.com
Fixes: d0855e210675 ("bcachefs: Kill snapshot_t->equiv")

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

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

end of thread, other threads:[~2025-09-01 14:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-12  8:32 [syzbot] [bcachefs?] kernel BUG in __bch2_trans_commit (3) syzbot
2025-08-23 17:35 ` syzbot
2025-09-01 14:28 ` syzbot

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