ValveSoftware / csgo-osx-linux

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

Drops to 0FPS and extreme load on system (64-bit) #1039

Closed Vash63 closed 8 years ago

Vash63 commented 8 years ago

After roughly 3-4 consecutive DM sessions the game drops to 0FPS and my entire system becomes extremely slow. Unfortunately the game doesn't crash, I have to kill it from terminal, so no crash logs. This happens around the same time that the old 32-bit client would crash with OOM errors. I have never had it happen on the first or second map to be played so it seems likely to be some type of memory leak, and possibly Nvidia driver related as the entire GNOME UI also becomes extremely slow and practically unusable.

As there are no crash logs, I straced it and have a few seconds of output here.

Steam System Info

davidw-valve commented 8 years ago

This does sound like the symptoms we would see if you are running out of memory, but with 16GB of RAM on your system this shouldn't happen.

When it occurs can you run "free -m" and post the output? Also can you look at how much resident memory the csgo_linux64 process is using (by using top or something similar) and tell us what it is?

If you could install sar on your system and find the number of major page faults that are occurring when you suffer this problem that would also help narrow it down.

Vash63 commented 8 years ago

Thanks for the reply. I've done some more digging and checked memory usage and think it may have some relation to gnome-shell. I'm not sure why it only seems to trigger in CSGO, but it's bad enough that I can't even tab out or open another vterm without spending a long time - but I was able to SSH in from my laptop and gather some info.

I've included a full ps faux tree and CSGO is by far the top CPU usage and is using over 6GB of RAM which seems high, but I still have plenty of free RAM.

Anyway, interesting part is that when I killed CSGO, the system was still unresponsive and the CPU usage moved over to gnome-shell. Even doing a full 'systemctl restart display-manager' didn't kill everything, I had to reboot. Next time maybe I'll try rmmoding the Nvidia driver if it happens again.

Anyway, here are the logs and stats I gathered: free.txt ps.txt sara.txt vash_stdout.txt

I also straced the gnome-shell PID after killing csgo to see what it was doing, it's just these three lines over and over millions of times in a few seconds: clock_gettime(CLOCK_MONOTONIC, {4897, 622250748}) = 0 clock_gettime(CLOCK_MONOTONIC, {4897, 622280181}) = 0 sched_yield() = 0

Edit: I should also mention for the timestamped logs that the issue occurred at 12:27am

Edit2: Also if it helps reproducing since it might be memory related, my in game settings are 2560x1440 on a 144Hz display w/ 4xMAA and all settings maxed except for motion blur which is disabled. I have vsync turned off but gsync is on in my nvidia-settings. Gnome 3.20 for the DE, I'm temporarily switching to KDE to see if I can duplicate it in KDE tomorrow.

Tele42 commented 8 years ago

I had a similar experience last night with my nvidia GTX 580 and nvidia 361.42. I use cinnamon 2.8.x, which was forked from gnome 3 quite a while ago.

In my case, the issue persisted after completely killing the CS:GO client, and after restarting X it was reproduced seconds after I started watching the match I was previously a player in. It gave me an overall impression that nvidia's driver had lost track of what the video card was doing. In the past I have had issues with the nvidia card not fully resetting to a sane state on re-modprobing the kernel module, so I went straight to a cold restart to get things up and running again.

Extra note: I don't know if this is a factor, but I use __GL_YIELD="USLEEP" in env.d and Option "TripleBuffer" "True" in xorg.conf for reduced tearing purposes. I have 2x1920x1080@60 monitors

Update: I got this issue again today, hot restarting cinnamon with cinnamon --replace recovered the user session without logging out.

Vash63 commented 8 years ago

I was able to reproduce this on KDE with Plasma 5.6, so it's not just a gnome bug. After it happened however Plasma wasn't working correctly - the background would flash black when parts of Firefox or other applications were drawing. This definitely seems Nvidia related. Here's my stdout dump from CS this time: vash_stdout.txt

davidw-valve commented 8 years ago

This sounds like a problem with the underlying drivers and/or X-window system that is probably triggered by CS:GO's use of them, but is likely not an issue with CS:GO directly.

I will keep this open though for informational purposes.

Vash63 commented 8 years ago

What timing, 30s apart there. I'm going to put a bug report on the Nvidia devtalk forums to see if it gets any traction there, they don't exactly seem to have the most community interaction though. Not really sure where else to look as there's nothing unusual in my general system journal. I should note that other than the rare graphical flickers, KDE returned back to perfect usability after I killed the CSGO client.

I should note that in between tests I also updated my Nvidia drivers to the latest 367.27.

Tele42 commented 8 years ago

Okay, as there are other reports coming in with very similar symptoms, excluding the possible OOM data point, I am reasonably sure this is the same issue between the issue reports and we'll only be tracking the issue here as this is the first report of the issue.

Tele42 commented 8 years ago

Potential duplicate of #185.

Tele42 commented 8 years ago

Through the review of the issue tracker, this is definitely a continuation of #185 and it appears to be a driver hazard that has been around since CS:GO was released for linux.

rhssk commented 8 years ago

Any update on this? A workaround or some kind of hack, doesn't have to be pretty. Or is this issue going to remain until nvidia addresses it?

Vash63 commented 8 years ago

@rhssk There are some reports on the other, similar report #185 that disabling Multicore Rendering will prevent this from happening, though it does drop your framerate.

rhssk commented 8 years ago

@Vash63 I remember trying playing around with Multicore Rendering but with no desirable results. On the bright side it has been almost 3 days since the last time I have had a FPS drop. Maybe some update made it go away.

Vash63 commented 8 years ago

It's so intermittent for me that I'm not ready to say the same, but I haven't duplicated it on Nvidia 367.35 yet.

On Fri, Aug 12, 2016, 14:49 Rihards Skuja notifications@github.com wrote:

@Vash63 https://github.com/Vash63 I remember trying playing around with Multicore Rendering but with no desirable results. On the bright side it has been almost 3 days since the last time I have had a FPS drop. Maybe some update made it go away.

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/ValveSoftware/csgo-osx-linux/issues/1039#issuecomment-239568240, or mute the thread https://github.com/notifications/unsubscribe-auth/AC8WwURapBxvzNcRrPLy9-oWyZJlON7kks5qfOp_gaJpZM4IzYhm .

rhssk commented 8 years ago

If this issue is really gone for good, I'm almost quite certain that it was because of a CSGO update. 367.35 did not change anything for me. I'm actually interested to see if Insurgency is finally playable for me. It had a similar problem to this one so I suspected it had to be related to Source games.

Tele42 commented 8 years ago

For what it's worth, I am unable to re-test this due to a hardware change. If no-one in this issue report can reproduce it, then we can close it as a duplicate of #185.

rhssk commented 8 years ago

After a few more days of playing the issue still happens. For some unknown reason it happens much, much more rarely than before (maybe once every 6 MM games compared to close to every minute in 1 game), so the game is playable. For this rare occurrence I have this keybinding for Insert key in autoexec.cfg: bind "ins" "mat_setvideomode 1920 1080 1; mat_setvideomode 1920 1080 0"

davidw-valve commented 8 years ago

Are you using the latest version of the NVidia driver? I suggest making sure you are since it is almost certainly driver related.

Vash63 commented 8 years ago

I was able to duplicate it on 367 branch, I just got the new 370.23 driver and will be trying to duplicate it again. Is Nvidia aware of the issue? They don't have much in the way of a direct public support channel or public bug tracker.

Vash63 commented 8 years ago

Played 5 games last night and was unable to duplicate this. I'm probably going to close this report tomorrow unless someone else here thinks they still have the issue. I'm on Nvidia 370.23 now.

Vash63 commented 8 years ago

I've been unable to duplicate this still - going to close it. I suspect it was fixed by the 'stealth patch' mentioned by 'vMcJohn' on reddit here:

https://www.reddit.com/r/GlobalOffensive/comments/4ymc7k/counterstrike_global_offensive_update_for_81916/

I'll re-open it if I can duplicate it again but it seems to be gone for me.

rhssk commented 8 years ago

Got 1 FPS lag today. They are very rare, but still there.

Vash63 commented 8 years ago

What Nvidia drivers?

On Sun, Aug 21, 2016, 08:53 Rihards Skuja notifications@github.com wrote:

Got 1 FPS lag today. They are very rare, but still there.

— You are receiving this because you modified the open/close state.

Reply to this email directly, view it on GitHub https://github.com/ValveSoftware/csgo-osx-linux/issues/1039#issuecomment-241265315, or mute the thread https://github.com/notifications/unsubscribe-auth/AC8WwQ6ZSfcGw5NsZxFjXfW7RZbeD3hlks5qiHRvgaJpZM4IzYhm .

rhssk commented 8 years ago

370.23-1