koverstreet / bcachefs-tools

http://bcachefs.org
GNU General Public License v2.0
120 stars 89 forks source link

fsck tool checking no errors, but I can not mount FS #159

Closed bhzhu203 closed 1 year ago

bhzhu203 commented 1 year ago
[ 9011.442316] bcachefs: loading out-of-tree module taints kernel.
[ 9011.530243] bcachefs (vdb): mounting version 1.2: deleted_inodes opts=compression=lz4
[ 9011.530931] bcachefs (vdb): recovering from unclean shutdown
[ 9011.531386] bcachefs (vdb): starting journal read
[ 9025.949481] bcachefs (vdb): journal read done on device vdb, ret 0
[ 9025.949944] bcachefs (vdb): journal read done, replaying entries 6976947-6976947
[ 9026.152293] bcachefs (vdb): alloc_read... done
[ 9026.157128] bcachefs (vdb): stripes_read... done
[ 9026.157393] bcachefs (vdb): snapshots_read... done
[ 9026.158884] bcachefs (vdb): journal_replay... done
[ 9026.159160] bcachefs (vdb): delete_dead_snapshots...
[ 9026.159162] bcachefs (vdb): going read-write
[ 9034.685402]  done
[ 9034.685600] bcachefs (vdb): delete_dead_inodes... done
[ 9034.692262] bcachefs (vdb): bch2_inode_peek(): error looking up inum 1:4096: ENOENT_inode
[ 9034.692899] bcachefs (vdb): error mounting: error getting root inode: ENOENT
[ 9034.693900] bcachefs (vdb): shutdown complete
[ 9034.694994] mount (72836) used greatest stack depth: 11768 bytes left
[ 9047.381821] divide error: 0000 [#1] PREEMPT SMP PTI
[ 9047.382174] CPU: 2 PID: 73041 Comm: bch-rebalance/v Kdump: loaded Tainted: G           O       6.4.0-uksm+ #44 bb0e0ef3da5d44126bf2e48475ecd94d97cc8e12
[ 9047.382906] Hardware name: Alibaba Cloud Alibaba Cloud ECS, BIOS 449e491 04/01/2014
[ 9047.383334] RIP: 0010:rebalance_work+0xe8/0x220 [bcachefs]
[ 9047.383681] Code: 49 8d 04 29 49 39 e9 49 0f 43 d1 49 89 c2 48 39 c7 4c 0f 46 d7 48 39 d0 4c 0f 42 d7 31 d2 4b 8d 04 92 48 8d 04 80 48 c1 e0 02 <48> f7 f7 44 39 e0 72 11 44 89 6c 24 14 41 89 c4 48 89 3c 24 4c 89
[ 9047.384676] RSP: 0018:ffffc90000f63d40 EFLAGS: 00010246
[ 9047.384982] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
[ 9047.385366] RDX: 0000000000000000 RSI: ffff88810b740000 RDI: 0000000000000000
[ 9047.385762] RBP: 0000000000000000 R08: ffff88810d511cb8 R09: 0000000000000000
[ 9047.386146] R10: 0000000000000000 R11: ffff8881d0ec0001 R12: 0000000000000000
[ 9047.386530] R13: 0000000000000000 R14: ffff8881b53af000 R15: ffff88810b740000
[ 9047.386920] FS:  0000000000000000(0000) GS:ffff888237d00000(0000) knlGS:0000000000000000
[ 9047.387353] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 9047.387678] CR2: 00007fac20fdee48 CR3: 0000000002434003 CR4: 00000000003706e0
[ 9047.388064] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 9047.388462] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[ 9047.388851] Call Trace:
[ 9047.388999]  <TASK>
[ 9047.389127]  ? die+0x32/0x80
[ 9047.389300]  ? do_trap+0xd2/0x100
[ 9047.389490]  ? rebalance_work+0xe8/0x220 [bcachefs 83a2d26889bc6edb970709b8e52e92646102c61d]
[ 9047.389974]  ? do_error_trap+0x65/0x80
[ 9047.390184]  ? rebalance_work+0xe8/0x220 [bcachefs 83a2d26889bc6edb970709b8e52e92646102c61d]
[ 9047.390660]  ? exc_divide_error+0x31/0x40
[ 9047.390894]  ? rebalance_work+0xe8/0x220 [bcachefs 83a2d26889bc6edb970709b8e52e92646102c61d]
[ 9047.391662]  ? asm_exc_divide_error+0x16/0x20
[ 9047.392142]  ? rebalance_work+0xe8/0x220 [bcachefs 83a2d26889bc6edb970709b8e52e92646102c61d]
[ 9047.392840]  ? task_cputime_adjusted+0x44/0xe0
[ 9047.393297]  bch2_rebalance_thread+0x167/0x4e0 [bcachefs 83a2d26889bc6edb970709b8e52e92646102c61d]
[ 9047.394029]  ? finish_task_switch.isra.0+0x91/0x290
[ 9047.394510]  ? rebalance_work+0x220/0x220 [bcachefs 83a2d26889bc6edb970709b8e52e92646102c61d]
[ 9047.395199]  kthread+0xf0/0x120
[ 9047.395595]  ? kthread_complete_and_exit+0x20/0x20
[ 9047.396067]  ret_from_fork+0x1f/0x30
[ 9047.396478]  </TASK>
[ 9047.396823] Modules linked in: bcachefs(O) mean_and_variance netconsole rpcsec_gss_krb5 auth_rpcgss nfsv4 dns_resolver nfs lockd grace fscache netfs tcp_diag inet_diag sunrpc binfmt_misc nls_utf8 nls_cp437 intel_rapl_msr intel_rapl_common virtio_console virtio_balloon joydev evdev serio_raw squashfs loop dm_multipath dm_mod msr fuse efi_pstore ip_tables x_tables autofs4 raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx raid1 raid0 multipath linear md_mod nvme_tcp nvme_rdma rdma_cm iw_cm ib_cm ib_core configfs nvme_fc nvme_fabrics virtio_net crct10dif_pclmul net_failover failover virtio_blk crc32_pclmul ghash_clmulni_intel sha512_ssse3 cirrus aesni_intel drm_shmem_helper crypto_simd drm_kms_helper virtio_pci virtio virtio_pci_legacy_dev virtio_pci_modern_dev cryptd drm psmouse i2c_piix4 virtio_ring i2c_core floppy pata_acpi button

I can not mount fs on my mongodb snapshots server . When mounting , the system run into deadlock (hang).

tool version 4d04fe42623a2f2b91a75cfa3d3503ab88e48acc

FS dump file https://1drv.ms/u/s!Ao8p2C5olADnhhlzSbSdf6f5zijo?e=bhbRMU

bhzhu203 commented 1 year ago

here is the latest FS dump file https://1drv.ms/u/s!Ao8p2C5olADnhhrUW5Ha_X0Dv5mT?e=WIGfGs

koverstreet commented 1 year ago

This appears to be fixed (by a8115093df), verified by running fsck against your dump

bhzhu203 commented 1 year ago

Hello , the issue is not solved.

kernel version bed61fae3bd3429686d33b87c42ed4f98b14a648 tools version 54b6beabf05b6cf62092f98f0c06395e4242b064

bcachefs tool version v0.1-726-g54b6bea
bcachefs  fsck -y /dev/vdc
mounting version 1.2: deleted_inodes opts=compression=lz4,degraded,fsck,fix_errors=yes
recovering from unclean shutdown
journal read done, replaying entries 6976956-6976956
alloc_read... done
stripes_read... done
snapshots_read... done
check_allocations... done
journal_replay... done
check_alloc_info... done
check_lrus... done
check_btree_backpointers... done
check_backpointers_to_extents... done
check_extents_to_backpointers... done
check_alloc_to_lru_refs... done
check_snapshot_trees... done
check_snapshots... done
check_subvols... done
delete_dead_snapshots...going read-write
 done
check_inodes... done
check_extents... done
check_dirents... done
check_xattrs... done
check_root... done
check_directory_structure... done
check_nlinks... done
delete_dead_inodes... done
root@mongodb-backup:~/bcachefs-tools# mount -t bcachefs -o noatime,verbose /dev/vdc /mnt &
[1] 33563
root@mongodb-backup:~/bcachefs-tools# mount: /mnt: mount(2) system call failed: File exists.

[1]+  Exit 32                 mount -t bcachefs -o noatime,verbose /dev/vdc /mnt
root@mongodb-backup:~/bcachefs-tools# 
root@mongodb-backup:~/bcachefs-tools# mount -t bcachefs -o noatime,verbose /dev/vdc /mnt &
[1] 33586
root@mongodb-backup:~/bcachefs-tools# mount: /mnt: mount(2) system call failed: File exists.

[1]+  Exit 32                 mount -t bcachefs -o noatime,verbose /dev/vdc /mnt
root@slave:~# while [ 1 ] ;  do   nc -l -u 172.31.108.118 6666 ;  done
[ 2032.059872] bcachefs: loading out-of-tree module taints kernel.
[ 2032.133864] bcachefs (vdb): mounting version 1.2: deleted_inodes opts=compression=lz4
[ 2032.134373] bcachefs (vdb): recovering from unclean shutdown
[ 2032.134683] bcachefs (vdb): starting journal read
[ 2046.704233] bcachefs (vdb): journal read done on device vdb, ret 0
[ 2046.704697] bcachefs (vdb): journal read done, replaying entries 970934-970934
[ 2046.778707] bcachefs (vdb): alloc_read... done
[ 2046.781211] bcachefs (vdb): stripes_read... done
[ 2046.781653] bcachefs (vdb): snapshots_read... done
[ 2046.782377] bcachefs (vdb): journal_replay... done
[ 2046.782787] bcachefs (vdb): delete_dead_snapshots...
[ 2046.782789] bcachefs (vdb): going read-write
[ 2048.309394]  done
[ 2048.309605] bcachefs (vdb): delete_dead_inodes... done
[ 2048.313650] bcachefs (vdb): bch2_inode_peek(): error looking up inum 1:4096: ENOENT_inode
[ 2048.314274] bcachefs (vdb): error mounting: error getting root inode: ENOENT
[ 2048.315262] bcachefs (vdb): shutdown complete
[ 2048.316061] mount (17373) used greatest stack depth: 11784 bytes left
[ 2048.896053] BUG: kernel NULL pointer dereference, address: 0000000000000000
[ 2048.896537] #PF: supervisor write access in kernel mode
[ 2048.896828] #PF: error_code(0x0002) - not-present page
[ 2048.897116] PGD 8000000104d61067 P4D 8000000104d61067 PUD 107c17067 PMD 0 
[ 2048.897487] Oops: 0002 [#1] PREEMPT SMP PTI
[ 2048.897722] CPU: 2 PID: 78 Comm: kworker/2:1H Kdump: loaded Tainted: G           O       6.4.0-uksm+ #1 8822af7ab4de9d8141e69cf85255c8ee5c8572a9
[ 2048.898413] Hardware name: Alibaba Cloud Alibaba Cloud ECS, BIOS 449e491 04/01/2014
[ 2048.898827] Workqueue: bcachefs_io bch2_journal_write [bcachefs]
[ 2048.899196] RIP: 0010:bch2_fs_usage_acc_to_base+0x17b/0x240 [bcachefs]
[ 2048.899576] Code: 8b 05 e9 65 e7 e1 44 39 c0 73 30 48 63 d0 4c 89 f1 48 8b 3c d5 00 bb 19 82 49 8d 96 f8 00 00 00 4c 01 ef 4c 29 f7 48 8b 34 0f <48> 01 31 48 83 c1 08 48 39 d1 75 f0 83 c0 01 eb b2 4f 8b 2c e7 31
[ 2048.900559] RSP: 0018:ffffc900004abd58 EFLAGS: 00010286
[ 2048.900846] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
[ 2048.901236] RDX: 00000000000000f8 RSI: 0000000000000000 RDI: ffff888237c00000
[ 2048.901622] RBP: ffff888109d40000 R08: 0000000000000004 R09: 0000000000000000
[ 2048.902009] R10: ffffe8ffffdc8680 R11: ffff888106dd0000 R12: 0000000000000064
[ 2048.902400] R13: 0000000000000000 R14: 0000000000000000 R15: ffff888102a13800
[ 2048.902790] FS:  0000000000000000(0000) GS:ffff888237d00000(0000) knlGS:0000000000000000
[ 2048.903233] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 2048.903549] CR2: 0000000000000000 CR3: 0000000107de0006 CR4: 00000000003706e0
[ 2048.903937] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 2048.904326] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[ 2048.904709] Call Trace:
[ 2048.904853]  <TASK>
[ 2048.904981]  ? __die+0x1f/0x60
[ 2048.905166]  ? page_fault_oops+0x141/0x450
[ 2048.905649]  ? do_user_addr_fault+0x61/0x720
[ 2048.906100]  ? _raw_spin_unlock+0x12/0x30
[ 2048.906512]  ? exc_page_fault+0x67/0x140
[ 2048.906912]  ? asm_exc_page_fault+0x22/0x30
[ 2048.907326]  ? bch2_fs_usage_acc_to_base+0x17b/0x240 [bcachefs c4f0e039c36ecd995fe022254e7fcb188d73cfb7]
[ 2048.908032]  ? bch2_fs_usage_acc_to_base+0x150/0x240 [bcachefs c4f0e039c36ecd995fe022254e7fcb188d73cfb7]
[ 2048.908746]  bch2_journal_super_entries_add_common+0x4a5/0x510 [bcachefs c4f0e039c36ecd995fe022254e7fcb188d73cfb7]
[ 2048.909490]  bch2_journal_write+0x3b1/0xda0 [bcachefs c4f0e039c36ecd995fe022254e7fcb188d73cfb7]
[ 2048.910158]  ? newidle_balance+0x2c2/0x3f0
[ 2048.910569]  ? _raw_spin_unlock+0x12/0x30
[ 2048.910974]  ? __queue_work+0x21b/0x4d0
[ 2048.911375]  ? process_one_work+0x1cf/0x3d0
[ 2048.911788]  process_one_work+0x1cf/0x3d0
[ 2048.912197]  worker_thread+0x4a/0x3b0
[ 2048.912588]  ? _raw_spin_lock_irqsave+0x17/0x40
[ 2048.913022]  ? rescuer_thread+0x390/0x390
[ 2048.913431]  kthread+0xf0/0x120
[ 2048.913791]  ? kthread_complete_and_exit+0x20/0x20
[ 2048.914235]  ret_from_fork+0x1f/0x30
[ 2048.914615]  </TASK>
[ 2048.914920] Modules linked in: bcachefs(O) mean_and_variance netconsole tcp_diag inet_diag sunrpc binfmt_misc nls_utf8 nls_cp437 intel_rapl_msr intel_rapl_common virtio_balloon joydev virtio_console evdev serio_raw squashfs loop dm_multipath dm_mod msr fuse efi_pstore ip_tables x_tables autofs4 raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx raid1 raid0 multipath linear md_mod nvme_tcp nvme_rdma rdma_cm iw_cm ib_cm ib_core configfs nvme_fc nvme_fabrics virtio_net net_failover failover virtio_blk crct10dif_pclmul crc32_pclmul ghash_clmulni_intel sha512_ssse3 cirrus drm_shmem_helper virtio_pci drm_kms_helper virtio psmouse virtio_pci_legacy_dev virtio_pci_modern_dev aesni_intel crypto_simd drm i2c_piix4 cryptd virtio_ring i2c_core pata_acpi floppy button
[ 2048.919781] CR2: 0000000000000000
scripts/faddr2line  fs/bcachefs/bcachefs.ko bch2_fs_usage_acc_to_base+0x17b/0x240 
bch2_fs_usage_acc_to_base+0x17b/0x240:
acc_u64s at /home/bhzhu/source/bcachfs-github/bcachefs/fs/bcachefs/util.h:819
(inlined by) acc_u64s_percpu at /home/bhzhu/source/bcachfs-github/bcachefs/fs/bcachefs/util.h:828
(inlined by) bch2_fs_usage_acc_to_base at /home/bhzhu/source/bcachfs-github/bcachefs/fs/bcachefs/buckets.c:177
?bhzhu?~/source/bcachfs-github/bcachefs(git:master)??? 
scripts/faddr2line  fs/bcachefs/bcachefs.ko bch2_fs_usage_acc_to_base+0x17b/0x240
bch2_fs_usage_acc_to_base+0x17b/0x240:
acc_u64s at /home/bhzhu/source/bcachfs-github/bcachefs/fs/bcachefs/util.h:819
(inlined by) acc_u64s_percpu at /home/bhzhu/source/bcachfs-github/bcachefs/fs/bcachefs/util.h:828
(inlined by) bch2_fs_usage_acc_to_base at /home/bhzhu/source/bcachfs-github/bcachefs/fs/bcachefs/buckets.c:177
?bhzhu?~/source/bcachfs-github/bcachefs(git:master)??? 
scripts/faddr2line  fs/bcachefs/bcachefs.ko bch2_fs_usage_acc_to_base+0x150/0x240
bch2_fs_usage_acc_to_base+0x150/0x240:
acc_u64s_percpu at /home/bhzhu/source/bcachfs-github/bcachefs/fs/bcachefs/util.h:827 (discriminator 1)
(inlined by) bch2_fs_usage_acc_to_base at /home/bhzhu/source/bcachfs-github/bcachefs/fs/bcachefs/buckets.c:177 (discriminator 1)
?bhzhu?~/source/bcachfs-github/bcachefs(git:master)??? 
scripts/faddr2line  fs/bcachefs/bcachefs.ko bch2_journal_super_entries_add_common+0x4a5/0x510
bch2_journal_super_entries_add_common+0x4a5/0x510:
bch2_journal_super_entries_add_common at /home/bhzhu/source/bcachfs-github/bcachefs/fs/bcachefs/sb-clean.c:200
?bhzhu?~/source/bcachfs-github/bcachefs(git:master)??? scripts/faddr2line  fs/bcachefs/bcachefs.ko bch2_journal_write+0x3b1/0xda0
bch2_journal_write+0x3b1/0xda0:
bch2_journal_write at /home/bhzhu/source/bcachfs-github/bcachefs/fs/bcachefs/journal_io.c:1764
koverstreet commented 1 year ago

