ValveSoftware / steam-for-linux

Issue tracking for the Steam for Linux beta client
4.21k stars 174 forks source link

Steam crashes with SegFault while playing a game #9035

Open ACH1980 opened 1 year ago

ACH1980 commented 1 year ago

Your system information

Please describe your issue in as much detail as possible:

When I start Cities:Skylines (Steam-App-ID 255710) it loads well at first, but after a few minutes it will crash together with the steam client . This also happens on a clean setup of the game without any mods.

When running steam from the Command Line I got only a segfault when the game crashed, so this wasn't really an insight, but I looked journalctl while playing and that was a bit more of an insight, because there was also the following line, which might be a hint on the piece of software which caused the crash: Dez 25 15:49:49 desktop1 kernel: steam[201607]: segfault at 0 ip 00000000f5e7e96d sp 00000000ffa3f730 error 4 in libnvidia-glcore.so.525.60.11[f4d47000+231c000]

Terminal output of steam: https://pastebin.com/Wwt8TS8e journalctl: https://pastebin.com/qM8j47ev Steam System Information: https://gist.github.com/ACH1980/ecc001d820e10c9881a233e14a6ca0ee

Interestingly while I tried to get the Steam System Information Steam crashed 2 times, so I tried repeating it with journalctl, but then I was able to copy the information, but a segfault occured in the steam process which however didn't crashed the client (which is interesting because I never saw a segfault not crashing a program)... I'm not sure if it's related, but I think it is, because it's the same library!

2nd journalctl: https://gist.github.com/ACH1980/55124f07081763291ccc8ead541e6d7d

Steps for reproducing this issue:

  1. Install Cities Skylines
  2. Run Cities Skylines
  3. Play a few minutes
ACH1980 commented 1 year ago

Here are the 2 dump files. dmps.zip

ACH1980 commented 1 year ago

Today there where some updates available and it seems the Mesa Update fixed the issue. Will try a long run today for testing and if the issue is indeed fixed, I'll close it. Update list from today if anyone is curious: Screenshot from 2022-12-28 16-01-44

ACH1980 commented 1 year ago

Yep, it's fixed, played a few hrs now, before it crashed in minutes every time.

ACH1980 commented 1 year ago

Now it gets really confusing! The exact same issue is happening again, but within American Truck Simulator (App ID 270880), which is even weirder given the fact that it run fine as the issue appeared last time (in fact I tested that it doesn't affect all games using ATS).

As I said it's exactly the same error as before - at least from which I can tell. Even the kernel code is the same, which might be able to give a hint, but I'm not sure. Here is again the (new!) journalctl: https://gist.github.com/ACH1980/88f8e8713113f4075fae8f5c6adcbbda

I also added the crash dump and the assert dump (not sure if the second one helps, but I added it to be sure). dmps2.zip

ACH1980 commented 1 year ago

Ok I remembered, "have you tried turning it off and on again" and noticed I didn't tried this, so I did and it helps! So for me this is fine now as I know how I can workaround this in just a matter of minutes.

I'll keep this issue open for you to decide if you want to keep investigating this (maybe especially why games can crash the steam client) or not. If you don't want, just feel free to close this issue, if you want to keep investigating this, just let me know if you need anything from me for debugging and I'll send it next time this happens.

ACH1980 commented 1 year ago

Well - minutes after I wrote that it crashed again, I thought it will keep without crashing for longer after running 1hr w/o problems 😐

ACH1980 commented 1 year ago

Interesting thing to notice is that I can't find the libnvidia-glcore.so mentioned in the crash anywhere on my Filesystem, do you know what this could be?

ACH1980 commented 1 year ago

I mean how can a file not present crash? Because it says, that this library crashed and it's not even there...

ACH1980 commented 1 year ago

Ok, fixed at least 2 driver-related issues by switching from wayland to Xorg. Didn't have time to try this one yet (as it sometimes takes hrs till the next crash and sometimes only minutes to make some reliable information I've to test it about 6hrs and I am only one hr at home today until I'm away for the weekend), but I'll test it soon and make an update here.

pythonWithAHat commented 1 year ago

having the same issue but with elden ring and Battlefield V (have'nt tried other games), game and client just close unexpectedly after a few minutes. Switched beta build Jan 24, 2023 to see if it help but it does not.

pythonWithAHat commented 1 year ago

Should probably leave my info as well, kernel: 6.0.14-201.fsync.fc36.x86_64, OS: Nobara 36, mesa 22.3.1, GPU: 6900 xt Also while viewing journalctl -f when eldenring crashes I get this as shown in the appended file, so maybe its not explicitly a steam issue but Im not sure and my symptoms match OP's so I don't know errors.txt

pythonWithAHat commented 1 year ago

it appears systemd-oomd was actually the culprit to the unexpected crashes. Systemd--oomd was killing the game and steam for using too much memory even tough I have 32GB but whatever. I solved it with systemctl stop systemd-oomd ; systemctl mask systemd-oomd

Darkhogg commented 1 year ago

I'm having this issue in pretty much all games I try (Factorio, Oxygen Not Included, Kingdom: Two Crowns, Portal 2...). systemd-oomd does not seem to be the culprit (no logs anywhere about it), although I suspect low memory or high CPU temperature might be triggering it to some extent (anecdotal evidence).

I'm running Arch Linux (fully up to date) in XFCE4, if that matters.

ACH1980 commented 1 year ago

The OOMD Faults are a different kind. My case wasn't related to OOM situations (as you can see it wasn't in any log file too). Please create a separate issue in case you think this is a bug (maybe just add even more memory by adding swap to not hit the OOMD threshold at all).