-
Notifications
You must be signed in to change notification settings - Fork 358
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
Crash when debugging with lldb on MacOS #4769
Comments
Tagging subscribers to this area: @tommcdon |
Do you have the SOS plugin installed in your lldb? |
I don't. I can do that if it would help though. |
I was wondering if the issue might be related to the presence of the plugin or the lack thereof. |
I am having difficulties getting this plugin working on my machine. When I install following the instructions here: https://github.com/dotnet/diagnostics/blob/main/documentation/installing-sos-instructions.md it appears to break my lldb:
If I uninstall: |
This issue is tracked on dotnet/runtime#99977. |
@tommcdon The issue you linked appears to be sos plugin specific. Sorry for the delay it took me a bit to find @lambdageek 's workaround: #4551 (comment) to get lldb working with the plugin but I can still reproduce the crash with and without the plugin installed. |
Here's a full set of steps to reproduce:
|
@vvuk thanks for providing the repro steps. We have a few clarifying questions:
|
I can reproduce it without loading libsosplugin at all, using non-modified lldb. It seems like just attaching causes an issue.
It doesn't seem to (both with and without libsosplugin). But I've also heard that there are cases where it's not 100% reproducible like it seems to be with the steps above (though I suppose you can skip libsosplugin).
Without any breakpoints set, the debugger correctly stops in |
This might be already understood, but it seems like there is a bad interaction with the mach exception handler thread that CoreCLR creates and the mechanism by which lldb attaches to an existing process. If I build a debug runtime and set
Then I attach lldb at this point, and type
At other times I did this, I didn't get any of the assertion failures, but just got a stream of The |
Ah ha. If I set |
Thanks for the details @vvuk! It seems we should document the |
Description
When using a native lldb debugger attached to CoreCLR on MacOS (ARM64) breakpoints in certain locations can cause the process to crash.
Reproduction Steps
Sample code:
The idea of the sample is to trigger the native exception handling for a null reference exception. Which is where we have our breakpoint in lldb.
breakpoint set --name PAL_DispatchException
Expected behavior
No crash
Actual behavior
Silent crash.
Regression?
No response
Known Workarounds
No response
Configuration
.net version 8.0.201
MacOS -- 14.5
M1 ARM64
Does not happen on windows. I haven't tried linux yet.
Other information
If it helps the beginning few frames of what I suspect is an overflow looks like:
This is followed by 500 ish more frames of the same thing.
The text was updated successfully, but these errors were encountered: