Dota-2 icon indicating copy to clipboard operation
Dota-2 copied to clipboard

Game crashes on launch on Arch Linux, after attempting to free invalid pointer

Open TheConfuZzledDude opened this issue 3 years ago • 11 comments
trafficstars

Your system information

  • System information from steam (Steam -> Help -> System Information) in a gist: https://gist.github.com/TheConfuZzledDude/4aeb036863abcb1d18df1e911f0d1372
  • Have you checked for system updates?: Yes
  • Are you using the latest stable video driver available for your system? Yes
  • Have you verified the game files?: Yes

Please describe your issue in as much detail as possible:

Game crashes on launch on Linux, after attempting to free invalid pointer Terminal log: https://gist.github.com/TheConfuZzledDude/ff28de1d47f19f67866d162a7281ee51 Minidump (tarred+gz): crashminidump.tar.gz

Steps for reproducing this issue:

  1. Launch the game

TheConfuZzledDude avatar Feb 24 '22 22:02 TheConfuZzledDude

Hello @TheConfuZzledDude, this reads like #1999. Are you able to tell if Dota 2 is running on the AMDGPU-Pro or mesa/RADV driver and can you test if the same issue happens with the other driver?

kisak-valve avatar Feb 24 '22 22:02 kisak-valve

Hi, I probably face the same issue, started happening after the new update (7.31, new hero etc., don't even know what it's about because the game doesn't work anymore).

Terminal output: https://pastebin.com/msxFuxfC Steam HW/SW info: https://pastebin.com/LdR5NpVM

Arch Linux, 1660 Ti.

headlesscyborg avatar Feb 24 '22 22:02 headlesscyborg

Hello @TheConfuZzledDude, this reads like #1999. Are you able to tell if Dota 2 is running on the AMDGPU-Pro or mesa/RADV driver and can you test if the same issue happens with the other driver?

I actually was using mesa, but I've been forcing it with a renamed radeon_icd.x86_64.json to aaradeon_icd.x86_64.json to force it to load before AMDGPU-Pro, but it was an old version of it so the api version listed in it was outdated i.e

<         "api_version": "1.3.204",
---
>         "api_version": "1.2.185",

So symlinking it instead has resolved it, working now :)

TheConfuZzledDude avatar Feb 24 '22 22:02 TheConfuZzledDude

@kisak-valve I see dota2 bundled libtcmalloc_minimal.so.0 has version 1.7, which uses __memalign_hook that is removed since glibc 2.34 So it can't hook aligned_alloc in the latest glibc, which causes the driver allocates memory from glibc's aligned_alloc but frees it to libtcmalloc's free and then crashes.

icpz avatar Feb 25 '22 01:02 icpz

I got it to work with vulkan by adding VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/radeon_icd.x86_64.json to the environment (export it from ~/.profile or set launch options for dota2: VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/radeon_icd.x86_64.json %command%).

I think the problem happened because I have amdvlk and vulkan-radeon installed. Apparently, amdvlk is not supported by Dota2, and AMD_VULKAN_ICD=RADV is being ignored now, so Dota2 picked amdvlk ICD (/usr/share/vulkan/icd.d/amd_icd64.json) and crashed.

accerqueira avatar Feb 25 '22 01:02 accerqueira

I think the problem happened because I have amdvlk and vulkan-radeon installed. Apparently, amdvlk is not supported by Dota2, and AMD_VULKAN_ICD=RADV is being ignored now, so Dota2 picked amdvlk ICD (/usr/share/vulkan/icd.d/amd_icd64.json) and crashed.

The newer glibc breaks some features (aligned_alloc) in the game bundled libtcmalloc, the features used by amdvlk. RADV doesn't use aligned_alloc so it's not affected.

icpz avatar Feb 25 '22 02:02 icpz

Same on Solus with AMDGPU (open source kernel driver):

Steam/steamapps/common/dota 2 beta/game/dota.sh: line 109:  7628 Segmentation fault      (core dumped) ${STEAM_RUNTIME_PREFIX} ${GAME_DEBUGGER} "${GAMEROOT}"/${GAMEEXE} "$@"
crash_20220225225503_2.dmp[7648]: Finished uploading minidump (out-of-process): success = no
crash_20220225225503_2.dmp[7648]: error: Couldn't connect to server
crash_20220225225503_2.dmp[7648]: file ''/tmp/dumps/crash_20220225225503_2.dmp'', upload no: ''Couldn't connect to server''
pid 7648 != 7647, skipping destruction (fork without exec?)

tried all posted workarounds to no avail. Any ideas ?

presianbg avatar Feb 25 '22 20:02 presianbg

I get the same on mesa. Only when trying to use vulkan though. OpenGL doesn't crash for me. I'd say it works, but I just opened an issue about crazy fps spikes since an update late last week.

cppcooper avatar Mar 03 '22 01:03 cppcooper

In fact, in my case the problem lies with "vulkan-amdgpu-pro"... using radvk doesn't cause the problem... you can uninstall or force radvk over amdvlk as suggested in the previous comments... vulkan just works as expected!...

Greetings

eduardoc25 avatar Mar 12 '22 17:03 eduardoc25

I don't know if anyone else is seeing this, but I get this message when I try launching with -vulkan instead of -gl

Attempting to create OpenGL context: v3.3 (Core profile)...success. Checking entry points...success.
src/tcmalloc.cc:390] Attempt to free invalid pointer: 0x556dd3135220

Seems like maybe it's a possible cause for whatever pointer being invalid.

cppcooper avatar Mar 31 '22 00:03 cppcooper

How would I fix this issue if I'm running nvidia proprietary drivers? From what I understood the issue seems to be that vulkan drivers for AMD gpu's are breaking but I'm running a completely different component. Is there a way to fix this short of checking if the open source drivers use the correct glibc version or something?

tommitah avatar May 15 '22 12:05 tommitah