syzbot


kernel panic: in transaction restart: transaction_restart_mem_realloced, last restarted by

Status: upstream: reported on 2025/06/30 10:11
Subsystems: bcachefs
[Documentation on labels]
Reported-by: syzbot+cc7567f096079cb4146f@syzkaller.appspotmail.com
Fix commit: fbf913cb72a5 bcachefs: Fix incorrect transaction restart handling
Patched on: [ci-qemu-gce-upstream-auto ci-qemu-upstream ci-qemu-upstream-386 ci-qemu2-arm32 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 ci-upstream-rust-kasan-gce ci2-upstream-fs ci2-upstream-kcsan-gce ci2-upstream-usb], missing on: [ci-qemu-native-arm64-kvm 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]
First crash: 12d, last: 10d
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [bcachefs?] kernel panic: in transaction restart: transaction_restart_mem_realloced, last restarted by 0 (1) 2025/06/30 10:11

Sample crash report:
bcachefs (loop0): root directory missing, fixing
 done
bcachefs (loop0): check_unreachable_inodes...
bcachefs (loop0): unreachable inode:
  inum: 4100:4294967295 
    mode=40755
    flags=(4300000)
    journal_seq=23
    hash_seed=f497c5e8402f7aa5
    hash_type=siphash
    bi_size=0
    bi_sectors=0
    bi_version=0
    bi_atime=36304197331961109
    bi_ctime=36304197331961109
    bi_mtime=36304197331961109
    bi_otime=36304197331961109
    bi_uid=0
    bi_gid=0
    bi_nlink=0
    bi_generation=0
    bi_dev=0
    bi_data_checksum=0
    bi_compression=0
    bi_project=0
    bi_background_compression=0
    bi_data_replicas=0
    bi_promote_target=0
    bi_foreground_target=0
    bi_background_target=0
    bi_erasure_code=0
    bi_fields_set=0
    bi_dir=0
    bi_dir_offset=0
    bi_subvol=0
    bi_parent_subvol=0
    bi_nocow=0
    bi_depth=0
    bi_inodes_32bit=0
    bi_casefold=0, fixing
bcachefs (loop0): creating (disconnected)/lost+found in subvol 1 snapshot 4294967295
bcachefs (loop0): creating (disconnected)/lost+found in subvol 1 snapshot 4294967295
bcachefs (loop0): creating (disconnected)/lost+found in subvol 1 snapshot 4294967295
bcachefs (loop0): creating (disconnected)/lost+found in subvol 1 snapshot 4294967295
bcachefs (loop0): creating (disconnected)/lost+found in subvol 1 snapshot 4294967295
 done
bcachefs (loop0): check_subvolume_structure... done
bcachefs (loop0): check_directory_structure...
bcachefs (loop0): directory structure loop:
  4100:4294967295 4096:4294967295 4096:4294967295, fixing
Kernel panic - not syncing: in transaction restart: transaction_restart_mem_realloced, last restarted by
[<0>] btree_trans_restart_ip fs/bcachefs/btree_iter.h:364 [inline]
[<0>] __bch2_trans_kmalloc+0x5d7/0xc80 fs/bcachefs/btree_iter.c:3216
[<0>] bch2_trans_kmalloc_ip fs/bcachefs/btree_iter.h:604 [inline]
[<0>] bch2_trans_kmalloc fs/bcachefs/btree_iter.h:616 [inline]
[<0>] bch2_hash_delete_at fs/bcachefs/str_hash.h:364 [inline]
[<0>] bch2_fsck_remove_dirent+0x1032/0x12a0 fs/bcachefs/dirent.c:756
[<0>] remove_backpointer+0x1fe/0x280 fs/bcachefs/fsck.c:502
[<0>] check_path_loop fs/bcachefs/fsck.c:2700 [inline]
[<0>] bch2_check_directory_structure+0x1a7f/0x1f00 fs/bcachefs/fsck.c:2733
[<0>] bch2_run_recovery_pass fs/bcachefs/recovery_passes.c:485 [inline]
[<0>] __bch2_run_recovery_passes+0x392/0x1010 fs/bcachefs/recovery_passes.c:540
[<0>] bch2_run_recovery_passes+0x184/0x210 fs/bcachefs/recovery_passes.c:611
[<0>] bch2_fs_recovery+0x25fd/0x3950 fs/bcachefs/recovery.c:989
[<0>] bch2_fs_start+0xa99/0xd90 fs/bcachefs/super.c:1203
[<0>] bch2_fs_get_tree+0xb02/0x14f0 fs/bcachefs/fs.c:2489
[<0>] vfs_get_tree+0x92/0x2b0 fs/super.c:1804
[<0>] do_new_mount+0x24a/0xa40 fs/namespace.c:3902
[<0>] do_mount fs/namespace.c:4239 [inline]
[<0>] __do_sys_mount fs/namespace.c:4450 [inline]
[<0>] __se_sys_mount+0x317/0x410 fs/namespace.c:4427
[<0>] do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
[<0>] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94
[<0>] entry_SYSCALL_64_after_hwframe+0x77/0x7f
CPU: 0 UID: 0 PID: 5318 Comm: syz.0.0 Not tainted 6.16.0-rc3-syzkaller-00121-gf02769e7f272 #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
Call Trace:
 <TASK>
 dump_stack_lvl+0x99/0x250 lib/dump_stack.c:120
 panic+0x2db/0x790 kernel/panic.c:382
 bch2_trans_in_restart_error+0xdb/0x110 fs/bcachefs/btree_iter.c:1455
 bch2_trans_unlocked_or_in_restart_error+0xc2/0x110 fs/bcachefs/btree_iter.c:1468
 bch2_trans_verify_not_unlocked_or_in_restart fs/bcachefs/btree_iter.h:344 [inline]
 bch2_path_get+0x108c/0x1540 fs/bcachefs/btree_iter.c:1747
 bch2_trans_iter_init_common fs/bcachefs/btree_iter.h:529 [inline]
 bch2_trans_iter_init fs/bcachefs/btree_iter.h:543 [inline]
 __bch2_bkey_get_iter fs/bcachefs/btree_iter.h:631 [inline]
 bch2_bkey_get_iter fs/bcachefs/btree_iter.h:646 [inline]
 bch2_bi_depth_renumber_one fs/bcachefs/fsck.c:2573 [inline]
 bch2_bi_depth_renumber fs/bcachefs/fsck.c:2599 [inline]
 check_path_loop fs/bcachefs/fsck.c:2717 [inline]
 bch2_check_directory_structure+0x1376/0x1f00 fs/bcachefs/fsck.c:2733
 bch2_run_recovery_pass fs/bcachefs/recovery_passes.c:485 [inline]
 __bch2_run_recovery_passes+0x392/0x1010 fs/bcachefs/recovery_passes.c:540
 bch2_run_recovery_passes+0x184/0x210 fs/bcachefs/recovery_passes.c:611
 bch2_fs_recovery+0x25fd/0x3950 fs/bcachefs/recovery.c:989
 bch2_fs_start+0xa99/0xd90 fs/bcachefs/super.c:1203
 bch2_fs_get_tree+0xb02/0x14f0 fs/bcachefs/fs.c:2489
 vfs_get_tree+0x92/0x2b0 fs/super.c:1804
 do_new_mount+0x24a/0xa40 fs/namespace.c:3902
 do_mount fs/namespace.c:4239 [inline]
 __do_sys_mount fs/namespace.c:4450 [inline]
 __se_sys_mount+0x317/0x410 fs/namespace.c:4427
 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:0x7f338f9900ca
Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb a6 e8 de 1a 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 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f339072ee68 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007f339072eef0 RCX: 00007f338f9900ca
RDX: 0000200000000040 RSI: 0000200000000000 RDI: 00007f339072eeb0
RBP: 0000200000000040 R08: 00007f339072eef0 R09: 0000000000204000
R10: 0000000000204000 R11: 0000000000000246 R12: 0000200000000000
R13: 00007f339072eeb0 R14: 000000000000598c R15: 0000200000000100
 </TASK>
Kernel Offset: disabled
Rebooting in 86400 seconds..

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/06/27 08:31 upstream f02769e7f272 803ce19b .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel panic: in transaction restart: transaction_restart_mem_realloced, last restarted by
2025/06/25 07:04 upstream 7595b66ae9de 26d77996 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root kernel panic: in transaction restart: transaction_restart_mem_realloced, last restarted by
* Struck through repros no longer work on HEAD.