-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
DotNet 6 on Mac M1 - high CPU use and processes stuck #23267
Comments
I have same problem |
same to me. any fix yet? |
No fix as yet. It's starting to become unusable on my machine. Hopefully MS see this and fix it soon. Can't even run VS2022 in a virtual machine as it is so slow! Incidentally, VS2022, VS2019, VSCode (with C# DotNet extensions) and JetBrains Rider all exhibit the same problem and allow native DotNet 6 processes to accumulate and run away at 100% CPU use all the time. Having to constantly keep my eye on Activity Monitor just to close down these DotNet 6 processes is becoming tiresome and cumbersome. This is almost at the point where I'm going to have to buy a Windows machine just to work with DotNet 6 - bonkers when I have such a powerhouse of a laptop! Is there any way of moving this up the priority list for fixing? Surely just cannot be a few people experiencing this same problem? |
This is not isolated to M1 Macs. I'm having the same problem on a 2016 i7 MBP. I haven't isolated the exact steps to reproduce yet. I'm using VSCode 1.63.2 and .NET 6.0.101. The runaway processes either need to be quit through Activity Monitor, or the laptop needs to be rebooted. They won't go away on their own even after VSCode, terminal, etc are closed. |
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label. |
Hey folks, in order to help us diagnose this it would be very helpful if you could provide some of the commands that these |
This affects me as well. Command:
Not sure why |
Same issue, on macOS Big Sur (11.6.2). Using dotnet 6.0.101 and commit ef49f62. A single dotnet process uses 100% CPU and doesn't get below 96%. If I spin up another dotnet process at the same time, the same issue all dotnet processes sit around 99% CPU. |
I just started my macbook i7 and I noticed my fan very active and the battery draining quick. I saw I had multiple processes of dotnet at 99% of CPU. I killed all of them. |
Does anyone have a workaround for this? I can't keep having to check Activity Monitor every time I run my apps to check stuff just to close these rogue DotNet processes. Every. Single. Time. It's really getting old now 😞 |
do you have vscode with C# extension? I noticed that removing that extension it solved the problem. |
For me, this originated from the C# extension for VS Code when trying to start a .NET Interactive notebook. Edit: This was not on an M1 MacBook, but an intel MacBook. (a 2019 13' MacBook Pro to be precise) |
I have the same problema when I run VSCode for Mac with m1 running a dotnet project and close it. Always 2 dotnet6 processes remains with 100% of CPU consumption . |
So this requires VS Code to repro? If you disable omnisharp and all other extensions does it still repro? What are the command lines of the errant processes? If you attach a debugger what is the stack of the busy thread? |
Can confirm that disabling all MS C# extensions in VS Code eradicates the problem. |
Can you enable one at a time to help find the culprit? Then we should move this issue there |
The issue seems to stem from the extension ".NET Interactive Notebooks" |
Definitely not ".NET Interactive Notebooks" for me as I don't have that extension installed. Similar to many other people here, I do have the C# extension installed. While I have yet to pinpoint the exact steps to reproduce, this problem definitely occurs when I'm working on C# console apps. |
If it's the C# extension this should be tracked in the Onnisharp repo. |
That's certainly interesting, as I don't have the C# extension installed, but only the Python, Jupyter, and ".NET Interactive Notebooks" extensions installed |
Perhaps both the extensions are doing a similar thing wrong? Or the issue really is from the dotnet sdk. |
Pretty sure is dotnet sdk |
Certainly possible, but...
...seems more likely. |
I am experiencing the same issue as @BD5WP mentioned. I don't have the Notebook extension installed, but yet high CPU usage. My guess is OmniSharp has a bug? I have dotnet version: 6.0.201. |
For everyone reporting here, please disable extensions in turn to figure out the problematic one by elimination. If it's the notebook extension please update to the fix mentioned above. If it's Omnisharp please open an issue in that repo. If it is neither please share here with what extension it is or that it repros with zero extensions somehow. |
I would like to say that for so long we haven't figure out this. I also have the issue not just from the interactive notebook, but also from console after I run dotnet build and dotnet run, there are always remained dotnet process which not terminated. |
Same here, But I'm using Visual Studio for Mac 2019. I have noticed that the issue is no longer so frequent. So it doesn't bother me anymore... Does anybody notice this? (That it's not so frequent anymore?) |
We run some of our |
same here, m1, MBP 2020 |
Same issue M1 Air. Removed all the Dotnet core stuff from my M1 Air (SDK and runtime) and installed the X64 version on it. It seems to work fine now. I don't know why, I am just happy it does, because it was unworkable. I used the following script to remove everything: https://github.com/dotnet/sdk/blob/main/scripts/obtain/uninstall/dotnet-uninstall-pkgs.sh I tried the ARM64 on its own but it seems to cause the same problem. |
Hard to believe. Switching to the X64 version solves the issue in my MBP with M1 Pro. I guess it is IO related. Except for dotnet run/build, using System.IO.File.Move also got stuck. |
Same issue here. But in my case one dotnet process freeze with 100% CPU every time I try to debug my code. Just after calling the second time my REST API of asp.net app the process freeze without any output. dump_dotnet_6.txt Also the same build with debug configuration started vom terminal runs without problems and the same builded binaries started as debug session with rider or visual studio for Mac freeze after second REST API call. |
maybe also related to this problem https://developercommunity.visualstudio.com/t/dotnet-process-freezes-and-goes-upto-99-of-cpu-uti/1591121 |
installing the x64 SDK version didn't fix my problem. |
Same Issue: What do I need to provide besides my high-cpu load to help debug this issue? I am on a Monteray 12.5.1 |
How can i remove all dotnet features on my mac? |
run on term:
This command will show you where all sdks of dotnet was installed on the machine. |
in my case, the problem was solved by closing Rider |
same issue on M2 pro with dotnet 7 |
FWIW, this issue went away for me after disabling the C# extension in VS Code. Which sucks, but I haven't seen the problem reappear since. I mostly use Rider now for real work. I still use VS Code for its search features, but I don't expect any advanced features like code completion. Given that others are still reporting the problem, I'm hesitant to turn it back on. But I'm reasonably certain the problem is OminiSharp, not the .NET SDK. |
Kinda crazy this is still happening.. Hopefully now that @davidfowl has a Mac maybe it'll get fixed :P |
same here. M1 PRO and .net 7. I'm not even using .net for anything at the moment, just have it installed |
On Mac M1, high CPU usage from rzls process when using VSCode to browse a Razor project. Seems to happen intermittently, the only fix right now is to quit VSCode and reopen. |
This issue still exists on .Net 8 Latest Preview. My machine is MacBook Pro M1 Max with Ventura 13.4 OS. This is a critical issue and must be fixed! |
Also seeing this issue running a web application project (entirely independent of VS Code or any addons) under .Net 7 from the command line, where on startup CPU for the process is pinned at 100% and it never runs correctly when running |
I switched to visual studio on windows and it’s night and day difference in
performance and quality of the editor
…On Sun, Aug 20, 2023 at 3:50 PM Nathaniel Dempkowski < ***@***.***> wrote:
Also seeing this issue running a web application project (entirely
independent of VS Code or any addons) under .Net 7 from the command line,
where on startup CPU for the process is pinned at 100% and it never runs
correctly when running dotnet run.
—
Reply to this email directly, view it on GitHub
<#23267 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABQKYN6ITUZCUQRJVTKSMGLXWJTCDANCNFSM5LKTPFUQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Description
I have just started coding with DotNet on my Mac as part of a CS degree course. I am experiencing a weird problem when running simple projects either in VS2022 (preview for Mac), Rider or VS Code. I first noticed that battery life was draining fast and checked the Activity Monitor - there were a number of DotNet processes all pegged at 100%. Basically if I run projects then these processes seem to run away and never quit even though a project is stopped in whatever IDE I am using - each time I must manually force quit the processes in Activity Monitor. It's getting to be really annoying now.
Configuration
I am running the latest release of DotNet 6.0 on MacOS 12.01 on a MacBook Pro Max M1 with 10 cores, 32 GPU cores, 32gb RAM and 1tb SSD. I am trying to work with simple Razor Pages apps.
The text was updated successfully, but these errors were encountered: