ValveSoftware / csgo-osx-linux

Counter-Strike: Global Offensive
http://counter-strike.net
787 stars 69 forks source link

Segmentation Fault in CS:GO on Steam #2651

Open thedarkb opened 3 years ago

thedarkb commented 3 years ago

Your system information

Please describe your issue in as much detail as possible:

I attempted to start the game, but it crashed with: ./csgo.sh: line 88: 4281 Segmentation fault ${DEBUGGER} "${GAMEROOT}"/${GAMEEXE} "$@"

Steps for reproducing this issue:

  1. Start CS:GO from Steam.
JaydeepGo commented 3 years ago

I am getting this error, Everything was working properly but after the update, CSGO keeps crashing

/home/leader/.local/share/Steam/steamapps/common/Counter-Strike Global Offensive csgo.sh: line 88: 29828 Segmentation fault (core dumped) ${DEBUGGER} " {GAMEROOT}"/${GAMEEXE} "$@"

Here are my details: OS: Manjaro Linux CPU: Intel i5 GPU: mesa Rest system info

steam/csgo log

dump log

I also tried to open steam via .deb extract but no luck. I have no controller attached and also disabled the steam input.

Skunky824 commented 3 years ago

To run steam.deb you need to:

  1. Download Steam from http://store.steampowered.com/
  2. Create a folder where to extract the .deb archive (mkdir steam-launcher)
  3. Move the steam_latest.deb archive inside the folder we just created (mv steam_lastest.deb steam-launcher)
  4. Now extract steam_latest.deb (ar x steam-latest.deb)
  5. You should now see these files inside the folder: control.tar.gz, data.tar.xz, debian-binary, steam_latest.deb.
  6. Extract data.tar.gz (tar xvf data.tar.xz)
  7. After you extracted it you should be able to find the steam launcher, cd into usr/bin/ and run steam.sh from there.

I hope my instructions are clear enough so you can still play while waiting for a fix.

eschwab commented 3 years ago

@Skunky824's workaround does not work for me. CSGO continues to crash. The only thing that I have found that works for me is playing CSGO Roulette and launching until it works.

JaydeepGo commented 3 years ago

@Skunky824's workaround also not working for me. I am using Manjaro.

josebaMdeL commented 3 years ago

I try this and worked! Not a very fast method, but better that playing CSRoulette

https://forum.manjaro.org/t/csgo-wont-launch-after-the-latest-update/52784/7

EDIT: Well, I tried this once and the game launched at first try. Now I can't repeat the process.

smirkybg commented 3 years ago

I just did what's described here in the initial report.

$ cd <path/to>/steamapps/common/Counter-Strike\ Global\ Offensive/bin/linux64
$ mv libtcmalloc_minimal.so.0 libtcmalloc_minimal.so.0.orig
$ cp /usr/lib/libtcmalloc_minimal_debug.so.4.5.9 libtcmalloc_minimal.so.0

Game launched, but as soon as I click to queue in for a Competative matchmaking, the game crashes after a few seconds.

What I also find VERY weird is that I have a second Linux account for my girlfriend with a separate copy of CS:GO and it doesn't crash on it.

kmorales13 commented 3 years ago

I'm experiencing the same issue with 5.11.6-1-MANJARO and nvidia drivers. After a lot of testing I finally managed to keep the game from crashing.

expwez commented 3 years ago

I just did what's described here in the initial report.

$ cd <path/to>/steamapps/common/Counter-Strike\ Global\ Offensive/bin/linux64
$ mv libtcmalloc_minimal.so.0 libtcmalloc_minimal.so.0.orig
$ cp /usr/lib/libtcmalloc_minimal_debug.so.4.5.9 libtcmalloc_minimal.so.0

Game launched, but as soon as I click to queue in for a Competative matchmaking, the game crashes after a few seconds.

What I also find VERY weird is that I have a second Linux account for my girlfriend with a separate copy of CS:GO and it doesn't crash on it.

Works for me, thanks! Also, as I find out, not debug library could be used /usr/lib/libtcmalloc_minimal.so.4.5.9 for replacing. Debug one causes big performance losses for me

smirkybg commented 3 years ago

Works for me, thanks!

Can you give a little bit more info, please? What exactly works for you beyond launching the game? In my comment, I stated that the game crashes on queuing for a Competative matchmaking. Do you experience the same or perhaps you did something different?

For the record, today I can't even launch the game with the workaround I mentioned. Not even with the "non-debug" library. Perhaps I was lucky or something, but I clearly launched it yesterday twice in a row.

Midorina commented 3 years ago

Adding -nojoy to launch options fixed it for me.

SIGSTKFLT commented 3 years ago

I think we just shadow banned my dudes rest in gaben lord gaben why you do this to us damn gabren

expwez commented 3 years ago

@smirkybg I've just done the commands you listed and its works. Also, I need to replace the library every time before I launch the game, cause it always replaces it with the old one

My launch options: +cl_forcepreload 1 +mat_queue_mode 2 -dxlevel 81 -lv-nosync -disable_d3d9ex -novid -nojoy +fps_max 60 -tickrate 128 +exec autoexec.cfg

And steam compatibility tool is disabled

hyshka commented 3 years ago

I was having a similar issue here on the latest Arch Linux. I used the launch arguments from @kmorales13 and enabled the compatibility runtime as so and the game finally was able to launch for me:

image

xXMateus97Xx commented 3 years ago

I'm following this issue since february, and once on last week I found a solution that worked for me, maybe help someone.

I'm using Manjaro, the result of uname -r command is 5.10.30-1-MANJARO. My hardware is an AMD Ryzen 3600 CPU with 8GB of RAM and an AMD RX 5500XT GPU.

I tried all the solutions listed in this issue before, but I only got my CSGO working with a mix of some of them.

First off all, I downloaded the Ubuntu package from Steam Website and followed the steps proposed by @Skunky824.

After start Steam by the Official package, I modified the launch options as @expwez said with some modifications, I don't use the parameters +fps_max, -tickrate and +exec.

For the last step, I installed the gperftools package with pacman and copied the libtcmalloc as @smirkybg said. The difference is that I copied the optimized build (libtcmalloc_minimal.so.4.5.9) and not the debug one.

After this steps I was able to start the game from Steam library with only one issue, all windows must be closed before start the game, if any program is open the game crashes.

I hope that if some people are still playing CSGO roullete to start the game, this steps could help.

JulianRommel commented 3 years ago

Also have the same problem on Arch & Fedora. The game sometimes starts (1/10 maybe) but also freezes a lot when I try to play the new retakes mode.

My PC: CPU: Ryzen 5 3600 GPU: RX 5700XT RAM: 32GB 3200MHz

henriquesqs commented 3 years ago

The "CSGO roullete" (the game starts after few attempts) is faster for me now. At least I'm able to play the game! But I can't guarantee that the game will open every time you click to launch...

My specs: SO: Manjaro Linux 21.0.4 (Ornara) Ram: 16gb GPU: Nvidia GeForce MX330 and Mesa Intel® UHD Graphics (CML GT2) CPU: Intel I7-10610U

I've followed this steps provided by @Skunky824 :

To run steam.deb you need to:

  1. Download Steam from http://store.steampowered.com/
  2. Create a folder where to extract the .deb archive (mkdir steam-launcher)
  3. Move the steam_latest.deb archive inside the folder we just created (mv steam_lastest.deb steam-launcher)
  4. Now extract steam_latest.deb (ar x steam-latest.deb)
  5. You should now see these files inside the folder: control.tar.gz, data.tar.xz, debian-binary, steam_latest.deb.
  6. Extract data.tar.gz (tar xvf data.tar.xz)
  7. After you extracted it you should be able to find the steam launcher, cd into usr/bin/ and run steam.sh from there.

I hope my instructions are clear enough so you can still play while waiting for a fix.

Following this post I've installed gperftools and lib32-gperftools. PAY ATTENTION: Before I've installed gperftools, I was not able to use the next step. After installing them, the cp command worked fine for me.

And then I did the following provided by @smirkybg:

I just did what's described here in the initial report.

$ cd <path/to>/steamapps/common/Counter-Strike\ Global\ Offensive/bin/linux64
$ mv libtcmalloc_minimal.so.0 libtcmalloc_minimal.so.0.orig
$ cp /usr/lib/libtcmalloc_minimal_debug.so.4.5.9 libtcmalloc_minimal.so.0

Game launched, but as soon as I click to queue in for a Competative matchmaking, the game crashes after a few seconds.

What I also find VERY weird is that I have a second Linux account for my girlfriend with a separate copy of CS:GO and it doesn't crash on it.

After both steps, I was still having trouble but found this post on Reddit saying to use -nojoy parameter and it worked for me. I've faced issues using -d3d9ex parameter so I've removed it and now I'm able to run the game. I've tested with these parameters: -nojoy -novid -fullscreen -threads 8 -high +mat_disable_fancy_blending 1 +cl_forcepreload 1 -limitvsconst -forcenovsync

Hope this helps someone...

18Orion commented 3 years ago

Also have the same problem on Manjaro

My PC: CPU: Intel 7300u GPU: intel uhd + nvidia mx110 RAM: 8gb 2300mhz

Any help? I run the game with primusrun. Can this affect?

JaydeepGo commented 3 years ago

Hi @Orion-oro-12 you can try starting steam with MESA_GLSL_CACHE_DISABLE=1 steam and lunch csgo with these lunch command MESA_GLSL_CACHE_DISABLE=1 %command% -nojoy -novid -high. I am also using the Manjaro and this solution is working. You might have to relaunch if it doesn't work on the first time.

18Orion commented 3 years ago

Hi @Orion-oro-12 you can try starting steam with MESA_GLSL_CACHE_DISABLE=1 steam and lunch csgo with these lunch command MESA_GLSL_CACHE_DISABLE=1 %command% -nojoy -novid -high. I am also using the Manjaro and this solution is working. You might have to relaunch if it doesn't work on the first time.

Although I relaunched it several times it didn't work. I also have installed Kde Neon and it works perfectly. It may be a bumblebee problem as in Kde neon I don't have it installed debug.txt This is the output it gives when I try to run it. I have also tried the flatpak version and for me works but with low performance at least for me as it doesn't have support for primusrun therefore I have to run it on the intel card. Thanks for your reply :)

Skunky824 commented 3 years ago

Adding MESA_GLSL_CACHE_DISABLE=1 solve crash for me while using Nvidia 1060 3GB Driver Version: 460.80 with "Linux manjaro 5.4.118-1-MANJARO"

18Orion commented 3 years ago

Replying to https://github.com/ValveSoftware/csgo-osx-linux/issues/2651#issuecomment-855911479

It finally worked but I can only run the game once in each session so if I want to play again I need to reboot. It is also unable to run on primusrun, but at least it runs. I think it may be the graphic engine, Source, as other games using this also have trouble, and I can launch KSP normally(it uses unity I think) THANKS A LOT

CrushedPixl commented 3 years ago

-nojoy fixed it for me on Artix (Arch derivative), but so did unplugging the Xbox 360 controller.

MrNessuno commented 3 years ago

Hi @Orion-oro-12 you can try starting steam with MESA_GLSL_CACHE_DISABLE=1 steam and lunch csgo with these lunch command MESA_GLSL_CACHE_DISABLE=1 %command% -nojoy -novid -high. I am also using the Manjaro and this solution is working. You might have to relaunch if it doesn't work on the first time.

This helps me with Manjaro KDE! Don't work all the time but at least I'm able to launch the game

williamcanin commented 3 years ago

I use Arch Linux and I have the same problem. I've tried several ways mentioned here.

joserebelo commented 3 years ago

Running into this with SDDM + Plasma Wayland on Arch Linux. Disabling SDDM and starting plasma manually (exec startplasma-wayland from tty) seems to fix it. Haven't tested other display managers.

xMAC94x commented 3 years ago

I have the same problem with running Arch Linux (and x11) since 2021. CS-GO crashes in ~98% before the orange CS-GO font appears. I almost tried everything, -nojoy, -novid, preload path, removing mesa cache, etc... nothing worked so far. I was so annoyed that i tried a new way: chroot in my complete own cs:go environment.

Here is the theory:

You create a virtual machine, get cs:go to work in the vm. stop the vm. mount the vm content in arch and then chroot into it. start steam from the chroot and then start cs:go and it works. Might be totally unsafe! Use at your own risk!

Details

download ubuntu20.04 lts desktop iso on your pc. Use KVM to create a virtual machine, create a rawdisk with at least 50GB (better 80). Follow the ubuntu installation, use the same username as in your arch linux. (I tried to have them quite similar, both user have uid 1000, same name, in order to keep problems/adjustments to a minumum). Update all software. Install steam from their website via their .deb installer: https://store.steampowered.com/about/ Run steam, login, adjust steam settings and install cs:go. Make sure that cs:go works in the VM, it might be super slow, but it should work (This seems to be an arch linux based distro problem only, ubuntu as a base should work). Once you are happy with your VM shut it down (you should be able to start it later again though).

Next we need to make arch aware of the partitions in that kvm disk. We use losetup and kpartxfor that ( https://mellowhost.com/billing/index.php?rp=/knowledgebase/82/How-to-Mount-raw-VM-disk-images-KVMorXenorVMW.html ) We create a local folder to chroot into. e.g. mnt/csgo. We start with mounting the root partition of our vm to it, by default there should be 1,2, and 5. the root partition is 5, 1 is boot/efi and 2 is unused afterwards mount boot/efiand then the special mounts dev run tmp``proc sys dev/pts. For audio we to follow the pulseaudio section here and mount those too: https://www.freedesktop.org/wiki/Software/PulseAudio/FAQ/#howdoiplaysoundsfrommychroottomyhostspulseaudiodaemon

after everything is mounted we need to prepare arch, run xhost + so that all windows can be displayed. copy over /etc/resolv.conf for network conectivity, copy over /etc/machine-id for pulseaudio and copy over your steam configs you need.

Now you are finally ready to run chroot /mnt/csgo /bin/bash to enter your chroot environment. From there su to your user and run steam. The steam window should come up now. if it does not have any textures at all there was some special folder not mounted correctly. if it only starts in offline mode you might need to debug your internet connection in chroot. if some images are broken in the steam client this is no problem, it fixed itself after some time. Feel Free to run csgo from there in near-native speed.

Script

Here is the script i used for that. USE AT YOUR OWN RISK. I have no idea what the security implications are, expect your machine to explode and lose all your data.

#!/bin/bash
##
## PREPARE A UBUNTU CHROOT ENVIRONMENT TO RUN CS:GO ON ARCH
##

if ((EUID != 0)); then
    echo "Root or Sudo  Required for script ( $(basename $0) )"
    exit
fi

set -e

kvm_raw_image="/mnt/kvm/runner/ubuntu20.04"
root_base="/mnt/csgo"
username="foobar"
#get from ~/.steam/steam/userdata/ its the folder name
steamcfgid="123133742"

# hack to reconstruct the XDG_RUNTIME_DIR of username
export XDG_RUNTIME_DIR="/run/user/$(id -u ${username})"

losetup /dev/loop0 "${kvm_raw_image}"
kpartx -a /dev/loop0
mount /dev/mapper/loop0p5 "${root_base}/"
mount /dev/mapper/loop0p1 "${root_base}/boot/efi"

echo "mounted loop device"

mount --bind /dev "${root_base}/dev/"
mount --bind /run "${root_base}/run/"
mount --bind /tmp "${root_base}/tmp/"
mount -t proc /proc "${root_base}/proc/"
mount -t sysfs /sys "${root_base}/sys/"
mount -t devpts /dev/pts "${root_base}/dev/pts/"

echo "mounted base folders, proceed with pulseaudio setup"

#https://www.freedesktop.org/wiki/Software/PulseAudio/FAQ/#howdoiplaysoundsfrommychroottomyhostspulseaudiodaemon
mount --bind /var/lib/dbus "${root_base}/var/lib/dbus"
[ -d "/home/${username}/.pulse" ] && mount --bind "/home/${username}/.pulse" "/${root_base}/home/${username}/.pulse"
mount --bind $XDG_RUNTIME_DIR "${root_base}$XDG_RUNTIME_DIR"
mount --bind /dev/shm "${root_base}/dev/shm"

echo "done mounting"

# allow other windows to be shown on the desktop
xhost +
# get internet
cp /etc/resolv.conf "${root_base}/etc/resolv.conf"
# needed for pulseaudio
cp /etc/machine-id "${root_base}/etc/machine-id"
# copy over csgo steam config
cp "/home/${username}/.steam/steam/userdata/${steamcfgid}/730/local/cfg/config.cfg" "${root_base}/home/${username}/.steam/steam/userdata/${steamcfgid}/730/local/cfg/config.cfg" || echo "config is identical"

# create startup file
cat <<EOT > "${root_base}/root/.bash_aliases"
#!/bin/bash
echo "Welcome to CS:GO Ubuntu environment"
# seting pulseaudio
export debian_chroot="CS:GO"
echo "run the following set of commands to start steam"
echo "\$ su ${username}"
echo "\$ steam"
EOT
cat <<EOT > "${root_base}/home/${username}/.bash_aliases"
#!/bin/bash
# seting pulseaudio
export XDG_RUNTIME_DIR='$XDG_RUNTIME_DIR'
EOT
chmod +x "${root_base}/root/.bash_aliases"
chmod +x "${root_base}/home/${username}/.bash_aliases"

chroot "${root_base}" /bin/bash
quasi-deus commented 3 years ago

I just did what's described here in the initial report.

$ cd <path/to>/steamapps/common/Counter-Strike\ Global\ Offensive/bin/linux64
$ mv libtcmalloc_minimal.so.0 libtcmalloc_minimal.so.0.orig
$ cp /usr/lib/libtcmalloc_minimal_debug.so.4.5.9 libtcmalloc_minimal.so.0

Game launched, but as soon as I click to queue in for a Competative matchmaking, the game crashes after a few seconds.

What I also find VERY weird is that I have a second Linux account for my girlfriend with a separate copy of CS:GO and it doesn't crash on it.

So I initially had the same as this issue with almost every rolling release I have tried(just Manjaro and Arch), and I had intially solved it by using a comment(on another issue) on copying the libtcmalloc_minimal.so.0. But I had forgotten the name of the library that it was part of, so I tried to search for it in github and figure out what library I needed to install and which file to copy and replace and accordingly as it is in the foretagged.

But the debug file works only until the menu, after which it crashes upon matchmaking/connecting to anyone's lobby/joining a server. And it everything properly worked for me when I did this:

$ cp /usr/lib/libtcmalloc_minimal.so.4.5.9 libtcmalloc_minimal.so.0

Summarizing steps:

$ yay -S gperftools $ cd ~/.steam/steam/steamapps/common/Counter-Strike\ Global\ Offensive/bin/linux64 $ mv libtcmalloc_minimal.so.0 libtcmalloc_minimal.so.0.orig $ cp /usr/lib/libtcmalloc_minimal.so.4.5.9 ~/.steam/steam/steamapps/common/Counter-Strike\ Global\ Offensive/bin/linux64/libtcmalloc_minimal.so.0

rhysday commented 3 years ago

Above fix didn't work.

Running latest Arch with latest Nvidia drivers.

Skunky824 commented 3 years ago

I have tried every single fix on multiple machines and the only one one that works reliably (100% chance for game to launch correctly) is to create a new fresh user install steam from the official website and install csgo from there.

winniethepoohbear commented 3 years ago

The workaround in https://github.com/ValveSoftware/csgo-osx-linux/issues/2651#issuecomment-777650910 and using -novid -nojoy launch parameters worked for me, but it is launched in insecure mode because it is launched from outside of steam.

rhysday commented 3 years ago

This was fixed for me with latest updates.

mlandalv commented 3 years ago

~Seems to work for me too now!~ Forget that, i was too trigger happy. It started twice in a row, but now seems to be back to not starting again.

Etaash-mathamsetty commented 3 years ago

It's still not working, I tired every single patch described in this long thread, and it still dosen't work :( I am using ubuntu 21.10 on wayland (I will try x11) not working with x11 either

7RST1 commented 3 years ago

I just want to point out that this issue and #2659 have similar crashes, and people over there (including me) have had success with this fix. Might be worth a shot.

djdeath commented 3 years ago

Having the same problem, I ran CSGO under valgrind and one malloc/free error : https://github.com/ValveSoftware/csgo-osx-linux/issues/2659#issuecomment-946112196

nathanfranke commented 3 years ago

Crashes for me on the linux-zen kernel. I don't crash on the linux or linux-lts kernels though.

Edit: Flatpak steam is working perfectly for me. Possible performance hit

zebcarnell commented 3 years ago

This resolves my issues on Fedora 35:

dnf install gperftools-libs
cd ~/.steam/steam/steamapps/common/Counter-Strike\ Global\ Offensive/bin/linux64/
mv libtcmalloc_minimal.so.0 libtcmalloc_minimal.so.0.bak
mv libtcmalloc_minimal.so.4 libtcmalloc_minimal.so.4.bak
cp /usr/lib64/libtcmalloc_minimal.so.4.5.9 libtcmalloc_minimal.so.0
ghost commented 2 years ago

Crashes for me on the linux-zen kernel. I don't crash on the linux or linux-lts kernels though.

I use arch linux with linux kernel and it is crashing for me.

ghost commented 2 years ago

CSGO is not playable on linux. I tried it with linux mint , pop os and manjaro :\

ljedrz commented 2 years ago

@prorounak2005 I use arch too, and https://github.com/ValveSoftware/csgo-osx-linux/issues/2659#issuecomment-934357559 worked for me.

antonilol commented 2 years ago

i use arch too and for me the workaround (https://github.com/ValveSoftware/csgo-osx-linux/issues/2659#issuecomment-934357559) and the fix (https://github.com/ValveSoftware/csgo-osx-linux/issues/2651#issuecomment-966213816) both work with the linux kernel. btw for arch it is pacman -S gperftools instead of the dnf install

ghost commented 2 years ago

@prorounak2005 I use arch too, and #2659 (comment) worked for me.

Yes it is working but whenever u will talk to u teammates u have to press the k button and after pressing the k button ur screen just freezes and it lags. :\

V1ck3s commented 2 years ago

This worked for me : Archwiki

Just use this two commands (with sudo) :

cp ~/.steam/root/ubuntu12_32/steam-runtime/i386/usr/lib/i386-linux-gnu/libgudev* /usr/lib32
cp ~/.steam/root/ubuntu12_32/steam-runtime/i386/lib/i386-linux-gnu/libusb* /usr/lib32

EDIT : After 10 successfull start, it didn't work anymore.... I'm going to use flatpak version. Didn't want to find to solve this error anymore.

nathanfranke commented 2 years ago

I have been using the Flatpak version of steam for about a week now and haven't experienced the crash.

programmer290399 commented 2 years ago

Have tried all the things above, none of them work for me on manjaro.

rhythmpattern commented 2 years ago

This resolves my issues on Fedora 35:

dnf install gperftools-libs
cd ~/.steam/steam/steamapps/common/Counter-Strike\ Global\ Offensive/bin/linux64/
mv libtcmalloc_minimal.so.0 libtcmalloc_minimal.so.0.bak
mv libtcmalloc_minimal.so.4 libtcmalloc_minimal.so.4.bak
cp /usr/lib64/libtcmalloc_minimal.so.4.5.9 libtcmalloc_minimal.so.0

This worked for me on Fedora 35 also.

Novimatrem commented 2 years ago

This resolves my issues on Fedora 35:

dnf install gperftools-libs
cd ~/.steam/steam/steamapps/common/Counter-Strike\ Global\ Offensive/bin/linux64/
mv libtcmalloc_minimal.so.0 libtcmalloc_minimal.so.0.bak
mv libtcmalloc_minimal.so.4 libtcmalloc_minimal.so.4.bak
cp /usr/lib64/libtcmalloc_minimal.so.4.5.9 libtcmalloc_minimal.so.0

This worked for me on Fedora 35 also.

This also resolved the issue for me, on Fedora 35, NVIDIA proprietary.

angelocordero commented 2 years ago

still broken in 5.16.1-artix1-1

tried everything i found and still not fixed. I could paste the crash log if anyone is interested but I cant seem to find anything in there

letvinov28 commented 2 years ago

Try deleting all config files from CS:GO (Google for path) and turn off Steam Cloud. After that , try launching the game.

pHr34kY commented 2 years ago

On ubuntu 21.10, had to install the dependency too:

sudo apt install libtcmalloc-minimal4
cd ~/.local/share/Steam/steamapps/common/Counter-Strike Global Offensive/bin/linux64
mv libtcmalloc_minimal.so.0 libtcmalloc_minimal.so.0.bak
ln -s /usr/lib/x86_64-linux-gnu/libtcmalloc_minimal.so.4 libtcmalloc_minimal.so.0