bcachefs
bcachefs copied to clipboard
Half-Life segfaults when run from bcachefs filesystem
See ValveSoftware/halflife#3751 for details. It was submitted there as a Half-Life bug, but I’m guessing that it’s actually a bcachefs bug.
Likely related to https://github.com/koverstreet/bcachefs/issues/547 https://github.com/koverstreet/bcachefs/issues/650 https://github.com/koverstreet/bcachefs/issues/175
We might already have a workaround for this if it's the readdir pos that's overflowing. Can you try crc32c for the str_hash option?
32 bit inodes might also be relevant; that becomes a per-directory option in the new version.
We might already have a workaround for this if it's the readdir pos that's overflowing. Can you try crc32c for the str_hash option?
I tried putting str_hash=crc32c in my bcachefs mount options, but Half-Life still crashed. It seemed to finish crashing more quickly, though. Here’s a log of me running the game with str_hash=crc32c:
ERROR: ld.so: object '/home/jayman/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/jayman/.local/share/Steam/ubuntu12_64/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
ERROR: ld.so: object '/home/jayman/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
ERROR: ld.so: object '/home/jayman/.local/share/Steam/ubuntu12_32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
pressure-vessel-wrap[3818]: W: Found more than one possible libdrm data directory from provider
pid 3962 != 3958, skipping destruction (fork without exec?)
pid 3967 != 3958, skipping destruction (fork without exec?)
pid 3988 != 3958, skipping destruction (fork without exec?)
Using breakpad crash handler
[S_API] SteamAPI_Init(): Loaded '/home/jayman/.local/share/Steam/linux32/steamclient.so' OK.
Setting breakpad minidump AppID = 70
Forcing breakpad minidump interfaces to load
Looking up breakpad interfaces from steamclient
Calling BreakpadMiniDumpSystemInit
01/24 09:13:47 minidumps folder is set to /tmp/dumps
01/24 09:13:47 Init: Installing breakpad exception handler for appid(70)/version(10211)/tid(3990)
Looking up breakpad interfaces from steamclient
Calling BreakpadMiniDumpSystemInit
SteamInternal_SetMinidumpSteamID: Caching Steam ID: 76561198052386458 [API loaded yes]
SteamInternal_SetMinidumpSteamID: Setting Steam ID: 76561198052386458
GL_SIZES: r:8 g:8 b:8 a:0 depth:24
Error loading 'resource/trackerScheme.res'
Platform config directory: platform/config
0:Initializing platform...
crash_20250124091348_2.dmp[4029]: Uploading dump (out-of-process)
/tmp/dumps/crash_20250124091348_2.dmp
/home/jayman/.local/share/Steam/steamapps/common/Half-Life/hl.sh: line 83: 3990 Segmentation fault (core dumped) ${DEBUGGER} "${GAMEROOT}"/${GAMEEXE} "$@"
crash_20250124091348_2.dmp[4029]: Finished uploading minidump (out-of-process): success = yes
crash_20250124091348_2.dmp[4029]: response: Discarded=1
crash_20250124091348_2.dmp[4029]: file ''/tmp/dumps/crash_20250124091348_2.dmp'', upload yes: ''Discarded=1''
pid 4029 != 4028, skipping destruction (fork without exec?)
I think we might need someone from Valve to take a look then, we're just guessing.
Sorry, i just want to share some information. I'm running cachyos handheld edition, default linux kernel 6.13 shipped with the distro, default bcachefs installation parameter from cachy os.
Portal, Half Life 1, Left 4 Dead 2, can run without problem with proton 9.0-4.
Still doesn't work for me on kernel 6.16, even with a -D_FILE_OFFSET_BITS=64 32bit stdenv on NixOS. But this is probably more to do with how NixOS deals with steam and binaries in general since several i686 derivations now build with this stdenv.
i believe this is the 64 bit d_offset bug; we have new behavior for the inodes_32bit option to limit d_offset to 31 bits, needs testing