koverstreet / bcachefs

Other
689 stars 72 forks source link

kernel panic in the latest version when mounting a5f70e9c0389c3f207495863e5595a35c146e87c #545

Closed bhzhu203 closed 1 year ago

bhzhu203 commented 1 year ago

mount -t bcachefs -o noatime,verbose /dev/vdb /data

version a5f70e9c0389c3f207495863e5595a35c146e87c

[ 3744.272781] bcachefs: loading out-of-tree module taints kernel.
[ 3744.342485] bcachefs: bch2_fs_open() 
[ 3744.342720] bcachefs: bch2_read_super() 
[ 3744.343836] bcachefs: bch2_read_super() ret 0
[ 3744.344108] bcachefs: bch2_fs_alloc() 
[ 3744.371644] bcachefs: bch2_fs_journal_init() 
[ 3744.371926] bcachefs: bch2_fs_journal_init() ret 0
[ 3744.372195] bcachefs: bch2_fs_btree_cache_init() 
[ 3744.372541] bcachefs: bch2_fs_btree_cache_init() ret 0
[ 3744.373138] bcachefs: bch2_fs_encryption_init() 
[ 3744.373391] bcachefs: bch2_fs_encryption_init() ret 0
[ 3744.373646] bcachefs: __bch2_fs_compress_init() 
[ 3744.373876] bcachefs: __bch2_fs_compress_init() ret 0
[ 3744.374133] bcachefs: bch2_fs_fsio_init() 
[ 3744.374433] bcachefs: bch2_fs_fsio_init() ret 0
[ 3744.374644] bcachefs: bch2_dev_alloc() 
[ 3744.374896] bcachefs: bch2_dev_alloc() ret 0
[ 3744.375853] bcachefs: bch2_fs_alloc() ret 0
[ 3744.376136] bcachefs (vdb): recovering from clean shutdown, journal seq 33042960
[ 3744.411378] bcachefs (vdb): starting alloc read
[ 3744.413285] ------------[ cut here ]------------
[ 3744.413567] kernel BUG at include/linux/mean_and_variance.h:195!
[ 3744.413902] invalid opcode: 0000 [#1] PREEMPT SMP PTI
[ 3744.414166] CPU: 2 PID: 0 Comm: swapper/2 Kdump: loaded Tainted: G           O       6.3.0-uksm+ #61 dad4f9bd262b697ead059971a0fa681e6bfb1ce0
[ 3744.414837] Hardware name: Alibaba Cloud Alibaba Cloud ECS, BIOS 449e491 04/01/2014
[ 3744.415230] RIP: 0010:mean_and_variance_weighted_update+0x8f/0xe60 [mean_and_variance]
[ 3744.415578] Code: 01 d2 88 48 01 48 29 d6 49 89 d1 49 0f af f0 49 89 f8 4c 89 48 08 49 d3 e0 49 29 f8 48 d3 fe 4c 01 c6 48 d3 ee 48 89 70 10 c3 <0f> 0b 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 3744.416383] RSP: 0018:ffffc9000012cde0 EFLAGS: 00010002
[ 3744.416618] RAX: ffff888103bdc970 RBX: ffff888103bdc7f0 RCX: 00000000000000c7
[ 3744.416955] RDX: 0000370008fdb1c8 RSI: 0000000009108000 RDI: ffff888103bdc000
[ 3744.417265] RBP: ffffc9000012cde0 R08: 0000370008fdb1c8 R09: 0000000009108000
[ 3744.417573] R10: ffffc9000012ce38 R11: 00000000000000e0 R12: 00000367d06bd9d4
[ 3744.419361] R13: 00000367d059b8d4 R14: 0000000000000246 R15: 0000000000122100
[ 3744.419693] FS:  0000000000000000(0000) GS:ffff888237600000(0000) knlGS:0000000000000000
[ 3744.420066] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 3744.420320] CR2: 000055e710f6f828 CR3: 000000010a12e003 CR4: 00000000003706e0
[ 3744.420630] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 3744.420945] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[ 3744.421349] Call Trace:
[ 3744.421468]  <IRQ>
[ 3744.421572]  __bch2_time_stats_update+0x200/0x270 [bcachefs f6801d74c04251a4bf0b002ae9a24722e048ffa6]
[ 3744.422047]  bch2_latency_acct+0x12e/0x150 [bcachefs f6801d74c04251a4bf0b002ae9a24722e048ffa6]
[ 3744.422473]  ? bch2_latency_acct+0x12e/0x150 [bcachefs f6801d74c04251a4bf0b002ae9a24722e048ffa6]
[ 3744.423155]  btree_node_read_endio+0x78/0x80 [bcachefs f6801d74c04251a4bf0b002ae9a24722e048ffa6]
[ 3744.423792]  bio_endio+0x128/0x1b0
[ 3744.424154]  blk_update_request+0x146/0x500
[ 3744.424563]  ? handle_irq_event+0x5e/0x90
[ 3744.424965]  ? debug_smp_processor_id+0x17/0x20
[ 3744.425375]  blk_mq_end_request+0x1e/0x40
[ 3744.425752]  virtblk_request_done+0x49/0xc0 [virtio_blk a5c0ffa5182a73e27eb528cf92a55631179a47c3]
[ 3744.426361]  blk_complete_reqs+0x3e/0x50
[ 3744.426772]  blk_done_softirq+0x28/0x30
[ 3744.427153]  __do_softirq+0xdb/0x445
[ 3744.427522]  irq_exit_rcu+0xc7/0x140
[ 3744.427919]  common_interrupt+0xc1/0xe0
[ 3744.428324]  </IRQ>
[ 3744.428635]  <TASK>
[ 3744.428947]  asm_common_interrupt+0x27/0x40
[ 3744.429347] RIP: 0010:default_idle+0xb/0x10
[ 3744.429752] Code: 07 76 e7 48 89 07 49 c7 c0 08 00 00 00 4d 29 c8 4c 01 c7 4c 29 c2 e9 72 ff ff ff cc cc cc cc 66 90 0f 00 2d d7 c3 2c 00 fb f4 <fa> c3 0f 1f 00 65 48 8b 04 25 00 fb 1f 00 f0 80 48 02 20 48 8b 10
[ 3744.430992] RSP: 0018:ffffc900000b3ec0 EFLAGS: 00000246
[ 3744.431467] RAX: 0000000000000002 RBX: ffff88810038c100 RCX: ffff888237801380
[ 3744.432048] RDX: 4000000000000000 RSI: ffffffff82400b43 RDI: ffffffff810e8b81
[ 3744.432583] RBP: ffffc900000b3ec8 R08: 0000000000000000 R09: 0000000000000000
[ 3744.433148] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000002
[ 3744.433717] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
[ 3744.434262]  ? do_idle+0x1d1/0x230
[ 3744.434666]  ? arch_cpu_idle+0x9/0x10
[ 3744.435085]  default_idle_call+0x7d/0x170
[ 3744.435488]  do_idle+0x1d1/0x230
[ 3744.435860]  ? finish_task_switch.isra.0+0xc9/0x340
[ 3744.436309]  cpu_startup_entry+0x1d/0x20
[ 3744.436712]  start_secondary+0xe9/0x110
[ 3744.437096]  secondary_startup_64_no_verify+0xce/0xdb
[ 3744.437518]  </TASK>
[ 3744.437836] Modules linked in: bcachefs(O) mean_and_variance netconsole tcp_diag inet_diag xt_conntrack nft_chain_nat xt_MASQUERADE nf_nat nf_conntrack_netlink nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 xfrm_user xfrm_algo xt_addrtype nft_compat nf_tables nfnetlink br_netfilter bridge stp llc binfmt_misc nls_utf8 nls_cp437 intel_rapl_msr intel_rapl_common joydev evdev serio_raw virtio_balloon virtio_console squashfs loop dm_multipath dm_mod ipmi_devintf ipmi_msghandler msr fuse efi_pstore configfs ip_tables x_tables autofs4 raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx raid1 raid0 multipath linear md_mod virtio_net net_failover failover virtio_blk crct10dif_pclmul crc32_pclmul ghash_clmulni_intel sha512_ssse3 sha512_generic cirrus drm_shmem_helper drm_kms_helper psmouse drm aesni_intel crypto_simd cryptd i2c_piix4 i2c_core virtio_pci virtio virtio_pci_legacy_dev virtio_pci_modern_dev virtio_ring floppy button
./scripts/faddr2line fs/bcachefs/bcachefs.ko __bch2_time_stats_update+0x200/0x270
__bch2_time_stats_update+0x200/0x270:
bch2_time_stats_update_one 于 /home/bhzhu/source/bcachfs-github/bcachefs-1/fs/bcachefs/util.c:355
(已内连入)__bch2_time_stats_update 于 /home/bhzhu/source/bcachfs-github/bcachefs-1/fs/bcachefs/util.c:396
❰bhzhu❙~/source/bcachfs-github/bcachefs-1(git:master)❱✔≻ 
./scripts/faddr2line fs/bcachefs/bcachefs.ko bch2_latency_acct+0x12e/0x150
bch2_latency_acct+0x12e/0x150:
bch2_latency_acct 于 /home/bhzhu/source/bcachfs-github/bcachefs-1/fs/bcachefs/io.c:137
❰bhzhu❙~/source/bcachfs-github/bcachefs-1(git:master)❱✔≻ 
./scripts/faddr2line fs/bcachefs/bcachefs.ko btree_node_read_endio+0x78/0x80
btree_node_read_endio+0x78/0x80:
btree_node_read_endio 于 /home/bhzhu/source/bcachfs-github/bcachefs-1/fs/bcachefs/btree_io.c:1273
koverstreet commented 1 year ago

You must be on a different version, there's no BUG_ON() there at that commit.