All of lore.kernel.org
 help / color / mirror / Atom feed
From: syzbot <syzbot+240906f6485cdb6035a7@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_journal_pin_set (2)
Date: Wed, 06 Aug 2025 00:10:30 -0700	[thread overview]
Message-ID: <6892ffe6.050a0220.7f033.0039.GAE@google.com> (raw)

Hello,

syzbot found the following issue on:

HEAD commit:    a6923c06a3b2 Merge tag 'bpf-fixes' of git://git.kernel.org..
git tree:       upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=128df2a2580000
kernel config:  https://syzkaller.appspot.com/x/.config?x=bbdefbf39cb79f7e
dashboard link: https://syzkaller.appspot.com/bug?extid=240906f6485cdb6035a7
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-a6923c06.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/6c2b6f269429/vmlinux-a6923c06.xz
kernel image: https://storage.googleapis.com/syzbot-assets/32390e35232b/bzImage-a6923c06.xz

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

bcachefs (loop0): backpointer doesn't match extent it points to:
  u64s 9 type backpointer 0:8921088:0 len 0 ver 0: bucket=0:34:8 btree=extents level=0 data_type=user suboffset=0 len=8 gen=0 pos=536870913:24:U32_MAX
  u64s 7 type extent 536870913:24:U32_MAX len 24 ver 0: durability: 1 crc: c_size 8 size 24 offset 0 nonce 0 csum none 0:0  compress lz4 ptr: 0:34:8 gen 0
  u64s 9 type backpointer 0:8921088:0 len 0 ver 0: bucket=0:34:8 btree=extents level=0 data_type=user suboffset=0 len=8 gen=0 pos=536870913:24:U32_MAX, fixing
------------[ cut here ]------------
kernel BUG at fs/bcachefs/journal_reclaim.c:483!
Oops: invalid opcode: 0000 [#1] SMP KASAN NOPTI
CPU: 0 UID: 0 PID: 5362 Comm: bch-copygc/loop Not tainted 6.16.0-syzkaller-11105-ga6923c06a3b2 #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_journal_pin_set+0x5c1/0x5e0 fs/bcachefs/journal_reclaim.c:483
Code: 25 3d d8 fd e9 0c ff ff ff 44 89 e9 80 e1 07 38 c1 0f 8c 88 fb ff ff 4c 89 ef e8 fa 3d d8 fd e9 7b fb ff ff e8 e0 6b 73 fd 90 <0f> 0b e8 d8 6b 73 fd 90 0f 0b e8 d0 6b 73 fd 90 0f 0b 66 66 66 66
RSP: 0018:ffffc9000d4ae728 EFLAGS: 00010293
RAX: ffffffff844c42c0 RBX: 000000000000000c RCX: ffff88801fb60000
RDX: 0000000000000000 RSI: 000000000000000c RDI: 000000000000000b
RBP: ffff888052e846b8 R08: 0000000000000003 R09: 0000000000000004
R10: dffffc0000000000 R11: fffff52001a95cd4 R12: ffff888052ecaa38
R13: ffff888052eca898 R14: ffff888052ec9800 R15: 000000000000000b
FS:  0000000000000000(0000) GS:ffff88808d21f000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fff022fdc9c CR3: 0000000011ba9000 CR4: 0000000000352ef0
Call Trace:
 <TASK>
 bch2_journal_pin_add fs/bcachefs/journal_reclaim.h:48 [inline]
 bch2_journal_keys_to_write_buffer_start+0x3bb/0x3c0 fs/bcachefs/btree_write_buffer.c:793
 bch2_journal_keys_to_write_buffer fs/bcachefs/btree_write_buffer.c:510 [inline]
 fetch_wb_keys_from_journal fs/bcachefs/btree_write_buffer.c:534 [inline]
 btree_write_buffer_flush_seq+0x222/0x1a40 fs/bcachefs/btree_write_buffer.c:563
 bch2_btree_write_buffer_flush_sync+0x143/0x2c0 fs/bcachefs/btree_write_buffer.c:598
 bch2_btree_write_buffer_maybe_flush+0x7e0/0x1400 fs/bcachefs/btree_write_buffer.c:673
 bch2_backpointers_maybe_flush fs/bcachefs/backpointers.c:200 [inline]
 backpointer_target_not_found+0x110/0xc10 fs/bcachefs/backpointers.c:220
 __bch2_backpointer_get_key+0x33a/0x490 fs/bcachefs/backpointers.c:352
 bch2_backpointer_get_key+0x3e/0x60 fs/bcachefs/backpointers.c:379
 __bch2_move_data_phys+0xf82/0x1c50 fs/bcachefs/move.c:942
 bch2_evacuate_bucket+0x228/0x3a0 fs/bcachefs/move.c:1082
 bch2_copygc+0x3be3/0x4510 fs/bcachefs/movinggc.c:234
 bch2_copygc_thread+0x97a/0xe00 fs/bcachefs/movinggc.c:409
 kthread+0x711/0x8a0 kernel/kthread.c:464
 ret_from_fork+0x3f9/0x770 arch/x86/kernel/process.c:148
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:bch2_journal_pin_set+0x5c1/0x5e0 fs/bcachefs/journal_reclaim.c:483
Code: 25 3d d8 fd e9 0c ff ff ff 44 89 e9 80 e1 07 38 c1 0f 8c 88 fb ff ff 4c 89 ef e8 fa 3d d8 fd e9 7b fb ff ff e8 e0 6b 73 fd 90 <0f> 0b e8 d8 6b 73 fd 90 0f 0b e8 d0 6b 73 fd 90 0f 0b 66 66 66 66
RSP: 0018:ffffc9000d4ae728 EFLAGS: 00010293
RAX: ffffffff844c42c0 RBX: 000000000000000c RCX: ffff88801fb60000
RDX: 0000000000000000 RSI: 000000000000000c RDI: 000000000000000b
RBP: ffff888052e846b8 R08: 0000000000000003 R09: 0000000000000004
R10: dffffc0000000000 R11: fffff52001a95cd4 R12: ffff888052ecaa38
R13: ffff888052eca898 R14: ffff888052ec9800 R15: 000000000000000b
FS:  0000000000000000(0000) GS:ffff88808d21f000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fff022fdc9c CR3: 0000000011ba9000 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

                 reply	other threads:[~2025-08-06  7:10 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=6892ffe6.050a0220.7f033.0039.GAE@google.com \
    --to=syzbot+240906f6485cdb6035a7@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.