Ok, so the bch2_mount() error path was bugged - fix for that is in the testing branch.

Secondly, it looks like there's a problem with the root inode and fsck isn't fixing it - I may have to see a metadata dump for that.

bhzhu203 commented 1 year ago

updated to kernel version no help :
kernel version 93907e4c02a1aaf805491c2fe35aa85c1fef1826

[  274.726547] bcachefs: loading out-of-tree module taints kernel.
[  274.806435] bcachefs (vdb): mounting version 1.2: deleted_inodes opts=compression=lz4
[  274.806959] bcachefs (vdb): recovering from clean shutdown, journal seq 1398862
[  274.845493] bcachefs (vdb): alloc_read... done
[  274.848322] bcachefs (vdb): stripes_read... done
[  274.848752] bcachefs (vdb): snapshots_read... done
[  274.849584] bcachefs (vdb): journal_replay... done
[  274.851347] bcachefs (vdb): going read-write
[  274.855988] bcachefs (vdb): bch2_inode_peek(): error looking up inum 1:4096: ENOENT_inode
[  274.856477] bcachefs (vdb): error mounting: error getting root inode: ENOENT
[  274.857106] bcachefs (vdb): shutting down
[  274.881387] bch-rebalance/v (3631) used greatest stack depth: 12080 bytes left
[  274.881469] bcachefs (vdb): flushing journal and stopping allocators, journal seq 1398862
[  274.882498] bcachefs (vdb): flushing journal and stopping allocators complete, journal seq 1398862
[  274.883710] BUG: kernel NULL pointer dereference, address: 0000000000000030
[  274.884109] #PF: supervisor write access in kernel mode
[  274.884397] #PF: error_code(0x0002) - not-present page
[  274.884687] PGD 0 P4D 0 
[  274.884838] Oops: 0002 [#1] PREEMPT SMP PTI
[  274.885072] CPU: 1 PID: 3615 Comm: mount Kdump: loaded Tainted: G           O       6.4.0-uksm+ #1 8822af7ab4de9d8141e69cf85255c8ee5c8572a9
[  274.885743] Hardware name: Alibaba Cloud Alibaba Cloud ECS, BIOS 449e491 04/01/2014
[  274.886154] RIP: 0010:bch2_recalc_capacity+0xee/0x2a0 [bcachefs]
[  274.886510] Code: 05 00 00 83 c3 01 39 d3 0f 82 66 ff ff ff e8 b9 5f 99 e0 49 8b 87 98 01 00 00 48 85 c0 74 0f 48 8b 80 d0 00 00 00 41 83 e4 ff <4c> 89 60 30 31 db 31 ed 45 31 ed 45 31 e4 e8 cf 23 99 e0 41 0f b6
[  274.887491] RSP: 0018:ffffc90000e4fc18 EFLAGS: 00010206
[  274.887794] RAX: 0000000000000000 RBX: 0000000000000001 RCX: ffff8881073c3738
[  274.888179] RDX: 0000000000000001 RSI: ffff888103546800 RDI: ffff88810a32c500
[  274.888563] RBP: ffff888103546800 R08: 0000000000000000 R09: 000040005880ae00
[  274.888956] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000400
[  274.889342] R13: ffff888103546800 R14: ffff8881073c01f8 R15: ffff8881073c0000
[  274.889737] FS:  00007f9712868800(0000) GS:ffff888237c80000(0000) knlGS:0000000000000000
[  274.890172] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  274.890488] CR2: 0000000000000030 CR3: 0000000107374003 CR4: 00000000003706e0
[  274.890876] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[  274.891261] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[  274.891650] Call Trace:
[  274.891803]  <TASK>
[  274.891940]  ? __die+0x1f/0x60
[  274.892124]  ? page_fault_oops+0x141/0x450
[  274.892355]  ? do_user_addr_fault+0x61/0x720
[  274.892600]  ? _raw_spin_unlock+0x12/0x30
[  274.892828]  ? exc_page_fault+0x67/0x140
[  274.893049]  ? asm_exc_page_fault+0x22/0x30
[  274.893286]  ? bch2_recalc_capacity+0xee/0x2a0 [bcachefs 93bc2d0f61b4f0755c68730b12c5ddddf9b00082]
[  274.894052]  ? bch2_recalc_capacity+0xd7/0x2a0 [bcachefs 93bc2d0f61b4f0755c68730b12c5ddddf9b00082]
[  274.894767]  bch2_dev_allocator_remove+0x45/0x1b0 [bcachefs 93bc2d0f61b4f0755c68730b12c5ddddf9b00082]
[  274.895477]  ? __cancel_work_timer+0xca/0x150
[  274.895928]  ? _raw_spin_unlock_irq+0x13/0x30
[  274.896360]  __bch2_fs_read_only+0x192/0x1e0 [bcachefs 93bc2d0f61b4f0755c68730b12c5ddddf9b00082]
[  274.897056]  bch2_fs_read_only+0x265/0x2e0 [bcachefs 93bc2d0f61b4f0755c68730b12c5ddddf9b00082]
[  274.897732]  ? destroy_sched_domains_rcu+0x30/0x30
[  274.898193]  __bch2_fs_stop+0x44/0x270 [bcachefs 93bc2d0f61b4f0755c68730b12c5ddddf9b00082]
[  274.898856]  bch2_fs_stop+0xe/0x20 [bcachefs 93bc2d0f61b4f0755c68730b12c5ddddf9b00082]
[  274.899504]  bch2_mount+0x611/0x680 [bcachefs 93bc2d0f61b4f0755c68730b12c5ddddf9b00082]
[  274.900166]  legacy_get_tree+0x24/0x40
[  274.900585]  vfs_get_tree+0x1f/0xc0
[  274.901015]  path_mount+0x2b0/0xa70
[  274.901420]  __x64_sys_mount+0xe1/0x120
[  274.901849]  do_syscall_64+0x35/0x80
[  274.902260]  entry_SYSCALL_64_after_hwframe+0x63/0xcd
[  274.902733] RIP: 0033:0x7f9712726eae
[  274.903125] Code: 48 8b 0d 85 1f 0f 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 52 1f 0f 00 f7 d8 64 89 01 48
[  274.904490] RSP: 002b:00007ffee06552c8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5
[  274.905101] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f9712726eae
[  274.905701] RDX: 00005604393e5d80 RSI: 00005604393e5e00 RDI: 00005604393e5d60
[  274.906283] RBP: 00005604393e5b30 R08: 00005604393e5dc0 R09: 00005604393e6af0
[  274.906883] R10: 0000000000000400 R11: 0000000000000246 R12: 0000000000000000
[  274.907476] R13: 00005604393e5d80 R14: 00005604393e5d60 R15: 00005604393e5b30
[  274.908066]  </TASK>
[  274.908387] Modules linked in: bcachefs(O) mean_and_variance netconsole tcp_diag inet_diag sunrpc binfmt_misc nls_utf8 nls_cp437 intel_rapl_msr intel_rapl_common virtio_console virtio_balloon joydev evdev serio_raw squashfs loop dm_multipath dm_mod msr fuse efi_pstore ip_tables x_tables autofs4 raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx raid1 raid0 multipath linear md_mod nvme_tcp nvme_rdma rdma_cm iw_cm ib_cm ib_core configfs nvme_fc nvme_fabrics crct10dif_pclmul crc32_pclmul ghash_clmulni_intel sha512_ssse3 virtio_net net_failover cirrus failover virtio_blk drm_shmem_helper drm_kms_helper aesni_intel crypto_simd cryptd psmouse drm virtio_pci i2c_piix4 virtio virtio_pci_legacy_dev i2c_core virtio_pci_modern_dev virtio_ring pata_acpi floppy button
[  274.913347] CR2: 0000000000000030
?bhzhu?~/source/bcachfs-github/bcachefs(git:master)??? scripts/faddr2line  fs/bcachefs/bcachefs.ko  bch2_recalc_capacity+0xee/0x2a0
bch2_recalc_capacity+0xee/0x2a0:
bch2_set_ra_pages at /home/bhzhu/source/bcachfs-github/bcachefs/fs/bcachefs/bcachefs.h:1083
(inlined by) bch2_recalc_capacity at /home/bhzhu/source/bcachfs-github/bcachefs/fs/bcachefs/alloc_background.c:2056
?bhzhu?~/source/bcachfs-github/bcachefs(git:master)??? scripts/faddr2line  fs/bcachefs/bcachefs.ko  bch2_recalc_capacity+0xd7/0x2a0
bch2_recalc_capacity+0xd7/0x2a0:
bch2_set_ra_pages at /home/bhzhu/source/bcachfs-github/bcachefs/fs/bcachefs/bcachefs.h:1082
(inlined by) bch2_recalc_capacity at /home/bhzhu/source/bcachfs-github/bcachefs/fs/bcachefs/alloc_background.c:2056
?bhzhu?~/source/bcachfs-github/bcachefs(git:master)??? 
scripts/faddr2line  fs/bcachefs/bcachefs.ko  bch2_dev_allocator_remove+0x45/0x1b0
bch2_dev_allocator_remove+0x45/0x1b0:
bch2_dev_allocator_remove at /home/bhzhu/source/bcachfs-github/bcachefs/fs/bcachefs/alloc_background.c:2145
?bhzhu?~/source/bcachfs-github/bcachefs(git:master)??? scripts/faddr2line  fs/bcachefs/bcachefs.ko  __bch2_fs_read_only+0x192/0x1e0
__bch2_fs_read_only+0x192/0x1e0:
rcu_read_lock at /home/bhzhu/source/bcachfs-github/bcachefs/./include/linux/rcupdate.h:771
(inlined by) percpu_ref_put_many at /home/bhzhu/source/bcachfs-github/bcachefs/./include/linux/percpu-refcount.h:330
(inlined by) percpu_ref_put at /home/bhzhu/source/bcachfs-github/bcachefs/./include/linux/percpu-refcount.h:351
(inlined by) __bch2_fs_read_only at /home/bhzhu/source/bcachfs-github/bcachefs/fs/bcachefs/super.c:246
?bhzhu?~/source/bcachfs-github/bcachefs(git:master)??? scripts/faddr2line  fs/bcachefs/bcachefs.ko  bch2_fs_read_only+0x265/0x2e0
bch2_fs_read_only+0x265/0x2e0:
might_resched at /home/bhzhu/source/bcachfs-github/bcachefs/./include/linux/kernel.h:111
(inlined by) bch2_fs_read_only at /home/bhzhu/source/bcachfs-github/bcachefs/fs/bcachefs/super.c:298
?bhzhu?~/source/bcachfs-github/bcachefs(git:master)??? scripts/faddr2line  fs/bcachefs/bcachefs.ko  __bch2_fs_stop+0x44/0x270
__bch2_fs_stop+0x44/0x270:
__bch2_fs_stop at /home/bhzhu/source/bcachfs-github/bcachefs/fs/bcachefs/super.c:553
?bhzhu?~/source/bcachfs-github/bcachefs(git:master)??? scripts/faddr2line  fs/bcachefs/bcachefs.ko  bch2_fs_stop+0xe/0x20
bch2_fs_stop+0xe/0x20:
bch2_fs_stop at /home/bhzhu/source/bcachfs-github/bcachefs/fs/bcachefs/super.c:610
?bhzhu?~/source/bcachfs-github/bcachefs(git:master)??? scripts/faddr2line  fs/bcachefs/bcachefs.ko  bch2_mount+0x611/0x680
bch2_mount+0x611/0x680:
bch2_err_class at /home/bhzhu/source/bcachfs-github/bcachefs/fs/bcachefs/errcode.h:249
(inlined by) bch2_mount at /home/bhzhu/source/bcachfs-github/bcachefs/fs/bcachefs/fs.c:1912
bhzhu203 commented 1 year ago

So I will reformat the FS and test it again. When I umount one time , I can not mount the FS which mongodb in there again

koverstreet commented 1 year ago

Don't reformat - we found a major bug last night. Will update...

koverstreet commented 1 year ago

Fixed by 93e12e16c4 - all your files should be there again :)

Reopen this bug or file another if there's still errors

bhzhu203 commented 1 year ago

I have tested it , I can mount mongodb FS in the latest kernel version now . Thanks !