public inbox for linux-bcachefs@vger.kernel.org
 help / color / mirror / Atom feed
From: syzbot <syzbot+3b2a86ce65e01acca028@syzkaller.appspotmail.com>
To: kent.overstreet@linux.dev, linux-bcachefs@vger.kernel.org,
	 linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [bcachefs?] kernel BUG in __bch2_btree_node_hash_insert (2)
Date: Mon, 20 Jan 2025 15:00:24 -0800	[thread overview]
Message-ID: <678ed588.050a0220.15cac.0001.GAE@google.com> (raw)
In-Reply-To: <67886d60.050a0220.20d369.0020.GAE@google.com>

syzbot has found a reproducer for the following issue on:

HEAD commit:    ffd294d346d1 Linux 6.13
git tree:       upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=1092b9df980000
kernel config:  https://syzkaller.appspot.com/x/.config?x=88da85736adb8c92
dashboard link: https://syzkaller.appspot.com/bug?extid=3b2a86ce65e01acca028
compiler:       Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=10722618580000
C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=13e9d2b0580000

Downloadable assets:
disk image (non-bootable): https://storage.googleapis.com/syzbot-assets/7feb34a89c2a/non_bootable_disk-ffd294d3.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/ab1d8ddaa6bd/vmlinux-ffd294d3.xz
kernel image: https://storage.googleapis.com/syzbot-assets/8aadb123ffff/bzImage-ffd294d3.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/12a2657ef791/mount_0.gz

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

bucket 0:42 data type btree stale dirty ptr: 0 < 1
while marking u64s 11 type btree_ptr_v2 SPOS_MAX len 0 ver 0: seq 1db8f60c84bb244c written 8 min_key POS_MIN durability: 1 ptr: 0:42:0 gen 0 stale, fixing
------------[ cut here ]------------
kernel BUG at fs/bcachefs/btree_cache.c:280!
Oops: invalid opcode: 0000 [#1] PREEMPT SMP KASAN NOPTI
CPU: 0 UID: 0 PID: 5300 Comm: syz-executor829 Not tainted 6.13.0-syzkaller #0
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_btree_node_hash_insert+0x12ed/0x1310 fs/bcachefs/btree_cache.c:280
Code: ed fd e9 9d f5 ff ff 89 d9 80 e1 07 80 c1 03 38 c1 0f 8c f2 f7 ff ff 48 89 df e8 8e 76 ed fd e9 e5 f7 ff ff e8 f4 0b 87 fd 90 <0f> 0b e8 ec 0b 87 fd 90 0f 0b e8 e4 0b 87 fd 90 0f 0b e8 ec 7d b0
RSP: 0018:ffffc9000d2c5de0 EFLAGS: 00010293
RAX: ffffffff84186bcc RBX: ffff888040678228 RCX: ffff888000a50000
RDX: 0000000000000000 RSI: ffff888040678000 RDI: ffff888048c01a80
RBP: ffffc9000d2c5f10 R08: ffffffff841874b1 R09: 1ffff110080cf016
R10: dffffc0000000000 R11: ffffed10080cf017 R12: 1ffff110080cf045
R13: dffffc0000000000 R14: ffff888048c01a80 R15: ffff888040678000
FS:  000055557bdba380(0000) GS:ffff88801fc00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00005644f46e5018 CR3: 0000000042ec0000 CR4: 0000000000352ef0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 bch2_btree_node_update_key_early+0xa8d/0xbd0 fs/bcachefs/btree_cache.c:332
 bch2_check_fix_ptrs+0x5dc7/0x6530 fs/bcachefs/buckets.c:380
 bch2_trigger_extent+0x92c/0xaa0 fs/bcachefs/buckets.c:856
 bch2_key_trigger fs/bcachefs/bkey_methods.h:87 [inline]
 bch2_gc_mark_key+0x6b5/0x10e0 fs/bcachefs/btree_gc.c:634
 bch2_gc_btree fs/bcachefs/btree_gc.c:670 [inline]
 bch2_gc_btrees fs/bcachefs/btree_gc.c:729 [inline]
 bch2_check_allocations+0x1c3e/0x7070 fs/bcachefs/btree_gc.c:1133
 bch2_run_recovery_pass+0xf0/0x1e0 fs/bcachefs/recovery_passes.c:191
 bch2_run_recovery_passes+0x3a7/0x880 fs/bcachefs/recovery_passes.c:244
 bch2_fs_recovery+0x25cc/0x39d0 fs/bcachefs/recovery.c:861
 bch2_fs_start+0x356/0x5b0 fs/bcachefs/super.c:1037
 bch2_fs_get_tree+0xd68/0x1710 fs/bcachefs/fs.c:2170
 vfs_get_tree+0x90/0x2b0 fs/super.c:1814
 do_new_mount+0x2be/0xb40 fs/namespace.c:3511
 do_mount fs/namespace.c:3851 [inline]
 __do_sys_mount fs/namespace.c:4061 [inline]
 __se_sys_mount+0x2d6/0x3c0 fs/namespace.c:4038
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f4025b9c88a
Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb a6 e8 5e 04 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 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffc9288bcf8 EFLAGS: 00000282 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007ffc9288bd10 RCX: 00007f4025b9c88a
RDX: 00000000200000c0 RSI: 0000000020000180 RDI: 00007ffc9288bd10
RBP: 0000000000000004 R08: 00007ffc9288bd50 R09: 00000000000059ad
R10: 0000000000000000 R11: 0000000000000282 R12: 0000000000000000
R13: 00007ffc9288bd50 R14: 0000000000000003 R15: 0000000001000000
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:__bch2_btree_node_hash_insert+0x12ed/0x1310 fs/bcachefs/btree_cache.c:280
Code: ed fd e9 9d f5 ff ff 89 d9 80 e1 07 80 c1 03 38 c1 0f 8c f2 f7 ff ff 48 89 df e8 8e 76 ed fd e9 e5 f7 ff ff e8 f4 0b 87 fd 90 <0f> 0b e8 ec 0b 87 fd 90 0f 0b e8 e4 0b 87 fd 90 0f 0b e8 ec 7d b0
RSP: 0018:ffffc9000d2c5de0 EFLAGS: 00010293
RAX: ffffffff84186bcc RBX: ffff888040678228 RCX: ffff888000a50000
RDX: 0000000000000000 RSI: ffff888040678000 RDI: ffff888048c01a80
RBP: ffffc9000d2c5f10 R08: ffffffff841874b1 R09: 1ffff110080cf016
R10: dffffc0000000000 R11: ffffed10080cf017 R12: 1ffff110080cf045
R13: dffffc0000000000 R14: ffff888048c01a80 R15: ffff888040678000
FS:  000055557bdba380(0000) GS:ffff88801fc00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00005644f46e5018 CR3: 0000000042ec0000 CR4: 0000000000352ef0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400


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

      reply	other threads:[~2025-01-20 23:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-16  2:22 [syzbot] [bcachefs?] kernel BUG in __bch2_btree_node_hash_insert (2) syzbot
2025-01-20 23:00 ` syzbot [this message]

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=678ed588.050a0220.15cac.0001.GAE@google.com \
    --to=syzbot+3b2a86ce65e01acca028@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox