ValveSoftware / Dota-2

Tracker for issues specific to Linux and Mac in the Reborn client. If you have a general issue or non-system-specific feature request please go to dev.dota2.com
470 stars 38 forks source link

[Linux] Failure to start with tcmalloc "Attempt to free invalid pointer" and lavapipe built against llvm 16 #2285

Open AngryPenguinPL opened 1 year ago

AngryPenguinPL commented 1 year ago

Your system information

Please describe your issue in as much detail as possible:

From two days (started in 24 march) I can no longer launch Dota2 When I click on the play button, I see the button change to launch but nothing happens, and after a while it goes back to play...

When I launching steam from konsole I see:

(steam:50750): Gtk-WARNING **: 20:28:07.149: gtk_disable_setlocale() must be called before gtk_init()
GameAction [AppID 570, ActionID 1] : LaunchApp changed task to UpdatingAppInfo with ""
GameAction [AppID 570, ActionID 1] : LaunchApp changed task to ProcessingInstallScript with ""
GameAction [AppID 570, ActionID 1] : LaunchApp changed task to SynchronizingCloud with ""
GameAction [AppID 570, ActionID 1] : LaunchApp changed task to ProcessingShaderCache with ""
Fossilize INFO: Setting autogroup scheduling.
GameAction [AppID 570, ActionID 1] : LaunchApp changed task to SiteLicenseSeatCheckout with ""
GameAction [AppID 570, ActionID 1] : LaunchApp changed task to CreatingProcess with ""
GameAction [AppID 570, ActionID 1] : LaunchApp waiting for user response to CreatingProcess ""
GameAction [AppID 570, ActionID 1] : LaunchApp continues with user response "CreatingProcess"
/bin/sh\0-c\0/home/x/.local/share/Steam/ubuntu12_32/reaper SteamLaunch AppId=570 -- /home/x/.local/share/Steam/ubuntu12_32/steam-launch-wrapper -- '/media/x/5afea239-9232-4445-a98e-4e892b1c4e26/steam/steamapps/common/SteamLinuxRuntime_soldier'/_v2-entry-point --verb=waitforexitandrun -- '/media/x/5afea239-9232-4445-a98e-4e892b1c4e26/steam/steamapps/common/SteamLinuxRuntime'/scout-on-soldier-entry-point-v2 --  '/media/x/5afea239-9232-4445-a98e-4e892b1c4e26/steam/steamapps/common/dota 2 beta/game/dota.sh' +engine_experimental_drop_frame_ticks 1 +@panorama_min_comp_layer_dimension 0 -prewarm_panorama\0
Game process added : AppID 570 "/home/x/.local/share/Steam/ubuntu12_32/reaper SteamLaunch AppId=570 -- /home/x/.local/share/Steam/ubuntu12_32/steam-launch-wrapper -- '/media/x/5afea239-9232-4445-a98e-4e892b1c4e26/steam/steamapps/common/SteamLinuxRuntime_soldier'/_v2-entry-point --verb=waitforexitandrun -- '/media/x/5afea239-9232-4445-a98e-4e892b1c4e26/steam/steamapps/common/SteamLinuxRuntime'/scout-on-soldier-entry-point-v2 --  '/media/x/5afea239-9232-4445-a98e-4e892b1c4e26/steam/steamapps/common/dota 2 beta/game/dota.sh' +engine_experimental_drop_frame_ticks 1 +@panorama_min_comp_layer_dimension 0 -prewarm_panorama", ProcID 51160, IP 0.0.0.0:0
chdir /media/x/5afea239-9232-4445-a98e-4e892b1c4e26/steam/steamapps/common/dota 2 beta
ERROR: ld.so: object '/home/x/.steam/bin32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
GameAction [AppID 570, ActionID 1] : LaunchApp changed task to WaitingGameWindow with ""
ERROR: ld.so: object '/home/x/.steam/bin32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object '/home/x/.local/share/Steam/ubuntu12_64/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
ERROR: ld.so: object '/home/x/.steam/bin32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
GameAction [AppID 570, ActionID 1] : LaunchApp changed task to Completed with ""
ERROR: ld.so: object '/home/x/.steam/bin32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object '/home/x/.steam/bin32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
pressure-vessel-wrap[51161]: W: Not deleting "/media/x/5afea239-9232-4445-a98e-4e892b1c4e26/steam/steamapps/common/SteamLinuxRuntime_soldier/var/tmp-RN2611": unable to stat ./keep: fstatat(tmp-RN2611/keep): Permission denied
Installing breakpad exception handler for appid(steam)/version(1679680416)/tid(51220)
setlocale "pl_PL.utf8": No such file or directory
pressure-vessel-locale-gen: Missing locale pl_PL.utf8 (found in $LC_ADDRESS)
pressure-vessel-locale-gen: Generating locale pl_PL.utf8...
pressure-vessel-locale-gen: Generated locale pl_PL.UTF-8 successfully
pressure-vessel-locale-gen: Generating locale en_US.UTF-8...
pressure-vessel-locale-gen: Generated locale en_US.UTF-8 successfully
pressure-vessel-adverb[51262]: W: Container startup will be faster if missing locales are created at OS level
ERROR: ld.so: object '/home/x/.steam/bin32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object '/home/x/.steam/bin32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
pid 51298 != 51294, skipping destruction (fork without exec?)
pid 51303 != 51294, skipping destruction (fork without exec?)
ERROR: ld.so: object '/home/x/.steam/bin32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object '/home/x/.steam/bin32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
pid 51344 != 51294, skipping destruction (fork without exec?)
pid 51345 != 51294, skipping destruction (fork without exec?)
ERROR: ld.so: object '/home/x/.steam/bin32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object '/home/x/.steam/bin32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object '/home/x/.steam/bin32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object '/home/x/.steam/bin32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
Loaded /media/x/5afea239-9232-4445-a98e-4e892b1c4e26/steam/steamapps/common/dota 2 beta/game/bin/linuxsteamrt64/libengine2.so, got 0x563c344bab00
Using breakpad crash handler
[S_API] SteamAPI_Init(): Loaded '/home/x/.local/share/Steam/linux64/steamclient.so' OK.
Game process updated : AppID 570 "/home/x/.local/share/Steam/ubuntu12_32/reaper SteamLaunch AppId=570 -- /home/x/.local/share/Steam/ubuntu12_32/steam-launch-wrapper -- '/media/x/5afea239-9232-4445-a98e-4e892b1c4e26/steam/steamapps/common/SteamLinuxRuntime_soldier'/_v2-entry-point --verb=waitforexitandrun -- '/media/x/5afea239-9232-4445-a98e-4e892b1c4e26/steam/steamapps/common/SteamLinuxRuntime'/scout-on-soldier-entry-point-v2 --  '/media/x/5afea239-9232-4445-a98e-4e892b1c4e26/steam/steamapps/common/dota 2 beta/game/dota.sh' +engine_experimental_drop_frame_ticks 1 +@panorama_min_comp_layer_dimension 0 -prewarm_panorama", ProcID 51347, IP 0.0.0.0:0
Setting breakpad minidump AppID = 570
Forcing breakpad minidump interfaces to load
Looking up breakpad interfaces from steamclient
Calling BreakpadMiniDumpSystemInit
Installing breakpad exception handler for appid(570)/version(7947396)/tid(51347)
Looking up breakpad interfaces from steamclient
Calling BreakpadMiniDumpSystemInit
SteamInternal_SetMinidumpSteamID:  Caching Steam ID:  76561198074387172 [API loaded yes]
SteamInternal_SetMinidumpSteamID:  Setting Steam ID:  76561198074387172
Setting breakpad minidump AppID = 373300
Loaded libSDL2-2.0.so.0, got 0x563c3492aa00
Loaded /media/x/5afea239-9232-4445-a98e-4e892b1c4e26/steam/steamapps/common/dota 2 beta/game/bin/linuxsteamrt64/libtier0.so, got 0x563c344ba000
Loaded /media/x/5afea239-9232-4445-a98e-4e892b1c4e26/steam/steamapps/common/dota 2 beta/game/bin/linuxsteamrt64/libfilesystem_stdio.so, got 0x563c344bb080
Loaded /media/x/5afea239-9232-4445-a98e-4e892b1c4e26/steam/steamapps/common/dota 2 beta/game/bin/linuxsteamrt64/libinputsystem.so, got 0x563c344bc680
Loaded /media/x/5afea239-9232-4445-a98e-4e892b1c4e26/steam/steamapps/common/dota 2 beta/game/bin/linuxsteamrt64/liblocalize.so, got 0x563c344bc100
Loaded /media/x/5afea239-9232-4445-a98e-4e892b1c4e26/steam/steamapps/common/dota 2 beta/game/bin/linuxsteamrt64/librendersystemvulkan.so, got 0x563c36157600
Loaded /media/x/5afea239-9232-4445-a98e-4e892b1c4e26/steam/steamapps/common/dota 2 beta/game/bin/linuxsteamrt64/libresourcesystem.so, got 0x563c36157080
Loaded /media/x/5afea239-9232-4445-a98e-4e892b1c4e26/steam/steamapps/common/dota 2 beta/game/bin/linuxsteamrt64/libschemasystem.so, got 0x563c36156b00
src/tcmalloc.cc:390] Attempt to free invalid pointer: 0x563c3647ca10
ERROR: ld.so: object '/home/x/.steam/bin32/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object '/tmp/pressure-vessel-libs-0OF811/${PLATFORM}/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
crash_20230325202826_2.dmp[51361]: Uploading dump (out-of-process)
/tmp/dumps/crash_20230325202826_2.dmp
curl_easy_setopt()
adding 11 curl form parameters
  BuildID = '20230324153036'
  CrashTime = '1679772544'
  Platform = 'Linux'
  ProductName = '373300'
  StartupTime = '1679773440'
  SteamUniverse = 'Public'
  URL = 'www.steampowered.com'
  UserID = '76561198074387172'
  Vendor = 'Valve'
  Version = '7947396'
  uptime = '193'
curl_formadd file /tmp/dumps/crash_20230325202826_2.dmp
/media/x/5afea239-9232-4445-a98e-4e892b1c4e26/steam/steamapps/common/dota 2 beta/game/dota.sh: line 117: 51347 Aborted                 (core dumped) ${STEAM_RUNTIME_PREFIX} ${GAME_DEBUGGER} "${GAMEROOT}"/${GAMEEXE} "$@"
curl_easy_perform returned:  0 No error
curl_easy_cleanup()
done with curl
crash_20230325202826_2.dmp[51361]: Finished uploading minidump (out-of-process): success = yes
crash_20230325202826_2.dmp[51361]: response: CrashID=bp-01d9f6e6-485d-4b99-839e-c2c6b2230325
crash_20230325202826_2.dmp[51361]: file ''/tmp/dumps/crash_20230325202826_2.dmp'', upload yes: ''CrashID=bp-01d9f6e6-485d-4b99-839e-c2c6b2230325''
Game process removed: AppID 570 "/home/x/.local/share/Steam/ubuntu12_32/reaper SteamLaunch AppId=570 -- /home/x/.local/share/Steam/ubuntu12_32/steam-launch-wrapper -- '/media/x/5afea239-9232-4445-a98e-4e892b1c4e26/steam/steamapps/common/SteamLinuxRuntime_soldier'/_v2-entry-point --verb=waitforexitandrun -- '/media/x/5afea239-9232-4445-a98e-4e892b1c4e26/steam/steamapps/common/SteamLinuxRuntime'/scout-on-soldier-entry-point-v2 --  '/media/x/5afea239-9232-4445-a98e-4e892b1c4e26/steam/steamapps/common/dota 2 beta/game/dota.sh' +engine_experimental_drop_frame_ticks 1 +@panorama_min_comp_layer_dimension 0 -prewarm_panorama", ProcID 51347 
ThreadGetProcessExitCode: no such process 51349
ThreadGetProcessExitCode: no such process 51348
ThreadGetProcessExitCode: no such process 51347
ThreadGetProcessExitCode: no such process 51346
ThreadGetProcessExitCode: no such process 51294
ThreadGetProcessExitCode: no such process 51162
ThreadGetProcessExitCode: no such process 51161
Game 570 created interface STEAMAPPLIST_INTERFACE_VERSION001 / 
Game 570 created interface STEAMAPPS_INTERFACE_VERSION008 / 
Game 570 created interface STEAMHTMLSURFACE_INTERFACE_VERSION_005 / 
Game 570 created interface STEAMHTTP_INTERFACE_VERSION003 / 
Game 570 created interface STEAMINVENTORY_INTERFACE_V003 / 
Game 570 created interface STEAMMUSICREMOTE_INTERFACE_VERSION001 / 
Game 570 created interface STEAMMUSIC_INTERFACE_VERSION001 / 
Game 570 created interface STEAMPARENTALSETTINGS_INTERFACE_VERSION001 / 
Game 570 created interface STEAMREMOTESTORAGE_INTERFACE_VERSION016 / 
Game 570 created interface STEAMSCREENSHOTS_INTERFACE_VERSION003 / 
Game 570 created interface STEAMUGC_INTERFACE_VERSION016 / 
Game 570 created interface STEAMUSERSTATS_INTERFACE_VERSION012 / 
Game 570 created interface STEAMVIDEO_INTERFACE_V002 / 
Game 570 created interface SteamController008 / 
Game 570 created interface SteamFriends017 / 
Game 570 created interface SteamMatchGameSearch001 / 
Game 570 created interface SteamMatchMaking009 / 
Game 570 created interface SteamMatchMakingServers002 / 
Game 570 created interface SteamNetworking006 / 
Game 570 created interface SteamUser021 / 
Game 570 created interface SteamUser022 / User
Game 570 created interface SteamUtils010 / 
Game 570 method call count for IClientAppManager::GetCurrentLanguage : 1
Game 570 method call count for IClientAppManager::GetAppStateInfo : 1
Game 570 method call count for IClientUtils::RecordSteamInterfaceCreation : 23
Game 570 method call count for IClientUtils::IsSteamChina : 1
Game 570 method call count for IClientUtils::GetLauncherType : 1
Game 570 method call count for IClientUtils::GetSteamUILanguage : 1
Game 570 method call count for IClientUtils::GetAppID : 26
Game 570 method call count for IClientFriends::GetFriendPersonaName_Public : 2
Game 570 method call count for IClientUser::GetUserDataFolder : 1
Game 570 method call count for IClientUser::GetSteamID : 6
Uploaded AppInterfaceStats to Steam

Here is full launching log from konsole: https://gist.github.com/AngryPenguinPL/e9261a8d2bfcfd544d5136efc9997444

Also here is a dump from /tmp/dumps

crash_20230325194758_2.dmp.txt crash_20230325202536_2.dmp.txt crash_20230325202826_2.dmp.txt crash_20230325172830_2.dmp.txt

Not sure, if this is due dota2 update or by system update (llvm16 was shipped -default system compilder here). but other games (native or proton) works without problems.

kisak-valve commented 1 year ago

Hello @AngryPenguinPL, are you currently opted into Steam's client beta update channel, and if you are, does opting out have any effect?

AngryPenguinPL commented 1 year ago

@kisak-valve

Hello @AngryPenguinPL, are you currently opted into Steam's client beta update channel, and if you are, does opting out have any effect?

Just tested beta branch but the problem still exists.

danginsburg commented 1 year ago

Can you try renaming (or removing) libtcmalloc.so from ~/.steam/steam/steamapps/common/dota 2 beta/game/bin/linuxsteamrt64 and installing system libtcmalloc on your OS and see if it fixes the issue?

AngryPenguinPL commented 1 year ago

@danginsburg

Can you try renaming (or removing) libtcmalloc.so from ~/.steam/steam/steamapps/common/dota 2 beta/game/bin/linuxsteamrt64 and installing system libtcmalloc on your OS and see if it fixes the issue?

Unfortunately, that didn't work but...

I managed to reproduce the problem and it seems to be on the system side. Dota stopped working after system upgrade to Llvm/clang from 15 to 16.

I did a test and on a live iso snapshot just before migrating to clang 16, I downloaded dota and found it works. However, after running an update and downloading new packages from clang 16 and packages that was rebuild because dependent on it like mesa etc, the game stopped working again.

I think I have an answer to my question. I'm trying to figure out what exactly is causing this problem.

yassinebenarbia commented 1 year ago

Same issue here, i managed to post on : https://github.com/ValveSoftware/Dota2-Gameplay/issues/7787#issue-1646306087

wildcard-f8 commented 1 year ago

same problem just now. manjaro. just updated my system.

stryan commented 1 year ago

Same issue on OpenSUSE Tumbleweed, and I'm also seeing an upgrade to clang 16 this morning.

EDIT: Confirmed that rolling back to pre-upgrade snapshot fixes it.

AngryPenguinPL commented 1 year ago

@danginsburg looks like people on other distros also see similar issue. Is any way we can try debug it? Maybe dota need rebuild with new compiler?

stryan commented 1 year ago

I was able to "fix" it on my end by swapping out the libtcmalloc_minimal lib with the system one. I did have to actually copy and paste it into the gamedir though and rename the file to be the exact same as the one provided: dota did not otherwise use the one in /usr/lib64 .

atsjj commented 1 year ago

Also adding that it's not working for me either. Unfortunatly the fix to copy libtcmalloc_minimal from /usr/lib64 did not work. Attempted to copy /usr/lib64/libtcmalloc_minimal_debug.so.4.5.10 -> ~/.steam/steam/steamapps/common/dota 2 beta/game/bin/linuxsteamrt64/libtcmalloc_minimal.so.0, but to no avail.

Running Arch (EndeavourOS)

Happy to provide other details if asked.

cleaton commented 1 year ago

Switching to the flatpak release worked for me, it can also load existing library so no need to re-download games

Ashvith10 commented 1 year ago

Attempted to copy /usr/lib64/libtcmalloc_minimal_debug.so.4.5.10 -> ~/.steam/steam/steamapps/common/dota 2 beta/game/bin/linuxsteamrt64/libtcmalloc_minimal.so.0, but to no avail.

Have you renamed the file? Make a backup of libtcmalloc_minimal.so.0 (just add a .old extension) and then rename libtcmalloc_minimal_debug.so.4.5.10 to libtcmalloc_minimal_debug.so.0.

I remember having similar problem with CSGO, had to do the same.

atsjj commented 1 year ago

This is now resolved for me with the latest update. Specific version (in about) 7.32E 5675

Everest10 commented 1 year ago

Today I got this problem can't launch the game, everything was normal. The game run now just with Proton option enable.

❯ steam steam://rungameid/570 steam.sh[22300]: Running Steam on fedora 38 64-bit steam.sh[22300]: STEAM_RUNTIME is enabled automatically setup.sh[22372]: Steam runtime environment up-to-date! steam.sh[22300]: Steam client's requirements are satisfied

How to fix it? Tks

❯ glxinfo | grep OpenGL OpenGL vendor string: AMD OpenGL renderer string: AMD Radeon RX 590 Series (polaris10, LLVM 16.0.0, DRM 3.49, 6.2.10_tkg_pds) OpenGL core profile version string: 4.6 (Core Profile) Mesa 23.0.1 OpenGL core profile shading language version string: 4.60 OpenGL core profile context flags: (none) OpenGL core profile profile mask: core profile OpenGL core profile extensions: OpenGL version string: 4.6 (Compatibility Profile) Mesa 23.0.1 OpenGL shading language version string: 4.60 OpenGL context flags: (none) OpenGL profile mask: compatibility profile OpenGL extensions: OpenGL ES profile version string: OpenGL ES 3.2 Mesa 23.0.1 OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20 OpenGL ES profile extensions:

Operating System: Fedora Linux 38 KDE Plasma Version: 5.27.4 KDE Frameworks Version: 5.105.0 Qt Version: 5.15.8 Kernel Version: 6.2.10_tkg_pds (64-bit) Graphics Platform: X11 Processors: 8 × Intel® Core™ i7-3770 Graphics Processor: AMD Radeon RX 590

kazelin commented 1 year ago

Having this issue on Arch. Running wayland.

yassinebenarbia commented 1 year ago

Having this issue on Arch. Running wayland.

Can u specify the compositor ur using, m using Hyprland and still got the same issue.

komorebithrowsatable commented 1 year ago

Confirmed on Fedora 38.

emereld commented 1 year ago

Confirmed on Fedora 38.

+1

alihakkidemiral commented 1 year ago

on flatpak steam it works. O_O

kisak-valve commented 1 year ago

The common trend here looks like Dota 2 uses tcmalloc, mesa is built with llvm 16, and lavapipe (mesa's software based Vulkan implementation) is installed. Please test how the game behaves with a mesa build that includes https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22600 or temporarily disable lavapipe with something like sudo mv /usr/share/vulkan/icd.d/lvp_icd.x86_64.json /usr/share/vulkan/icd.d/lvp_icd.x86_64.json.disabled.

komorebithrowsatable commented 1 year ago

The solution from the previous comment works perfectly for me. Thanks a lot!

jn64 commented 1 year ago

Temporary solution

Instead of renaming the lavapipe file, which might be undone by your distro's package updates, you can use an environment variable to prevent Vulkan from loading it.

$ VK_LOADER_DRIVERS_DISABLE=*lvp* steam

If you want to edit your desktop file for Steam, you have to add env:

Exec=env VK_LOADER_DRIVERS_DISABLE=*lvp* /usr/bin/steam %U

Tested working on Fedora 38, mesa 23.0.2, Nvidia 530.41.03, X11


Reference for Vulkan loader env vars: https://github.com/KhronosGroup/Vulkan-Loader/blob/main/docs/LoaderInterfaceArchitecture.md#active-environment-variables

How to override desktop file: https://wiki.archlinux.org/title/Desktop_file#Modify_desktop_files

kazelin commented 1 year ago

Can u specify the compositor ur using, m using Hyprland and still got the same issue.

Using KDE plasma so compositor is KWin

The common trend here looks like Dota 2 uses tcmalloc, mesa is built with llvm 16, and lavapipe (mesa's software based Vulkan implementation) is installed. Please test how the game behaves with a mesa build that includes https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22600 or temporarily disable lavapipe with something like sudo mv /usr/share/vulkan/icd.d/lvp_icd.x86_64.json /usr/share/vulkan/icd.d/lvp_icd.x86_64.json.disabled.

I don't have these files in here for some reason. I have 2 radeon_icd.[architecture].json. I think this might be because I am using a 7900 XTX, requiring usage the below packages:

    llvm-libs-git
    lib32-llvm-libs-git
    mesa-git
    lib32-mesa-git
    vulkan-radeon-git
    lib32-vulkan-radeon-git

Considering other's success with the disabling the lvp files, wondering any other possible reason I don't have the lvp files?

jn64 commented 1 year ago

I don't know how AUR mesa-git differs from Arch mesa packaging. On Arch, the file is in vulkan-swrast (sub-package of mesa). It's an optional dep; some packages like steam require vulkan-driver, which is provided by vulkan-{intel,radeon,swrast} etc. so you only need at least one of them, not all.

You could try selecting the radeon driver explicitly instead of disabling the lavapipe one:

VK_LOADER_DRIVERS_SELECT=radeon* steam
slacka commented 1 year ago

Dave Airlie did a write up on it here:

AMD OpenGL drivers use LLVM as the backend compiler. Fedora 38 updated to LLVM 16. LLVM 16 is built with c++17 by default. C++17 introduces new "operator new/delete" interfaces[1].

TF2 ships with it's own libtcmalloc_minimal.so implementation, tcmalloc expects to replace all the new/delete interfaces, but the version in TF2 must not support or had incorrect support for the new align interfaces.

What happens is when TF2 probes OpenGL and LLVM is loaded, when DenseMap initializes, one "new" path fails to go into tcmalloc, but the "delete" path does, and this causes tcmalloc to explode with

"src/tcmalloc.cc:278] Attempt to free invalid pointer"

https://airlied.blogspot.com/2023/04/fedora-38-llvm-vs-team-fortress-2-tf2.html

kazelin commented 1 year ago

I don't know how AUR mesa-git differs from Arch mesa packaging. On Arch, the file is in vulkan-swrast (sub-package of mesa). It's an optional dep; some packages like steam require vulkan-driver, which is provided by vulkan-{intel,radeon,swrast} etc. so you only need at least one of them, not all.

You could try selecting the radeon driver explicitly instead of disabling the lavapipe one:

VK_LOADER_DRIVERS_SELECT=radeon* steam

Ultimately a variant of this command worked me on Arch with 7900 XTX. First, I distro hopped to Fedora 38, which just worked with the VK_LOADER_DRIVERS_DISABLE=*lvp* steam command. Fedora was alright, but I missed Arch, so I restored a disk image I took, thinking that there has got to be way to fix this. Looking at the this page I saw the implementations at the top and installed all AMD implementations of vulkan including vulkan-swrast. So my /usr/share/vulkan/icd.d/ folder looks like this:

amd_icd32.json
amd_icd64.json
amd_pro_icd32.json
amd_pro_icd64.json
lvp_icd.x86_64.json
radeon_icd.i686.json
radeon_icd.x86_64.json

Using the VK_LOADER_DRIVERS_SELECT variable I tried all of them and ultimately the one that solved my problem was:

$ VK_LOADER_DRIVERS_SELECT=amd_icd* steam

Which I assume is coming from vulkan-radeon or vulkan-swrast. Thanks for all the troubleshooting steps everyone in this thread!

MarcusDunn commented 1 year ago

Got this today on fedora 38, system is 100% up to date. Workaround suggested here worked.

kuramayouko commented 1 year ago

Same here on Fedora 38 with che/mesa drivers I had to add

_VK_LOADER_DRIVERSSELECT=radeon* %command%

as launch options, as for some Source Engines games this solution might not work, you could try install the package

gperftools-libs

and delete the file

_libtcmallocminimal.so

and this should fix it

jn64 commented 1 year ago

I no longer face this issue with Dota on Fedora 38 with Mesa 23.1.3.

The MR mentioned !22600 was merged by 23.1.0, but I didn't notice if it was fixed then.

GloriousEggroll commented 1 year ago

The common trend here looks like Dota 2 uses tcmalloc, mesa is built with llvm 16, and lavapipe (mesa's software based Vulkan implementation) is installed. Please test how the game behaves with a mesa build that includes https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22600 or temporarily disable lavapipe with something like sudo mv /usr/share/vulkan/icd.d/lvp_icd.x86_64.json /usr/share/vulkan/icd.d/lvp_icd.x86_64.json.disabled.

Team Fortress 2 seems still affected by this. Tested on 23.1.4 and llvm 16.0.0 on Nobara 38.

Here is git with the 23.1.4 tag checked out to validate the commit exists:

[tcrider@cuttyflam mesa]$ git checkout mesa-23.1.4
Note: switching to 'mesa-23.1.4'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at 8b0202e4b49 VERSION: bump for 23.1.4

[tcrider@cuttyflam mesa]$ git log | grep 'llvmpipe: do late init for llvm builder'
    llvmpipe: do late init for llvm builder

Here's the steam output after Team Fortress 2 fails to launch:

/bin/sh\0-c\0/home/tcrider/.local/share/Steam/ubuntu12_32/reaper SteamLaunch AppId=440 -- /home/tcrider/.local/share/Steam/ubuntu12_32/steam-launch-wrapper -- '/mnt/Games/SteamLibrary/steamapps/common/Team Fortress 2/hl2.sh' -game tf -steam\0
chdir "/mnt/Games/SteamLibrary/steamapps/common/Team Fortress 2"
...
pid 26427 != 26426, skipping destruction (fork without exec?)
...
src/tcmalloc.cc:278] Attempt to free invalid pointer 0xa80bad0 
/mnt/Games/SteamLibrary/steamapps/common/Team Fortress 2/hl2.sh: line 72: 26429 Aborted                 (core dumped) ${GAME_DEBUGGER} "${GAMEROOT}"/${GAMEEXE} "$@"
Uploaded AppInterfaceStats to Steam

Package versions

$ rpm -qa | grep mesa
mesa-demos-8.5.0-1.fc38.x86_64
mesa-libGLU-9.0.1-8.fc38.x86_64
mesa-libGLU-9.0.1-8.fc38.i686
mesa-libglapi-23.1.4-3.fc38.x86_64
mesa-libglapi-23.1.4-3.fc38.i686
mesa-filesystem-23.1.4-3.fc38.x86_64
mesa-dri-drivers-23.1.4-3.fc38.x86_64
mesa-libgbm-23.1.4-3.fc38.x86_64
mesa-filesystem-23.1.4-3.fc38.i686
mesa-libEGL-23.1.4-3.fc38.x86_64
mesa-libOpenCL-23.1.4-3.fc38.x86_64
mesa-libGL-23.1.4-3.fc38.x86_64
mesa-libOSMesa-23.1.4-3.fc38.x86_64
mesa-libxatracker-23.1.4-3.fc38.x86_64
mesa-vulkan-drivers-23.2.0-git.20230728.76cc85e.fc38.x86_64
mesa-dri-drivers-23.1.4-3.fc38.i686
mesa-libgbm-23.1.4-3.fc38.i686
mesa-libEGL-23.1.4-3.fc38.i686
mesa-libGL-23.1.4-3.fc38.i686
mesa-libOSMesa-23.1.4-3.fc38.i686
mesa-vulkan-drivers-23.2.0-git.20230728.76cc85e.fc38.i686
mesa-vdpau-drivers-freeworld-23.1.4-3.fc38.x86_64
mesa-va-drivers-freeworld-23.1.4-3.fc38.x86_64
mesa-vdpau-drivers-freeworld-23.1.4-3.fc38.i686
mesa-va-drivers-freeworld-23.1.4-3.fc38.i686

$ rpm -qa | grep llvm-libs
llvm-libs-16.0.6-1.fc38.x86_64
llvm-libs-16.0.6-1.fc38.i686
kisak-valve commented 1 year ago

Hello @GloriousEggroll, you're looking for https://github.com/ValveSoftware/Source-1-Games/issues/5043 instead of this issue report.

Alejandro9509 commented 1 year ago

Thanks, Fixed my issue with TF2 on Fedora 38

It is also necessary to install this package from the Leap repos https://download.opensuse.org/repositories/home:/favogt:/symbolictw/standard/i586/libtcmalloc_minimal4-2.9.1-3.1.i586.rpm.

tfhavingfun commented 1 year ago

I'm on arch linux with a Nvidia RTX 3080ti. After upgrading llvm to 16, Dota2 won't launch for me, and none of the fix/workaround mentioned here works for me. I don't have lavapiple file, only nvidia_icd.json in /usr/share/vulkan/icd.d. I tried setting VK_LOADER_DRIVERS_SELECT=nvidia_icd*, but it didn't help. Also I don't have libtcmalloc.so in ~/.steam/steam/steamapps/common/dota 2 beta/game/bin/linuxsteamrt64 dump file: crash_20230902172500_2.dmp.txt Output from terminal: https://gist.github.com/tfhavingfun/858f1a1d207c628330c5fdc66ffc5f39

kisak-valve commented 1 year ago

Hello @tfhavingfun, your backtrace has similarities to #2442 and #2400 and is likely unrelated to this issue report.

tfhavingfun commented 1 year ago

@kisak-valve Can you also take a look at my Steam Runtime System Info: https://gist.github.com/tfhavingfun/755ead722ee9135a92550ddc90c1ff67. Thanks.