koverstreet / bcachefs

Other
633 stars 69 forks source link

[2bad46ca7f] kernel panic - trans should be locked, unlocked by bch2_btree_node_fill+0x1e7/0x500 #671

Closed marcin-github closed 2 months ago

marcin-github commented 2 months ago

While booting (after decode_stacktrace):

dracut: Switching root
bcachefs (dm-5): check_allocations...
Kernel panic - not syncing: trans should be locked, unlocked by bch2_btree_node_fill (fs/bcachefs/btree_cache.c:786)
CPU: 3 PID: 3160 Comm: mount.bcachefs Tainted: G     U  W          6.9.0-rc2-00151-g2bad46ca7fd9 #39
Hardware name: MSI MS-7982/B150M PRO-VDH (MS-7982), BIOS 3.H0 07/10/2018
Call Trace:
<TASK>
panic (kernel/panic.c:348)
? bch2_btree_node_fill (fs/bcachefs/btree_cache.c:786)
bch2_trans_unlocked_error (fs/bcachefs/btree_iter.c:1426)
btree_trans_peek_key_cache (fs/bcachefs/btree_iter.c:2146)
bch2_btree_iter_peek_upto (fs/bcachefs/btree_iter.c:2187 fs/bcachefs/btree_iter.c:2264)
? bch2_gc_alloc_start (fs/bcachefs/btree_gc.c:1351 (discriminator 21))
bch2_gc_alloc_start (fs/bcachefs/btree_gc.c:1351 (discriminator 21))
? pcpu_alloc (mm/percpu.c:1884)
bch2_gc.constprop.0 (fs/bcachefs/btree_gc.c:1585 (discriminator 1))
bch2_run_recovery_pass (fs/bcachefs/recovery_passes.c:183)
bch2_run_recovery_passes (fs/bcachefs/errcode.h:271 fs/bcachefs/recovery_passes.c:226)
bch2_fs_recovery (fs/bcachefs/recovery.c:799)
? __bch2_print (fs/bcachefs/super.c:124)
? bch2_printbuf_exit (fs/bcachefs/printbuf.c:213 (discriminator 1))
? print_mount_opts (fs/bcachefs/super.c:1004)
bch2_fs_start (fs/bcachefs/super.c:1043)
bch2_fs_open (fs/bcachefs/super.c:2102)
bch2_mount (fs/bcachefs/fs.c:1901 (discriminator 1))
legacy_get_tree (fs/fs_context.c:664 (discriminator 1))
vfs_get_tree (fs/super.c:1798)
path_mount (fs/namespace.c:3353 fs/namespace.c:3679)
__x64_sys_mount (fs/namespace.c:3693 fs/namespace.c:3898 fs/namespace.c:3875 fs/namespace.c:3875)
do_syscall_64 (arch/x86/entry/common.c:52 (discriminator 1) arch/x86/entry/common.c:83 (discriminator 1))
entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:129)
RIP: 0033:0x7f822b43309e
Code: 48 8b 0d 8d dd 0b 00 f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d
All code
========
   0:   48 8b 0d 8d dd 0b 00    mov    0xbdd8d(%rip),%rcx        # 0xbdd94
   7:   f7 d8                   neg    %eax
   9:   64 89 01                mov    %eax,%fs:(%rcx)
   c:   48 83 c8 ff             or     $0xffffffffffffffff,%rax
  10:   c3                      ret
  11:   66 2e 0f 1f 84 00 00    cs nopw 0x0(%rax,%rax,1)
  18:   00 00 00
  1b:   90                      nop
  1c:   f3 0f 1e fa             endbr64
  20:   49 89 ca                mov    %rcx,%r10
  23:   b8 a5 00 00 00          mov    $0xa5,%eax
  28:   0f 05                   syscall
  2a:*  48 3d 01 f0 ff ff       cmp    $0xfffffffffffff001,%rax         <-- trapping instruction
  30:   73 01                   jae    0x33
  32:   c3                      ret
  33:   48                      rex.W
  34:   8b                      .byte 0x8b
  35:   0d                      .byte 0xd

Code starting with the faulting instruction
===========================================
   0:   48 3d 01 f0 ff ff       cmp    $0xfffffffffffff001,%rax
   6:   73 01                   jae    0x9
   8:   c3                      ret
   9:   48                      rex.W
   a:   8b                      .byte 0x8b
   b:   0d                      .byte 0xd
5a dd 0b 00 f7 d8 64 89 01 48
RSP: 002b:00007ffdb6af4818 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 0000000000000009 RCX: 00007f822b43309e
RDX: 0000561a54bfbc80 RSI: 0000561a54bf8b10 RDI: 0000561a54bfb890
RBP: 00000000395a0701 R08: 0000561a54bfbb60 R09: 00007f822b4f1ac0
R10: 0000000000200000 R11: 0000000000000246 R12: 0000561a54bfbc80
R13: 0000561a54bfbb60 R14: 0000561a54bfbb60 R15: 0000000000000000
</TASK>
Kernel Offset: 0x34000000 from 0xffffffff81000000 (relocation range: 0xffffffff80000000-0xffffffffbfffffff)
Rebooting in 10 seconds..
koverstreet commented 2 months ago

this is fixed in master now - you've been testing my main branch :)