Jump to content

Periodic system freeze on linux


DuncanR
  • Branch: Preview Branch Version: Linux Pending

Linux mint (https://termbin.com/tfa3q)

The application freezes after between 10 minutes and 3 hours of gameplay. Results in a complete system freeze requiring hardware level reset.

Some notes:

I have worked as both a software tester and a developer so I understand that supporting linux can be a struggle due to different configurations. If there is any additional information I can supply, or debug tools I can run I am happy to help.

The freeze takes a few seconds to happen, it starts with large lag spikes, then the mouse cursor stops moving, then all system sound goes into a short loop. I have multiple monitors and can take not of system resource use at the moment it happens if that helps (so far I have noticed anything untoward there though).

I read my current log is not a good example but I want to get the report finished so that I don't lose this when I have to restart, so I will add another log in a couple of hours when it next crashes.

Edit: Ok the new log is there. The error appears to be a repeated case of the following:

src/steamnetworkingsockets/clientlib/steamnetworkingsockets_lowlevel.cpp (1852) : Assertion Failed: SteamnetworkingSockets service thread waited 181ms for lock!  This directly adds to network latency!  It could be a bug, but it's usually caused by general performance problem such as thread starvation or a debug output handler taking too long.

The time waited increases as the logspam continues.

Yes I have mods, no I have not tried uninstalling them all to check if they are the cause. This would require me to take up to 3 hours our from my day just for testing this bug and I am very busy. The mods are all quite simple and quite popular established mods. Additionally I have had the crash by spending too long in the menu or in the new game settings, which suggests (but does not prove) that it is not caused by the mods.

I was having this issue before I switched to the preview branch so it is an issue that is NOT new to the DLC.

I apologise for the quality of the reproduction steps, but that is all I have. Once again I am happy to take additional steps while I am playing to assist with diagnosing this issue.


Steps to Reproduce

Start a game and play for a few hours

Player.log

  • Like 1



User Feedback


I was able to greatly increase the time it took to freeze by closing all other applications. But it still happened eventually. Usually the other applications I have running are some chat programs and a browser. I think all of this points to thread starvation. The browser uses a lot of threads so closing that would likely result in delaying the issue. The ram and cpu usage do not increase during this issue either so it can not be either of those.

Share this comment


Link to comment
Share on other sites

This sounds like a swapstorm. When it first starts to lag out go check out memory usage, I suspect you'll find your system is getting close to OOM and spending way too long trying to reclaim pages. I like to use cgroups, my friend recommends earlyoom as an easier out-of-the-box solution.

  • Like 1

Share this comment


Link to comment
Share on other sites

I tried that, memory use did not increase at all during the issue. It is possible the terminal freezes at the same moment the issue starts and thus does not show the latest data, but it seems unlikely. I would expect the memory use to spike before symptoms start and only to see a slowdown when it started to get too high. Also the machine remains partially responsive for up to a minute once the first lag spikes hit so one would expect the terminal to get a few updates in.

Having said that I could be wrong, and a swap storm was my first though too, so I will check it again.

 

edit: Ok that was kind of inconclusive, the ram usage never fluctuated by more than 1% the whole time I was playing from loading the save until the crash. But the kswap thread was running at 26% of a core so there was some swapping happening. Also worth noting, the cpu usage of ONI dropped to almost nothing.

I will adjust the swap settings and see what happens.

edit2: So I learned how to correctly interpret top output today, the mem% stat only includes actual ram used and does not include swap memory. The issue is indeed a swap storm. ONI reached 14gb total memory usage by the time it crashed. Is this normal?  Does everyone who plays this game have way more ram than me? I would be the first to admit that 8gb is a bit lean for a gaming rig but this seems a bit extreme.

Edited by DuncanR

Share this comment


Link to comment
Share on other sites

If kswapd is using ANYTHING appreciable then you've got RAM problems. 26% of one core's time is being spent just shuffling pages around trying to free up enough RAM for a malloc() to succeed or a page-in to happen! That's a lot of wasted cycles, and that's just the time spent trying to get the pages, it doesn't count all the processes that were trying to do things that needed RAM that are instead just sitting there waiting for pages to be available (processes like oxygen not included and your window manager).

 

  • Thanks 1
  • Sanity 1

Share this comment


Link to comment
Share on other sites

Looks like I have same issues on Ubuntu 20.04 kernel 5.11.0-41-generic

May be related - exiting to main menu decreases memory consumption of game process by about 500 Mb, the other 5+ Gb are freed only after exit to OS, and initial memory usage of main menu is about 1.5 Gb

Share this comment


Link to comment
Share on other sites

Some update: My build as reported in main menu is u39-490154-5

On mem usage via glances utilty

Memory usage main menu after brand new start: 1.50G, 3.70G of free memory

After exit to menu (30 min of gameplay): 5.32G, 440M of free memory

After exit to desktop: 0, 5.74G of free memory

As far as I can recall it was about 250M memory left when I exit to main menu, I didn`t dare to take screenshots ;-)

 

Screenshot from 2021-12-15 01-42-26.png

Screenshot from 2021-12-15 01-39-34.png

Screenshot from 2021-12-15 01-37-35.png

Screenshot from 2021-12-15 01-36-18.png

Share this comment


Link to comment
Share on other sites

55 minutes ago, kirill.stepanov said:

As far as I can recall it was about 250M memory left when I exit to main menu, I didn`t dare to take screenshots ;-)

that is not only at linux, there is indeed extra memory usage when you go back to main menu

i not bothered talk about that before when i debugged, but there is running allot gameobjects after you go back to main menu

Edited by gabberworld

Share this comment


Link to comment
Share on other sites



Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
  • Create New...