-
Notifications
You must be signed in to change notification settings - Fork 3.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
[merp] missing data in crashing reporting json native frames #16689
Comments
allow_all_native_libraries
is enabled
+1 to what Kyle says here. The idea behind the feature is that we cannot know in advance what all native libraries that VS for Mac calls into, so every native module should be treated as "registered". As for the function name, we have to resolve those client side if possible for the Watson report. This is because just knowing the offset and module is not enough for us to symbolize the callstack in our backend. We would need to know the exact version of the module and have a copy of that module (or it's .dsym) to be able to resolve the offset into a symbol. This means that ideally these frames should look like this: { |
Changes: mono/mono@bfbf823...6d40f13 Context: mono/mono#15646 Context: mono/mono#16689 Context: mono/mono#16759 Context: mono/mono#16824 Context: mono/mono#16918 Context: mono/mono#16974 Improve exception filtering within the debugger.
Changes: mono/mono@bfbf823...6d40f13 Context: mono/mono#15646 Context: mono/mono#16689 Context: mono/mono#16759 Context: mono/mono#16824 Context: mono/mono#16918 Context: mono/mono#16974 Improve exception filtering within the debugger.
reopening based on Kyle's message |
@alexischr @lambdageek I'm confused... how does "partially resolving" work? From the comment in #16899, I understand that the fix there is partial, as in, not 100% complete. So where is the remaining work being tracked? |
Just gave this a test using the latest from master, still seeing some issues.
Mono version: (6.7.0) (master/4727b2475f8) |
reopening |
@alexischr Have to be careful with the auto keywords in PRs "partially fixes #nnnnn" still will auto-close the GH issue. I usually write something like "contributes to #nnnnn" which is not one of the magic keywords. @Aguilex it's tracked here. GH is just being clever. Sorry about that. |
@kdubau @Aguilex They both contain managed and unmanaged frames - the difference is in the mechanisms that Mono uses to populate those arrays:
In the end the right way to read this stuff is to look at both arrays and synthesize a complete picture. |
@lambdageek How feasible would it be to add a stack pointer to both managed/native sides? It's very difficult to 'stitch together' a complete view of the callstack when we don't know the order in which the frames weave together. |
@leculver Not currently possible for the "unmanaged" view - I'm hoping once we have some managed function names in the "unmanaged" view, it will help, but yea I realize we don't give you enough to do this mechanically. |
@leculver @kdubau Most of the "unregistered" frames ended up being managed frames, as should be evident with the changes in #17090 which should fill in those frames with the managed method information. The same patch now makes sure we see at least an address for the rest, and we expect most of these to be addresses in kernel memory (they occur often between the top of the stack and the SIGTERM signal handler that is used in MERP, for example, so at least one per runtime thread) |
Changes: mono/mono@bfbf823...6d40f13 Context: mono/mono#15646 Context: mono/mono#16689 Context: mono/mono#16759 Context: mono/mono#16824 Context: mono/mono#16918 Context: mono/mono#16974 Improve exception filtering within the debugger.
…17128) Backport of #16899 and #15622 * [merp] Add API method that whitelists all native libraries This is so that complex consumers such as Visual Studio for Mac can forego attempting to enumerate all loaded libraries, register them one at a time and potentially keep the list updated * Set out_module, to avoid getting no useful information in the printout It seems that without this, most/all entries in the unmanaged frames list are have no useful information. * Add stub of new function when crash reporting is disabled * Remove problematic assert from SIGILL handler mono_handle_native_crash() function can actually return if the native crash has triggered or has been trigerred by more than one signal. So it is possible to reach the point of the assert * Guard writing to out_module * Fix pointing to stack on string && some add tracing * [merp] Fix logic of 'is_managed' attribute * [merp] Output native library module name when 'whitelist all' mode is enabled (#16899) Contributes to #16689 * Bump MONO_CORLIB_VERSION
Yes, with the latest (#17090) things are good! We can open different issue if anything arises in the future. Thanks so much for this! |
Changes: mono/api-snapshot@fc50bc4...45a61d9 $ git diff --shortstat fc50bc4f...45a61d93 22 files changed, 775 insertions(+), 474 deletions(-) Changes: dotnet/cecil@a6c8f5e...a6a7f5c $ git diff --shortstat a6c8f5e1...a6a7f5c0 55 files changed, 818 insertions(+), 530 deletions(-) Changes: mono/corefx@1f87de3...49f1c45 $ git diff --shortstat e4f7102b...49f1c453 38 files changed, 1171 insertions(+), 419 deletions(-) Changes: dotnet/linker@ebe2a1f...e8d054b $ git diff --shortstat ebe2a1f4...e8d054bf 137 files changed, 5360 insertions(+), 1781 deletions(-) Changes: mono/mono@8946e49...18920a8 $ git diff --shortstat 8946e49a...18920a83 1811 files changed, 47240 insertions(+), 48331 deletions(-) Changes: xamarin/xamarin-android-api-compatibility@a61271e...50a3c52 $ git diff --shortstat a61271e0...50a3c52d 1 file changed, 2 insertions(+), 791 deletions(-) Fixes: #3619 Context: https://dev.azure.com/devdiv/DevDiv/_workitems/edit/1005448 Context: https://devdiv.visualstudio.com/DefaultCollection/DevDiv/_workitems/edit/967582 Context: https://github.com/dotnet/coreclr/issues/26370 Context: https://github.com/dotnet/coreclr/issues/26479 Context: https://github.com/dotnet/corefx/issues/40455 Context: https://github.com/dotnet/corefx/issues/40578 Context: mono/mono#7377 Context: mono/mono#12421 Context: mono/mono#12586 Context: mono/mono#14080 Context: mono/mono#14725 Context: mono/mono#14772 Context: mono/mono#15261 Context: mono/mono#15262 Context: mono/mono#15263 Context: mono/mono#15307 Context: mono/mono#15308 Context: mono/mono#15310 Context: mono/mono#15646 Context: mono/mono#15687 Context: mono/mono#15805 Context: mono/mono#15992 Context: mono/mono#15994 Context: mono/mono#15999 Context: mono/mono#16032 Context: mono/mono#16034 Context: mono/mono#16046 Context: mono/mono#16192 Context: mono/mono#16308 Context: mono/mono#16310 Context: mono/mono#16369 Context: mono/mono#16380 Context: mono/mono#16381 Context: mono/mono#16395 Context: mono/mono#16411 Context: mono/mono#16415 Context: mono/mono#16486 Context: mono/mono#16570 Context: mono/mono#16605 Context: mono/mono#16616 Context: mono/mono#16689 Context: mono/mono#16701 Context: mono/mono#16712 Context: mono/mono#16742 Context: mono/mono#16759 Context: mono/mono#16803 Context: mono/mono#16808 Context: mono/mono#16824 Context: mono/mono#16876 Context: mono/mono#16879 Context: mono/mono#16918 Context: mono/mono#16943 Context: mono/mono#16950 Context: mono/mono#16974 Context: mono/mono#17004 Context: mono/mono#17017 Context: mono/mono#17038 Context: mono/mono#17040 Context: mono/mono#17083 Context: mono/mono#17084 Context: mono/mono#17133 Context: mono/mono#17139 Context: mono/mono#17151 Context: mono/mono#17180 Context: mono/mono#17278 Context: mono/mono#17549 Context: mono/mono#17569 Context: mono/mono#17665 Context: mono/mono#17687 Context: mono/mono#17737 Context: mono/mono#17790 Context: mono/mono#17924 Context: mono/mono#17931 Context: https://github.com/mono/mono/issues/26758 Context: https://github.com/mono/mono/issues/37913 Context: xamarin/xamarin-macios#7005
Changes: mono/api-snapshot@fc50bc4...45a61d9 $ git diff --shortstat fc50bc4f...45a61d93 22 files changed, 775 insertions(+), 474 deletions(-) Changes: dotnet/cecil@a6c8f5e...a6a7f5c $ git diff --shortstat a6c8f5e1...a6a7f5c0 55 files changed, 818 insertions(+), 530 deletions(-) Changes: mono/corefx@1f87de3...49f1c45 $ git diff --shortstat e4f7102b...49f1c453 38 files changed, 1171 insertions(+), 419 deletions(-) Changes: dotnet/linker@ebe2a1f...e8d054b $ git diff --shortstat ebe2a1f4...e8d054bf 137 files changed, 5360 insertions(+), 1781 deletions(-) Changes: mono/mono@8946e49...18920a8 $ git diff --shortstat 8946e49a...18920a83 1811 files changed, 47240 insertions(+), 48331 deletions(-) Changes: xamarin/xamarin-android-api-compatibility@a61271e...50a3c52 $ git diff --shortstat a61271e0...50a3c52d 1 file changed, 2 insertions(+), 791 deletions(-) Fixes: #3619 Context: https://dev.azure.com/devdiv/DevDiv/_workitems/edit/1005448 Context: https://devdiv.visualstudio.com/DefaultCollection/DevDiv/_workitems/edit/967582 Context: https://github.com/dotnet/coreclr/issues/26370 Context: https://github.com/dotnet/coreclr/issues/26479 Context: https://github.com/dotnet/corefx/issues/40455 Context: https://github.com/dotnet/corefx/issues/40578 Context: mono/mono#7377 Context: mono/mono#12421 Context: mono/mono#12586 Context: mono/mono#14080 Context: mono/mono#14725 Context: mono/mono#14772 Context: mono/mono#15261 Context: mono/mono#15262 Context: mono/mono#15263 Context: mono/mono#15307 Context: mono/mono#15308 Context: mono/mono#15310 Context: mono/mono#15646 Context: mono/mono#15687 Context: mono/mono#15805 Context: mono/mono#15992 Context: mono/mono#15994 Context: mono/mono#15999 Context: mono/mono#16032 Context: mono/mono#16034 Context: mono/mono#16046 Context: mono/mono#16192 Context: mono/mono#16308 Context: mono/mono#16310 Context: mono/mono#16369 Context: mono/mono#16380 Context: mono/mono#16381 Context: mono/mono#16395 Context: mono/mono#16411 Context: mono/mono#16415 Context: mono/mono#16486 Context: mono/mono#16570 Context: mono/mono#16605 Context: mono/mono#16616 Context: mono/mono#16689 Context: mono/mono#16701 Context: mono/mono#16712 Context: mono/mono#16742 Context: mono/mono#16759 Context: mono/mono#16803 Context: mono/mono#16808 Context: mono/mono#16824 Context: mono/mono#16876 Context: mono/mono#16879 Context: mono/mono#16918 Context: mono/mono#16943 Context: mono/mono#16950 Context: mono/mono#16974 Context: mono/mono#17004 Context: mono/mono#17017 Context: mono/mono#17038 Context: mono/mono#17040 Context: mono/mono#17083 Context: mono/mono#17084 Context: mono/mono#17133 Context: mono/mono#17139 Context: mono/mono#17151 Context: mono/mono#17180 Context: mono/mono#17278 Context: mono/mono#17549 Context: mono/mono#17569 Context: mono/mono#17665 Context: mono/mono#17687 Context: mono/mono#17737 Context: mono/mono#17790 Context: mono/mono#17924 Context: mono/mono#17931 Context: https://github.com/mono/mono/issues/26758 Context: https://github.com/mono/mono/issues/37913 Context: xamarin/xamarin-macios#7005
…6897) Partially fixes mono/mono#16689 Commit migrated from mono/mono@bc43f32
… enabled (mono/mono#16899) Partially fixes mono/mono#16689 Commit migrated from mono/mono@4727b24
Hey, I noticed this PR landed on master #15622 and so had a look at the new json report (when allow all native libs is enabled) it produces. There are a couple issues we need addressed, detailed below.
I modified VSMac to enable
allow_all_native_libraries
.Steps to Reproduce
Current Behavior/Issues
Some of the unmanaged frames still appear in the stack as unregistered:
"is_managed" : "false", "native_address" : "unregistered"
All frames claim
<external module>
but we believe we should be seeing actual module names given the global whitelist.We expect a function name field (rather than only the offset)
It would be good to have the offset within function as well.
Full text of current MERP json payload
Expected Behavior
Expecting to see all the data we believe is missing, but of course if there are technical limitations or gaps we should discuss!
On which platforms did you notice this
[x] macOS
[ ] Linux
[ ] Windows
Version Used:
Stacktrace
VSMac IDE Log (Mono output)
The text was updated successfully, but these errors were encountered: