[syzbot] [bcachefs?] kernel BUG in __journal_res_get (2)

12 views
Skip to first unread message

syzbot

unread,
Nov 14, 2024, 2:45:23 AM11/14/24
to kent.ov...@linux.dev, linux-b...@vger.kernel.org, linux-...@vger.kernel.org, syzkall...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 0a9b9d17f3a7 Merge tag 'pm-6.12-rc8' of git://git.kernel.o..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=17ac94c0580000
kernel config: https://syzkaller.appspot.com/x/.config?x=d2aeec8c0b2e420c
dashboard link: https://syzkaller.appspot.com/bug?extid=53bb24d476ef8368a7f0
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image (non-bootable): https://storage.googleapis.com/syzbot-assets/7feb34a89c2a/non_bootable_disk-0a9b9d17.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/b80dd0292210/vmlinux-0a9b9d17.xz
kernel image: https://storage.googleapis.com/syzbot-assets/42a07c5c6678/bzImage-0a9b9d17.xz

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

bcachefs (loop0): shutdown by ioctl type 1
------------[ cut here ]------------
kernel BUG at fs/bcachefs/journal.c:359!
Oops: invalid opcode: 0000 [#1] PREEMPT SMP KASAN NOPTI
CPU: 0 UID: 0 PID: 5334 Comm: syz.0.0 Not tainted 6.12.0-rc7-syzkaller-00070-g0a9b9d17f3a7 #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:journal_entry_open fs/bcachefs/journal.c:359 [inline]
RIP: 0010:__journal_res_get+0x24cb/0x2670 fs/bcachefs/journal.c:544
Code: 89 f9 80 e1 07 38 c1 0f 8c 0d fe ff ff e8 3d 5a c0 fd e9 03 fe ff ff e8 63 4a 89 07 e8 6e 7d 56 fd 90 0f 0b e8 66 7d 56 fd 90 <0f> 0b e8 5e 7d 56 fd 90 0f 0b e8 56 7d 56 fd 90 0f 0b e8 4e 7d 56
RSP: 0018:ffffc9000cfa71c0 EFLAGS: 00010283
RAX: ffffffff843e6caa RBX: 0000000000000002 RCX: 0000000000040000
RDX: ffffc9000d829000 RSI: 0000000000000848 RDI: 0000000000000849
RBP: ffffc9000cfa7490 R08: ffffffff843e4f14 R09: 1ffff1100a049567
R10: dffffc0000000000 R11: ffffed100a049568 R12: 0000000000000023
R13: 00000000003ffffe R14: ffff88805024a500 R15: 1ffff1100a049545
FS: 00007f212f59b6c0(0000) GS:ffff88801fc00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f212f59af98 CR3: 000000003c2e0000 CR4: 0000000000352ef0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
bch2_journal_res_get_slowpath+0xe6/0x710 fs/bcachefs/journal.c:606
bch2_journal_res_get+0x12b/0x1c0 fs/bcachefs/journal.h:382
bch2_journal_flush_seq_async+0x524/0x830 fs/bcachefs/journal.c:717
bch2_journal_flush_seq+0xe5/0x2b0 fs/bcachefs/journal.c:772
bch2_ioc_goingdown fs/bcachefs/fs-ioctl.c:361 [inline]
bch2_fs_file_ioctl+0x1d17/0x28b0 fs/bcachefs/fs-ioctl.c:581
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:907 [inline]
__se_sys_ioctl+0xf9/0x170 fs/ioctl.c:893
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:0x7f212e77e719
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:00007f212f59b038 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 00007f212e936058 RCX: 00007f212e77e719
RDX: 0000000020000080 RSI: 000000008004587d RDI: 0000000000000004
RBP: 00007f212e7f175e R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007f212e936058 R15: 00007fff5924ac88
</TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:journal_entry_open fs/bcachefs/journal.c:359 [inline]
RIP: 0010:__journal_res_get+0x24cb/0x2670 fs/bcachefs/journal.c:544
Code: 89 f9 80 e1 07 38 c1 0f 8c 0d fe ff ff e8 3d 5a c0 fd e9 03 fe ff ff e8 63 4a 89 07 e8 6e 7d 56 fd 90 0f 0b e8 66 7d 56 fd 90 <0f> 0b e8 5e 7d 56 fd 90 0f 0b e8 56 7d 56 fd 90 0f 0b e8 4e 7d 56
RSP: 0018:ffffc9000cfa71c0 EFLAGS: 00010283
RAX: ffffffff843e6caa RBX: 0000000000000002 RCX: 0000000000040000
RDX: ffffc9000d829000 RSI: 0000000000000848 RDI: 0000000000000849
RBP: ffffc9000cfa7490 R08: ffffffff843e4f14 R09: 1ffff1100a049567
R10: dffffc0000000000 R11: ffffed100a049568 R12: 0000000000000023
R13: 00000000003ffffe R14: ffff88805024a500 R15: 1ffff1100a049545
FS: 00007f212f59b6c0(0000) GS:ffff88801fc00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f212f59af98 CR3: 000000003c2e0000 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 syzk...@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

syzbot

unread,
Dec 16, 2024, 3:10:21 AM12/16/24
to kent.ov...@linux.dev, linux-b...@vger.kernel.org, linux-...@vger.kernel.org, syzkall...@googlegroups.com
syzbot has found a reproducer for the following issue on:

HEAD commit: 2e7aff49b5da Merge branches 'for-next/core' and 'for-next/..
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=1129a60f980000
kernel config: https://syzkaller.appspot.com/x/.config?x=696fb014d05da3a3
dashboard link: https://syzkaller.appspot.com/bug?extid=53bb24d476ef8368a7f0
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
userspace arch: arm64
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=12b547e8580000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=10baf344580000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/ef408f67fde3/disk-2e7aff49.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/414ac17a20dc/vmlinux-2e7aff49.xz
kernel image: https://storage.googleapis.com/syzbot-assets/a93415d2a7e7/Image-2e7aff49.gz.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/6280c05687f7/mount_0.gz

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

------------[ cut here ]------------
kernel BUG at fs/bcachefs/journal.c:359!
Internal error: Oops - BUG: 00000000f2000800 [#1] PREEMPT SMP
Modules linked in:
CPU: 0 UID: 0 PID: 6423 Comm: syz-executor145 Not tainted 6.13.0-rc2-syzkaller-g2e7aff49b5da #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
pstate: 80400005 (Nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : journal_entry_open fs/bcachefs/journal.c:359 [inline]
pc : __journal_res_get+0x1d80/0x1f60 fs/bcachefs/journal.c:544
lr : journal_entry_open fs/bcachefs/journal.c:359 [inline]
lr : __journal_res_get+0x1d80/0x1f60 fs/bcachefs/journal.c:544
sp : ffff80009e026b00
x29: ffff80009e026d80 x28: 000000000000000a x27: 0000000000effffe
x26: 8111000080100103 x25: ffff0000dcacab40 x24: ffff0000dcacab40
x23: ffff0000dcacab38 x22: dfff800000000000 x21: 1fffe0001b959545
x20: 1fffe0001b9594a0 x19: ffff0000dcaca500 x18: ffff80009e0267e0
x17: 000000000000e53f x16: ffff80008045f36c x15: 0000000000000001
x14: 1fffe0001b959567 x13: 0000000000000000 x12: 0000000000000000
x11: ffff60001b959568 x10: 0000000000ff0100 x9 : 0000000000000000
x8 : ffff0000c6acdac0 x7 : 0000000000000000 x6 : 0000000000000000
x5 : ffff800093532ec8 x4 : 0000000000000008 x3 : ffff800082b728f0
x2 : 0000000000000000 x1 : 0000000000000002 x0 : 0000000000000000
Call trace:
journal_entry_open fs/bcachefs/journal.c:359 [inline] (P)
__journal_res_get+0x1d80/0x1f60 fs/bcachefs/journal.c:544 (P)
journal_entry_open fs/bcachefs/journal.c:359 [inline] (L)
__journal_res_get+0x1d80/0x1f60 fs/bcachefs/journal.c:544 (L)
bch2_journal_res_get_slowpath+0xe0/0x618 fs/bcachefs/journal.c:606
bch2_journal_res_get+0x124/0x1b4 fs/bcachefs/journal.h:382
bch2_journal_meta+0x9c/0x26c fs/bcachefs/journal.c:842
bch2_journal_flush_device_pins+0x3b0/0x5e0 fs/bcachefs/journal_reclaim.c:889
bch2_data_job+0x290/0xa90 fs/bcachefs/move.c:1065
bch2_data_thread+0xc0/0x178 fs/bcachefs/chardev.c:438
kthread+0x288/0x310 kernel/kthread.c:389
ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:862
Code: 17ffff9f 976c947b d4210000 976c9479 (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.

syzbot

unread,
Mar 10, 2025, 10:05:11 AM3/10/25
to kent.ov...@linux.dev, linux-b...@vger.kernel.org, linux-...@vger.kernel.org, syzkall...@googlegroups.com
syzbot suspects this issue was fixed by commit:

commit fb8c835b18d48dac953a5d755a8e90b0d8fb9c29
Author: Kent Overstreet <kent.ov...@linux.dev>
Date: Sat Oct 12 02:50:48 2024 +0000

bcachefs: bch2_journal_meta() takes ref on c->writes

bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=1487d074580000
start commit: bcde95ce32b6 Merge tag 'devicetree-fixes-for-6.13-1' of gi..
git tree: upstream
kernel config: https://syzkaller.appspot.com/x/.config?x=1234f097ee657d8b
dashboard link: https://syzkaller.appspot.com/bug?extid=53bb24d476ef8368a7f0
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=16ff98c4580000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=11ff98c4580000

If the result looks correct, please mark the issue as fixed by replying with:

#syz fix: bcachefs: bch2_journal_meta() takes ref on c->writes

For information about bisection process see: https://goo.gl/tpsmEJ#bisection
Reply all
Reply to author
Forward
0 new messages