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

[runtime] Send telemetry blob to debugger when mono runtime crashes #10157

Closed
alexanderkyte opened this issue Aug 16, 2018 · 2 comments
Assignees
Labels

Comments

@alexanderkyte
Copy link
Member

@alexanderkyte alexanderkyte commented Aug 16, 2018

When a mono runtime is attached to a managed debugger and the debugged runtime is induced to cause a crash, the state of that crash is not communicated to the managed debugger. This, combined with the difficulty in having the debugged runtime both attached to the managed debugger and lldb, makes this type of crash difficult to interactively debug.

When the managed debugger is the only connection someone has with the runtime because it is embedded in a way that is resistant to unmanaged debugging (watchOS application on-device, for instance), this is an even more difficult problem.

By adding an SDB protocol event that sends a type of "runtime death" and a blob of opaque json (version dependent, no protocol guarantees), people can report these crashes without having to assist a mono runtime engineer in observing a crash on device.

In the case that spurious bugs in this manner are submitted, it will require less effort as well to spot stack frames that indicate misuse of mixed managed-unmanaged APIs (which offer the ability to drive a segfault or g_assert).

@DavidKarlas

This comment has been minimized.

Copy link
Member

@DavidKarlas DavidKarlas commented Aug 17, 2018

This would be very useful especially on iOS and Android, because developers report IDE debugger disconnected. While in reality app crashed, hence SDB disconnected... Would be nice to show native crash message with stacktraces and assert message(if possible) to user inside IDE in this cases, because accessing OS crash logs seems to be advanced thing.

@marek-safar marek-safar added this to Backlog in Short Term Projects via automation Sep 6, 2018
akoeplinger added a commit that referenced this issue Oct 19, 2018
This should help get information on native crashes that happen in hard-to-debug environments. 

To quote #10157 : 


When a mono runtime is attached to a managed debugger and the debugged runtime is induced to cause a crash, the state of that crash is not communicated to the managed debugger. This, combined with the difficulty in having the debugged runtime both attached to the managed debugger and lldb, makes this type of crash difficult to interactively debug.

When the managed debugger is the only connection someone has with the runtime because it is embedded in a way that is resistant to unmanaged debugging (watchOS application on-device, for instance), this is an even more difficult problem.

By adding an SDB protocol event that sends a type of "runtime death" and a blob of opaque json (version dependent, no protocol guarantees), people can report these crashes without having to assist a mono runtime engineer in observing a crash on device.

In the case that spurious bugs in this manner are submitted, it will require less effort as well to spot stack frames that indicate misuse of mixed managed-unmanaged APIs (which offer the ability to drive a segfault or g_assert
@alexanderkyte

This comment has been minimized.

Copy link
Member Author

@alexanderkyte alexanderkyte commented Jun 3, 2019

This has already been merged

Short Term Projects automation moved this from Backlog to Completed Tasks in this Sprint Jun 3, 2019
@marek-safar marek-safar moved this from Completed Tasks in this Sprint to Done in Short Term Projects Jun 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
3 participants
You can’t perform that action at this time.