-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Debugger crash on macOS (Rosetta 2 on M1) #44958
Comments
Having the same problem. try run without debug |
Tagging subscribers to this area: @tommcdon Issue DetailsI'm not sure this is where I need to put this or if you guys are even entertaining bugs for the M1 yet, but here goes... Repro stepsDebugging the default console "hello world" project in VSCode results in an apparent crash of the debugger:
Debug Console output:
Running the dll from the command line in a terminal window is successful:
Crash is reproducible, happens every time. Thanks.
|
Thank you for reporting the issue! |
Is there any chance it would be fixed earlier pls? |
I wonder if the Stack overflow could somehow be caused by the stack probing issues we've recently discovered and caused by the fact that the Apple Silicon uses 16kB memory pages unlike other systems where the memory page size is 4kB. |
@petrkoutnycz We would target fixing this for .NET 5.0 with Rosetta 2. @janvorli I'll take a look to see if this issue is fixed with the stack probing fix |
I can confirm I can repro the issue locally on M1 device. I am looking into it. |
That sounds great / Těsím se 👍 |
I have found the culprit - it was a Rosetta 2 bug. I have reported it to Apple and it was found that it is actually fixed in 11.1 beta release. I have installed that beta and verified that debugging now starts correctly. But I've found another issue behind that. When you set a breakpoint, it gets hit correctly, the debugger breaks in just fine. However, when you single step, the runtime crashes with access violation. I am currently looking into this secondary issue. |
I've found the culprit for the secondary issue. This one is a Rosetta 2 issue too. I have reported it to Apple. |
Issue dotnet#4277 This commit removes the bit of code that was preventing the .net debugger from starting on Apple Silicon. I've added a warning message that indicates that you might see unexpected issues when running this way. This should start working once macOS 11.1 is released next week. (See dotnet/runtime#44958 for more details)
Issue dotnet#4277 This commit removes the bit of code that was preventing the .net debugger from starting on Apple Silicon. I've added a warning message that indicates that you might see unexpected issues when running this way. This should start working once macOS 11.1 is released next week. (See dotnet/runtime#44958 for more details)
* Allowing arm64 macOS to debug dotnet projects Issue #4277 This commit removes the bit of code that was preventing the .net debugger from starting on Apple Silicon. I've added a warning message that indicates that you might see unexpected issues when running this way. This should start working once macOS 11.1 is released next week. (See dotnet/runtime#44958 for more details) * Adding `arm64` to debug architectures
Things seem to have regressed after an update to Big Sur Beta 11.2:
Before this update, I was able to generate and run dotnet apps successfully. |
I've hit the same issue yesterday while testing the 11.2 beta and reported it to Apple. Btw, it seems this is an intermittent issue that doesn't occur always. |
I have official 11.1 installed and I do have this crash about one time out of two tries. |
Installed 11.2 and the issue is resolved for me. I can debug in Jetbrains Rider, I can't say the same for VS Code because I haven't tried it, but I assume since it was labeled as Rosetta 2 issue one can debug in VS Code too. |
I was able to debug in both Rider and VS Code after install of 11.2. |
Can also confirm that debugging in VS for Mac works fine after upgrading to 11.2 (as expected). |
Same for me, I was able to debug using Visual Studio for Mac without issue after updating to 11.2 🥳 |
Hi, I am facing the same issue. Please tell me how to resolve it. Thanks & Regards, |
@DeeJay24 If you have an M1, update your OS. Otherwise, whatever you are running into is different. |
Yep, just scroll up. The answer is in the 3 comments right above yours. 👆 😁 |
Closing this issue as macOS version 11.2 seems to resolve the bug |
I'm not sure this is where I need to put this or if you guys are even entertaining bugs for the M1 yet, but here goes...
Repro steps
Debugging the default console "hello world" project in VSCode results in an apparent crash of the debugger:
Debug Console output:
Running the dll from the command line in a terminal window is successful:
Crash is reproducible, happens every time.
Thanks.
The text was updated successfully, but these errors were encountered: