Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Large CPU Hang due to Stride.Core.Threading on Windows #2635

Open
HyperSphereStudio opened this issue Feb 12, 2025 · 2 comments
Open

Large CPU Hang due to Stride.Core.Threading on Windows #2635

HyperSphereStudio opened this issue Feb 12, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@HyperSphereStudio
Copy link

Release: 4.2.0.2293

Platform: Windows 11

I have been using the stride engine just fine until today when suddenly even the most trivial stride templates (like the default ball) took 100% of all cores of my CPU. It led to massive freezing of my computer and the inability to do much of anything with stride. I am assuming something changed though what - I am not sure.

To Reproduce: Unfortunately I have no idea how to reproduce this... I cleaned and reinstalled everything to do with stride (.NET, MSBuild, VS etc.) but still didnt go away. I am assuming this must be a windows update?

Screenshots
I did some profiling to find where it was happening:

Image

As you can see there is a massive portion of time being consumed on the wait call of LowLevelInfoSemaphore.Wait.

I downloaded and built my own latest version of stride - same problem

Temporary Fix
I bypassed Stride.Threading to System.Threading and it works normally again

     public unsafe void QueueWorkItem([NotNull, Pooled] Action workItem, int amount = 1)
     {
         for (int i = 0; i < amount; i++)
             System.Threading.ThreadPool.QueueUserWorkItem((o) => workItem());
         return;

etc.

Let me know if you want me to dig further into this!

@HyperSphereStudio HyperSphereStudio added the bug Something isn't working label Feb 12, 2025
@Eideren
Copy link
Collaborator

Eideren commented Feb 12, 2025

Looks like it's stuck inside dotnet's LowLevelLifoSemaphore, can you share your dotnet --info with us, open a cmd, type dotnet --info and copy paste the result in a message.
Also your CPU just in case.

@HyperSphereStudio
Copy link
Author


.NET SDK:
 Version:           8.0.309
 Commit:            9c31385351
 Workload version:  8.0.300-manifests.f7661779
 MSBuild version:   17.10.14+7c2b92622

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.26100
 OS Platform: Windows
 RID:         win-x64
 Base Path:   C:\Program Files\dotnet\sdk\8.0.309\

.NET workloads installed:
There are no installed workloads to display.

Host:
  Version:      8.0.13
  Architecture: x64
  Commit:       eba546b0f0

.NET SDKs installed:
  8.0.309 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 8.0.13 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 8.0.13 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.WindowsDesktop.App 8.0.13 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Other architectures found:
  x86   [C:\Program Files (x86)\dotnet]
    registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]

CPU: Intel(R) Core(TM) Ultra 7 155U 1.70 GHz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants