bcachefs icon indicating copy to clipboard operation
bcachefs copied to clipboard

All Source games crash (Portal, Portal 2, CS:GO)

Open obj-obj opened this issue 2 years ago • 2 comments

Portal, Portal 2, or CS:GO all crash during the loading screen. They work fine when moved to an external drive (that's not formatted with bcachefs). I noticed that all 3 of these games use the Source engine, and none of them even give an error message when crashing.

Version

Whatever linux-tkg uses (https://raw.githubusercontent.com/Frogging-Family/linux-tkg/master/linux-tkg-patches/6.3/0008-6.3-bcachefs.patch)

Not sure how to get the commit hash from the patch file (or if it's even in there), but the patch was created on May 27 (so maybe https://github.com/koverstreet/bcachefs/commit/cdf3463f377012b85cfcb2e3774f8953f52a793f?)

Generic info bcachefs fs usage:

Filesystem: e7bede19-e744-4635-9914-c8e14b8ba169
Size:                  2299971260928
Used:                   136042778624
Online reserved:              598016

Data type       Required/total  Devices
reserved:       1/0                    [] 33722368
btree:          1/1             [sda]                      636485632
btree:          1/1             [nvme0n1p3]                966787072
user:           1/1             [sda]                   126199541760
cached:         1/1             [nvme0n1p3]               5964948992

hdd.hdd1 (device 0):             sda              rw
                                data         buckets    fragmented
  free:                            0         3563818
  sb:                        3149824               7        520192
  journal:                4294967296            8192
  btree:                   636485632            2274     555745280
  user:                 126199541760          241167     242363904
  cached:                          0               0
  parity:                          0               0
  stripe:                          0               0
  need_gc_gens:                    0               0
  need_discard:                    0               0
  erasure coded:                   0               0
  capacity:            2000398843904         3815458

ssd.ssd1 (device 1):       nvme0n1p3              rw
                                data         buckets    fragmented
  free:                            0          928901
  sb:                        3149824               7        520192
  journal:                3902799872            7444
  btree:                   966787072            3007     609746944
  user:                            0               0
  cached:                 5964948992           13491
  parity:                          0               0
  stripe:                          0               0
  need_gc_gens:                    0               0
  need_discard:                    0               4
  erasure coded:                   0               0
  capacity:             499569917952          952854

bcachefs show-super:

External UUID:                              e7bede19-e744-4635-9914-c8e14b8ba169
Internal UUID:                              ce54cbed-cf8c-4d05-9d33-0fff6cc491c7
Device index:                               1
Label:                                      
Version:                                    snapshot_trees
Oldest version on disk:                     snapshot_trees
Created:                                    Tue May 30 16:59:05 2023
Sequence number:                            43
Superblock size:                            4592
Clean:                                      0
Devices:                                    2
Sections:                                   members,replicas_v0,disk_groups,clean,journal_v2,counters
Features:                                   zstd,reflink,new_siphash,inline_data,new_extent_overwrite,btree_ptr_v2,extents_above_btree_updates,btree_updates_journalled,reflink_inline_data,new_varint,journal_no_flush,alloc_v2,extents_across_btree_nodes
Compat features:                            alloc_info,alloc_metadata,extents_above_btree_updates_done,bformat_overflow_done

Options:
  block_size:                               4.00 KiB
  btree_node_size:                          256 KiB
  errors:                                   continue [ro] panic 
  metadata_replicas:                        1
  data_replicas:                            1
  metadata_replicas_required:               1
  data_replicas_required:                   1
  encoded_extent_max:                       64.0 KiB
  metadata_checksum:                        none [crc32c] crc64 xxhash 
  data_checksum:                            none [crc32c] crc64 xxhash 
  compression:                              none lz4 gzip [zstd] 
  background_compression:                   [none] lz4 gzip zstd 
  str_hash:                                 crc32c crc64 [siphash] 
  metadata_target:                          none
  foreground_target:                        ssd
  background_target:                        hdd
  promote_target:                           ssd
  erasure_code:                             0
  inodes_32bit:                             1
  shard_inode_numbers:                      1
  inodes_use_key_cache:                     1
  gc_reserve_percent:                       8
  gc_reserve_bytes:                         0 B
  root_reserve_percent:                     0
  wide_macs:                                0
  acl:                                      1
  usrquota:                                 0
  grpquota:                                 0
  prjquota:                                 0
  journal_flush_delay:                      1000
  journal_flush_disabled:                   0
  journal_reclaim_delay:                    100
  journal_transaction_names:                1
  nocow:                                    0

members (size 120):
  Device:                                   0
    UUID:                                   ddc849e8-166d-4e54-a445-1014f61b5f1c
    Size:                                   1.82 TiB
    Bucket size:                            512 KiB
    First bucket:                           0
    Buckets:                                3815458
    Last mount:                             Tue May 30 22:13:59 2023
    State:                                  rw
    Label:                                  hdd1 (1)
    Data allowed:                           journal,btree,user
    Has data:                               journal,btree,user,cached
    Discard:                                0
    Freespace initialized:                  1
  Device:                                   1
    UUID:                                   9235ab08-69a4-4e00-91e9-8e1484b8c77c
    Size:                                   465 GiB
    Bucket size:                            512 KiB
    First bucket:                           0
    Buckets:                                952854
    Last mount:                             Tue May 30 22:13:59 2023
    State:                                  rw
    Label:                                  ssd1 (3)
    Data allowed:                           journal,btree,user
    Has data:                               journal,btree,user,cached
    Discard:                                1
    Freespace initialized:                  1

Kernel bugs

I am about to go to sleep, will recompile the kernel and check dmesg tomorrow (and update this issue)

obj-obj avatar May 31 '23 05:05 obj-obj

The original Portal seems to work now after a kernel update, but Portal 2 and CS:GO are still broken

obj-obj avatar Jun 15 '23 06:06 obj-obj

I can confirm this is happening on bcachefs without other kernel patches. bcachefs commit be1251eac68916279a396baff00e93607463e7bb

Portal2 crashes on launch when stored on my bcachefs. Then I moved the game files to an ext4 partition and it worked fine. Moved back to bcachefs and it is broken again.

This is almost certainly some weird bug with the Source engine, rather than a problem with bcachefs itself.

And besides, because Source is closed-source, Valve is the only one who can debug this.

Note: I also tested with a fresh bcachefs in a 50GB loop disk, and the same thing happens.

FlyingWombat avatar Jun 28 '23 17:06 FlyingWombat