question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`mono` eats up CPU on MacOS

See original GitHub issue

Issue Description

Not sure exactly where to put this (here, VSCode or dotnet/runtime). Mono is absolutely killing my CPU randomly. Don’t have anything special running (just this app) with 2 tabs open. This issue is not specific to that sample app as I’ve seen it occur randomly in the past as well.

image

I have the macos sample which I believe is a proc dump to share offline.

Logs

OmniSharp log

[Logs.txt](https://github.com/OmniSharp/omnisharp-vscode/files/7187660/Logs.txt)

C# log

Does not show anything

Environment information

VSCode version: 1.60.1 C# Extension: 1.23.15

Mono Information OmniSharp using built-in mono
Dotnet Information .NET SDK (reflecting any global.json): Version: 6.0.100-rc.2.21457.23 Commit: 7b7148685e

Runtime Environment: OS Name: Mac OS X OS Version: 11.6 OS Platform: Darwin RID: osx.11.0-x64 Base Path: /Users/tanay/dev/aspnetcore/.dotnet/sdk/6.0.100-rc.2.21457.23/

Host (useful for support): Version: 7.0.0-alpha.1.21457.1 Commit: 7292301fc5

.NET SDKs installed: 6.0.100-preview.3.21160.5 [/Users/tanay/dev/aspnetcore/.dotnet/sdk] 6.0.100-preview.3.21168.19 [/Users/tanay/dev/aspnetcore/.dotnet/sdk] 6.0.100-preview.4.21216.8 [/Users/tanay/dev/aspnetcore/.dotnet/sdk] 6.0.100-preview.5.21264.3 [/Users/tanay/dev/aspnetcore/.dotnet/sdk] 6.0.100-preview.7.21324.2 [/Users/tanay/dev/aspnetcore/.dotnet/sdk] 6.0.100-preview.7.21356.3 [/Users/tanay/dev/aspnetcore/.dotnet/sdk] 6.0.100-preview.7.21364.4 [/Users/tanay/dev/aspnetcore/.dotnet/sdk] 6.0.100-rc.1.21401.2 [/Users/tanay/dev/aspnetcore/.dotnet/sdk] 6.0.100-rc.1.21415.3 [/Users/tanay/dev/aspnetcore/.dotnet/sdk] 6.0.100-rc.2.21424.34 [/Users/tanay/dev/aspnetcore/.dotnet/sdk] 6.0.100-rc.2.21430.28 [/Users/tanay/dev/aspnetcore/.dotnet/sdk] 6.0.100-rc.2.21457.23 [/Users/tanay/dev/aspnetcore/.dotnet/sdk] 7.0.100-alpha.1.21463.2 [/Users/tanay/dev/aspnetcore/.dotnet/sdk]

.NET runtimes installed: Microsoft.AspNetCore.App 3.1.13 [/Users/tanay/dev/aspnetcore/.dotnet/shared/Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 3.1.14 [/Users/tanay/dev/aspnetcore/.dotnet/shared/Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 6.0.0-dev [/Users/tanay/dev/aspnetcore/.dotnet/shared/Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 6.0.0-preview.3.21158.2 [/Users/tanay/dev/aspnetcore/.dotnet/shared/Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 6.0.0-preview.3.21168.5 [/Users/tanay/dev/aspnetcore/.dotnet/shared/Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 6.0.0-preview.4.21215.16 [/Users/tanay/dev/aspnetcore/.dotnet/shared/Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 6.0.0-preview.5.21263.4 [/Users/tanay/dev/aspnetcore/.dotnet/shared/Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 6.0.0-preview.7.21322.5 [/Users/tanay/dev/aspnetcore/.dotnet/shared/Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 6.0.0-preview.7.21355.4 [/Users/tanay/dev/aspnetcore/.dotnet/shared/Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 6.0.0-preview.7.21363.16 [/Users/tanay/dev/aspnetcore/.dotnet/shared/Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 6.0.0-rc.1.21381.3 [/Users/tanay/dev/aspnetcore/.dotnet/shared/Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 6.0.0-rc.1.21413.12 [/Users/tanay/dev/aspnetcore/.dotnet/shared/Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 6.0.0-rc.2.21420.26 [/Users/tanay/dev/aspnetcore/.dotnet/shared/Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 6.0.0-rc.2.21430.13 [/Users/tanay/dev/aspnetcore/.dotnet/shared/Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 6.0.0-rc.2.21455.6 [/Users/tanay/dev/aspnetcore/.dotnet/shared/Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 7.0.0-alpha.1.21426.33 [/Users/tanay/dev/aspnetcore/.dotnet/shared/Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 7.0.0-dev [/Users/tanay/dev/aspnetcore/.dotnet/shared/Microsoft.AspNetCore.App] Microsoft.NETCore.App 2.1.25 [/Users/tanay/dev/aspnetcore/.dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 2.1.27 [/Users/tanay/dev/aspnetcore/.dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 3.1.13 [/Users/tanay/dev/aspnetcore/.dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 3.1.14 [/Users/tanay/dev/aspnetcore/.dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 6.0.0-preview.3.21157.6 [/Users/tanay/dev/aspnetcore/.dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 6.0.0-preview.3.21166.1 [/Users/tanay/dev/aspnetcore/.dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 6.0.0-preview.3.21167.1 [/Users/tanay/dev/aspnetcore/.dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 6.0.0-preview.4.21201.1 [/Users/tanay/dev/aspnetcore/.dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 6.0.0-preview.4.21211.7 [/Users/tanay/dev/aspnetcore/.dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 6.0.0-preview.4.21215.2 [/Users/tanay/dev/aspnetcore/.dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 6.0.0-preview.4.21216.6 [/Users/tanay/dev/aspnetcore/.dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 6.0.0-preview.5.21263.1 [/Users/tanay/dev/aspnetcore/.dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 6.0.0-preview.6.21302.1 [/Users/tanay/dev/aspnetcore/.dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 6.0.0-preview.7.21321.15 [/Users/tanay/dev/aspnetcore/.dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 6.0.0-preview.7.21325.1 [/Users/tanay/dev/aspnetcore/.dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 6.0.0-preview.7.21351.2 [/Users/tanay/dev/aspnetcore/.dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 6.0.0-preview.7.21355.1 [/Users/tanay/dev/aspnetcore/.dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 6.0.0-preview.7.21360.10 [/Users/tanay/dev/aspnetcore/.dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 6.0.0-preview.7.21363.9 [/Users/tanay/dev/aspnetcore/.dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 6.0.0-rc.1.21372.1 [/Users/tanay/dev/aspnetcore/.dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 6.0.0-rc.1.21372.4 [/Users/tanay/dev/aspnetcore/.dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 6.0.0-rc.1.21374.7 [/Users/tanay/dev/aspnetcore/.dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 6.0.0-rc.1.21375.2 [/Users/tanay/dev/aspnetcore/.dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 6.0.0-rc.1.21376.24 [/Users/tanay/dev/aspnetcore/.dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 6.0.0-rc.1.21378.2 [/Users/tanay/dev/aspnetcore/.dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 6.0.0-rc.1.21378.9 [/Users/tanay/dev/aspnetcore/.dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 6.0.0-rc.1.21401.1 [/Users/tanay/dev/aspnetcore/.dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 6.0.0-rc.1.21401.3 [/Users/tanay/dev/aspnetcore/.dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 6.0.0-rc.1.21405.1 [/Users/tanay/dev/aspnetcore/.dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 6.0.0-rc.1.21414.4 [/Users/tanay/dev/aspnetcore/.dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 6.0.0-rc.1.21421.1 [/Users/tanay/dev/aspnetcore/.dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 6.0.0-rc.2.21423.6 [/Users/tanay/dev/aspnetcore/.dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 6.0.0-rc.2.21424.25 [/Users/tanay/dev/aspnetcore/.dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 6.0.0-rc.2.21430.13 [/Users/tanay/dev/aspnetcore/.dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 6.0.0-rc.2.21457.6 [/Users/tanay/dev/aspnetcore/.dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 6.0.0-rc.2.21466.4 [/Users/tanay/dev/aspnetcore/.dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 7.0.0-alpha.1.21419.1 [/Users/tanay/dev/aspnetcore/.dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 7.0.0-alpha.1.21425.4 [/Users/tanay/dev/aspnetcore/.dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 7.0.0-alpha.1.21430.29 [/Users/tanay/dev/aspnetcore/.dotnet/shared/Microsoft.NETCore.App] Microsoft.NETCore.App 7.0.0-alpha.1.21457.1 [/Users/tanay/dev/aspnetcore/.dotnet/shared/Microsoft.NETCore.App]

To install additional .NET runtimes or SDKs: https://aka.ms/dotnet-download

Visual Studio Code Extensions
Extension Author Version
azure-account ms-vscode 0.9.8
csharp ms-dotnettools 1.23.15
EditorConfig EditorConfig 0.16.4
jupyter ms-toolsai 2021.8.2041215044
jupyter-keymap ms-toolsai 1.0.0
markdown-all-in-one yzhang 3.4.0
python ms-python 2021.9.1230869389
vscode-icons vscode-icons-team 11.6.0
vscode-paste-image mushan 1.0.4
vscode-pylance ms-python 2021.9.1
vscode-typescript-tslint-plugin ms-vscode 1.3.3

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
TanayParikhcommented, Nov 17, 2021

I haven’t seen this issue in a while now, feel free to close out 😄

1reaction
JoeRobichcommented, Sep 20, 2021

@TanayParikh Can you try the latest omnisharp build by setting omnisharp.path to latest? I am hoping this unreleased bug fix resolves your problem.

Read more comments on GitHub >

github_iconTop Results From Across the Web

mono-sgen64 causes 100% CPU when connecting to build host
- Open Visual Studio for Windows. - Tools -> iOS -> Pair to Mac - Connect to your Mac. On the MAC: -...
Read more >
Very high CPU and memory usage of mono-sgen on Os X
I'm currently having a similar problem where mono-sgen will start eating up RAM and have high CPU utilization after I start a debug...
Read more >
Orphaned mono-sgen64 processes occupy CPU · Issue #11939
When connected from my PC/VS2019 to the MAC, three mono-sgen64 starts, and one uses all CPU of Mac, even if everything is in...
Read more >
Mono CPU utilization is absurdly high - Duplicati forum
Mac OS up to date. Just installed Duplicati yesterday. CPU on mono-sgen64 seems to flux between 100-170% CPU. Any thoughts?
Read more >
5 Ways to Fix High CPU Usage on macOS - MakeUseOf
5 Ways to Fix High CPU Usage on macOS · 1. Update Software and Restart Your Mac · 2. Use Activity Monitor to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found