Facepunch / garrysmod-issues

Garry's Mod issue tracker
145 stars 56 forks source link

Attempt to free invalid pointer, manjaro linux native build #5671

Open GoodDays13 opened 10 months ago

GoodDays13 commented 10 months ago

Details

Whenever I try to start the native Linux build recently on Manjaro, it immediately aborts and core dumps. I recently changed GPU from NVIDIA to AMD, so I don't know if it's related. I have tried verifying and reinstalling the game, X11, Wayland, reinstalling Steam, and changing from linux66 to linux65. Nothing seems to fix it.

$ ./hl2.sh
src/tcmalloc.cc:283] Attempt to free invalid pointer 0x97e3ad0 
./hl2.sh: line 67: 41001 Aborted                 (core dumped) ${GAME_DEBUGGER} "${GAMEROOT}"/${GAMEEXE} "$@"
$ coredumpctl dump hl2_linux
           PID: 41001 (hl2_linux)
           UID: 1000 (username)
           GID: 1000 (username)
        Signal: 6 (ABRT)
     Timestamp: Fri 2023-12-29 02:38:24 EST (1min 22s ago)
  Command Line: /home/username/.local/share/Steam/steamapps/common/GarrysMod/hl2_linux
    Executable: /home/username/.local/share/Steam/steamapps/common/GarrysMod/hl2_linux
 Control Group: /user.slice/user-1000.slice/user@1000.service/app.slice/app-org.kde.konsole-4bb94718de174c2c9bec68606ea28597.scope
          Unit: user@1000.service
     User Unit: app-org.kde.konsole-4bb94718de174c2c9bec68606ea28597.scope
         Slice: user-1000.slice
     Owner UID: 1000 (username)
       Boot ID: 751a219a20b3445cac604c2cf839da6e
    Machine ID: 07c2bc68a0bf4166b182333c10d0a904
      Hostname: HOSTNAME
       Storage: /var/lib/systemd/coredump/core.hl2_linux.1000.751a219a20b3445cac604c2cf839da6e.41001.1703835504000000.zst (present)
  Size on Disk: 2.7M
       Message: Process 41001 (hl2_linux) of user 1000 dumped core.

                Module /home/username/.local/share/Steam/steamapps/common/GarrysMod/bin/libSDL2-2.0.so.0 without build-id.
                Module /home/username/.local/share/Steam/steamapps/common/GarrysMod/bin/libSDL2-2.0.so.0
                Stack trace of thread 41001:
                #0  0x00000000f7f78579 __kernel_vsyscall (linux-gate.so.1 + 0x579)
                #1  0x00000000f7c8ea17 n/a (libc.so.6 + 0x8ea17)
                #2  0x00000000f7c3b317 raise (libc.so.6 + 0x3b317)
                #3  0x00000000f7c22121 abort (libc.so.6 + 0x22121)
                #4  0x00000000f7f3aaf8 n/a (/home/username/.local/share/Steam/steamapps/common/GarrysMod/bin/libtcmalloc_minimal.so.4 + 0x18af8)
                #5  0x00000000f7f34c18 n/a (/home/username/.local/share/Steam/steamapps/common/GarrysMod/bin/libtcmalloc_minimal.so.4 + 0x12c18)
                #6  0x00000000f7f36743 n/a (/home/username/.local/share/Steam/steamapps/common/GarrysMod/bin/libtcmalloc_minimal.so.4 + 0x14743)
                #7  0x00000000f7f36848 n/a (/home/username/.local/share/Steam/steamapps/common/GarrysMod/bin/libtcmalloc_minimal.so.4 + 0x14848)
                #8  0x00000000f7f369f3 n/a (/home/username/.local/share/Steam/steamapps/common/GarrysMod/bin/libtcmalloc_minimal.so.4 + 0x149f3)
                #9  0x00000000f7f36a62 n/a (/home/username/.local/share/Steam/steamapps/common/GarrysMod/bin/libtcmalloc_minimal.so.4 + 0x14a62)
                #10 0x00000000f7f4aa70 n/a (/home/username/.local/share/Steam/steamapps/common/GarrysMod/bin/libtcmalloc_minimal.so.4 + 0x28a70)
                ELF object binary architecture: Intel 80386
More than one entry matches, ignoring rest.

Steps to reproduce

Start the game or run hl2.sh. I don't really know what caused it, it was working before.

62832 commented 6 months ago

This has happened with all games running on the Source 1 engine as per this issue after the LLVM 16 update.

The solution would be to use a replacement libtcmalloc_minimal.so.4 library under steamapps/common/GarrysMod/bin, which in your case on an Arch-based distro can be obtained from the lib32-gperftools AUR package.