Facepunch / sbox-issues

176 stars 12 forks source link

System becomes unresponsive when S&box Editor is running #5489

Closed Ninjadude101 closed 6 months ago

Ninjadude101 commented 6 months ago

Describe the bug

I've been having issues with my system becoming unresponsive this past week, seemingly at random, whenever the S&box edior is running. It doesn't happen reliably - that is, I have not yet figured out a set of steps to follow to reproduce it. However, I have noticed that it has happened once when reloading .cs files that were edited in Rider, and it has also happened once when S&box editor was left running overnight.

When it happens, the entire system grinds to a halt and becomes very slow to respond to any input. Even Task Manager is unable to render properly during this. If I wait long enough, I can see that according to Task Manager, the CPU is not breaking a sweat, the memory is less than half utilized, and the GPU is idle. None of the graphs seem to suggest any component being pushed to its limits. Under the processes tab, when it finally loads, I can see that thousands of rundll32.exe (Windows host process) have been spawned. I am unable to check or prove that these processes were spawned by S&box, but this does not happen if I don't run S&box.

To Reproduce

Unfortunately I have been unable to find a concrete way to reproduce the issue, it seems to happen at random for me whilst S&box is running. As mentioned, it can be triggered by causing a .cs file to reload by editing it externally, but it has also happened after S&box was running for an extended period of time.

Expected behavior

Thousands of rundll32.exe should not be spawned and S&box should not make the system unstable.

Media/Files

image image image image

Additional context

Windows 10 22H2 AMD Ryzen 5800X - 8 Core / 16 Thread 128GB DDR4 @ 2400MHz Nvidia RTX 2060 SUPER - Driver 552.22

Ninjadude101 commented 6 months ago

In the interest of providing as much information as I can, and in case it's relevant: This system is also a HyperV hypervisor. I'm running a few VMs such as a gaming VM for my Mrs (which has the graphics card shared with paravirtualization), a couple of Azure pipeline agents VMs, a TrueNAS VM and a Pterodactyl VM for dumping the odd game server onto. None of these VMs are new, it's been working this way for at least 2 years.

Also, my primary game drive where all my Steam games are stored, is a remote disk mounted into Windows using iSCSI. The connection between this PC and the storage host is 10Gbit and I've not experienced problems with this before either.

Ninjadude101 commented 6 months ago

I've had a chance to investigate a bit further and I no longer think this has anything to do with S&box. I had updated my Nvidia driver at the same time as installing S&box recently, and I think it may have been a bug with the driver. I was able to check the command line against a small set of these rundll32 processes and they all related to Nvidia Gamestream. I have updated my Nvidia driver once more and the problem hasn't happened again since.