syzbot


kernel BUG in bch2_bucket_alloc_trans (3)

Status: upstream: reported C repro on 2024/11/18 21:41
Subsystems: bcachefs
[Documentation on labels]
Reported-by: syzbot+592425844580a6598410@syzkaller.appspotmail.com
Fix commit: 828552ca74a4 bcachefs: Kill bch2_bucket_alloc_new_fs()
Patched on: [ci-qemu-gce-upstream-auto ci-qemu-upstream ci-qemu-upstream-386 ci-qemu2-arm64 ci-qemu2-arm64-compat ci-qemu2-arm64-mte ci-snapshot-upstream-root ci-upstream-gce-leak ci-upstream-kasan-badwrites-root ci-upstream-kasan-gce ci-upstream-kasan-gce-386 ci-upstream-kasan-gce-root ci-upstream-kasan-gce-selinux-root ci-upstream-kasan-gce-smack-root ci-upstream-kmsan-gce-386-root ci-upstream-kmsan-gce-root ci-upstream-linux-next-kasan-gce-root ci2-upstream-fs ci2-upstream-kcsan-gce], missing on: [ci-qemu-native-arm64-kvm ci-qemu2-arm32 ci-qemu2-riscv64 ci-upstream-bpf-kasan-gce ci-upstream-bpf-next-kasan-gce ci-upstream-gce-arm64 ci-upstream-net-kasan-gce ci-upstream-net-this-kasan-gce ci2-upstream-usb]
First crash: 69d, last: 1d22h
Cause bisection: failed (error log, bisect log)
  
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [bcachefs?] kernel BUG in bch2_bucket_alloc_trans (3) 0 (2) 2024/11/25 06:54
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream kernel BUG in bch2_bucket_alloc_trans bcachefs 18 187d 216d 27/28 fixed on 2024/08/14 03:44
upstream kernel BUG in bch2_bucket_alloc_trans (2) bcachefs C done 103 69d 97d 28/28 fixed on 2024/11/14 10:09

Sample crash report:
------------[ cut here ]------------
kernel BUG at fs/bcachefs/alloc_foreground.c:493!
Oops: invalid opcode: 0000 [#1] PREEMPT SMP KASAN PTI
CPU: 1 UID: 0 PID: 67 Comm: kworker/u8:4 Not tainted 6.12.0-syzkaller-03657-g43fb83c17ba2 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/30/2024
Workqueue: btree_node_rewrite async_btree_node_rewrite_work
RIP: 0010:bch2_bucket_alloc_freelist fs/bcachefs/alloc_foreground.c:493 [inline]
RIP: 0010:bch2_bucket_alloc_trans+0x39ec/0x3a50 fs/bcachefs/alloc_foreground.c:648
Code: e8 f9 aa ef fd e9 f0 c7 ff ff 89 d9 80 e1 07 38 c1 0f 8c f3 fd ff ff 48 89 df e8 8f a9 ef fd e9 e6 fd ff ff e8 b5 b7 88 fd 90 <0f> 0b e8 ad b7 88 fd 90 0f 0b e8 85 60 b6 07 f3 0f 1e fa e8 9c b7
RSP: 0018:ffffc900015e6140 EFLAGS: 00010293
RAX: ffffffff840c40cb RBX: 0000000000000019 RCX: ffff88801cb75a00
RDX: 0000000000000000 RSI: 0000000000000019 RDI: 0000000000000000
RBP: ffffc900015e6868 R08: ffffffff840c1399 R09: 0000000000000000
R10: ffffc900015e6728 R11: fffff520002bccea R12: dffffc0000000000
R13: ffff888079048000 R14: 0000000000000000 R15: 0000000000000000
FS:  0000000000000000(0000) GS:ffff8880b8700000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00005611cfe163e0 CR3: 00000000331f4000 CR4: 00000000003526f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 bch2_bucket_alloc_set_trans+0x517/0xd30 fs/bcachefs/alloc_foreground.c:808
 __open_bucket_add_buckets+0x13d0/0x1ec0 fs/bcachefs/alloc_foreground.c:1057
 open_bucket_add_buckets+0x33a/0x410 fs/bcachefs/alloc_foreground.c:1101
 bch2_alloc_sectors_start_trans+0xce9/0x2030
 __bch2_btree_node_alloc fs/bcachefs/btree_update_interior.c:339 [inline]
 bch2_btree_reserve_get+0x612/0x1890 fs/bcachefs/btree_update_interior.c:549
 bch2_btree_update_start+0xe56/0x14e0 fs/bcachefs/btree_update_interior.c:1247
 bch2_btree_node_rewrite+0x1c0/0x1280 fs/bcachefs/btree_update_interior.c:2148
 async_btree_node_rewrite_trans fs/bcachefs/btree_update_interior.c:2236 [inline]
 async_btree_node_rewrite_work+0x31e/0xda0 fs/bcachefs/btree_update_interior.c:2249
 process_one_work kernel/workqueue.c:3229 [inline]
 process_scheduled_works+0xa63/0x1850 kernel/workqueue.c:3310
 worker_thread+0x870/0xd30 kernel/workqueue.c:3391
 kthread+0x2f0/0x390 kernel/kthread.c:389
 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:bch2_bucket_alloc_freelist fs/bcachefs/alloc_foreground.c:493 [inline]
RIP: 0010:bch2_bucket_alloc_trans+0x39ec/0x3a50 fs/bcachefs/alloc_foreground.c:648
Code: e8 f9 aa ef fd e9 f0 c7 ff ff 89 d9 80 e1 07 38 c1 0f 8c f3 fd ff ff 48 89 df e8 8f a9 ef fd e9 e6 fd ff ff e8 b5 b7 88 fd 90 <0f> 0b e8 ad b7 88 fd 90 0f 0b e8 85 60 b6 07 f3 0f 1e fa e8 9c b7
RSP: 0018:ffffc900015e6140 EFLAGS: 00010293
RAX: ffffffff840c40cb RBX: 0000000000000019 RCX: ffff88801cb75a00
RDX: 0000000000000000 RSI: 0000000000000019 RDI: 0000000000000000
RBP: ffffc900015e6868 R08: ffffffff840c1399 R09: 0000000000000000
R10: ffffc900015e6728 R11: fffff520002bccea R12: dffffc0000000000
R13: ffff888079048000 R14: 0000000000000000 R15: 0000000000000000
FS:  0000000000000000(0000) GS:ffff8880b8700000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00005611cfe163e0 CR3: 00000000331f4000 CR4: 00000000003526f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400

Crashes (711):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/11/21 19:40 upstream 43fb83c17ba2 4b25d554 .config strace log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs kernel BUG in bch2_bucket_alloc_trans
2024/11/21 19:09 upstream 43fb83c17ba2 4b25d554 .config strace log report syz / log C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs kernel BUG in bch2_bucket_alloc_trans
2024/11/14 21:55 upstream cfaaa7d010d1 77f3eeb7 .config console log report syz / log C [disk image (non-bootable)] [vmlinux] [kernel image] [mounted in repro] ci-snapshot-upstream-root kernel BUG in bch2_bucket_alloc_trans
2024/11/14 21:44 upstream cfaaa7d010d1 77f3eeb7 .config console log report syz / log C [disk image (non-bootable)] [vmlinux] [kernel image] [mounted in repro] ci-snapshot-upstream-root kernel BUG in bch2_bucket_alloc_trans
2024/12/26 05:46 upstream 9b2ffa6148b1 444551c4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs kernel BUG in bch2_bucket_alloc_trans
2025/01/21 00:49 upstream ffd294d346d1 6e87cfa2 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_bucket_alloc_trans
2025/01/20 22:46 upstream ffd294d346d1 6e87cfa2 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_bucket_alloc_trans
2025/01/20 16:52 upstream ffd294d346d1 6e87cfa2 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_bucket_alloc_trans
2025/01/20 05:24 upstream 9528d418de4d f2cb035c .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_bucket_alloc_trans
2025/01/19 22:19 upstream 9528d418de4d f2cb035c .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_bucket_alloc_trans
2025/01/19 18:08 upstream fda5e3f28400 f2cb035c .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_bucket_alloc_trans
2025/01/19 13:33 upstream fda5e3f28400 f2cb035c .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_bucket_alloc_trans
2025/01/19 11:26 upstream fda5e3f28400 f2cb035c .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_bucket_alloc_trans
2025/01/19 06:58 upstream fda5e3f28400 f2cb035c .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_bucket_alloc_trans
2025/01/19 04:26 upstream fda5e3f28400 f2cb035c .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_bucket_alloc_trans
2025/01/19 00:03 upstream 595523945be0 f2cb035c .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_bucket_alloc_trans
2025/01/18 21:32 upstream 595523945be0 f2cb035c .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_bucket_alloc_trans
2025/01/18 18:29 upstream 595523945be0 f2cb035c .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_bucket_alloc_trans
2025/01/18 16:03 upstream 595523945be0 f2cb035c .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_bucket_alloc_trans
2025/01/18 14:53 upstream 595523945be0 f2cb035c .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_bucket_alloc_trans
2025/01/18 07:14 upstream ad26fc09dabf f2cb035c .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_bucket_alloc_trans
2025/01/18 05:19 upstream ad26fc09dabf f2cb035c .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_bucket_alloc_trans
2025/01/17 21:58 upstream 9bffa1ad25b8 bb91bdd4 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_bucket_alloc_trans
2025/01/17 18:41 upstream 9bffa1ad25b8 bb91bdd4 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_bucket_alloc_trans
2025/01/17 16:55 upstream 9bffa1ad25b8 bb91bdd4 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_bucket_alloc_trans
2025/01/17 13:52 upstream 9bffa1ad25b8 bb91bdd4 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_bucket_alloc_trans
2025/01/17 05:03 upstream ce69b4019001 f9e07a6e .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_bucket_alloc_trans
2025/01/17 00:33 upstream ce69b4019001 f9e07a6e .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_bucket_alloc_trans
2025/01/16 23:27 upstream ce69b4019001 f9e07a6e .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_bucket_alloc_trans
2025/01/16 22:26 upstream ce69b4019001 f9e07a6e .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_bucket_alloc_trans
2025/01/16 12:44 upstream 619f0b6fad52 968edaf4 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_bucket_alloc_trans
2025/01/16 07:50 upstream 619f0b6fad52 968edaf4 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_bucket_alloc_trans
2025/01/16 05:54 upstream 619f0b6fad52 968edaf4 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_bucket_alloc_trans
2025/01/16 04:44 upstream 619f0b6fad52 968edaf4 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_bucket_alloc_trans
2025/01/16 02:41 upstream 619f0b6fad52 968edaf4 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_bucket_alloc_trans
2025/01/15 23:28 upstream 619f0b6fad52 968edaf4 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_bucket_alloc_trans
2025/01/15 19:15 upstream 619f0b6fad52 968edaf4 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_bucket_alloc_trans
2025/01/15 17:17 upstream 619f0b6fad52 968edaf4 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_bucket_alloc_trans
2025/01/15 09:41 upstream c3812b15000c 7315a7cf .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_bucket_alloc_trans
2025/01/15 08:15 upstream c3812b15000c 7315a7cf .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_bucket_alloc_trans
2025/01/15 05:21 upstream c3812b15000c 7315a7cf .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_bucket_alloc_trans
2025/01/15 02:48 upstream c3812b15000c 7315a7cf .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_bucket_alloc_trans
2025/01/15 02:45 upstream c3812b15000c 7315a7cf .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_bucket_alloc_trans
2025/01/15 01:29 upstream c3812b15000c 7315a7cf .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_bucket_alloc_trans
2025/01/14 23:51 upstream c3812b15000c 7315a7cf .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_bucket_alloc_trans
2025/01/14 17:34 upstream c45323b7560e 0dce2409 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_bucket_alloc_trans
2025/01/14 05:12 upstream c45323b7560e b1f1cd88 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel BUG in bch2_bucket_alloc_trans
2024/12/28 09:35 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 573067a5a685 d3ccff63 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-gce-arm64 kernel BUG in bch2_bucket_alloc_trans
* Struck through repros no longer work on HEAD.