Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

Symbolicating crash reports

$
0
0

I think this has more to do with Mono, but I'll still ask. How does Mono/Xamarin symbolicate its crash reports?

With PLCrashReporter I get something like this:

Incident Identifier: AD86F93B-4DC2-464E-861B-401AD0B2B2A6
CrashReporter Key:   TODO
Hardware Model:      MacBookPro13,3
Process:         RemoteDesktopMan [20934]
Path:            /Users/Devolutions33/workspace/RDMOXv3/Mac/RemoteDesktopManager/Clients/RemoteDesktopManager/bin/Debug/RemoteDesktopManager.app/Contents/MacOS/RemoteDesktopManager
Identifier:      com.devolutions.remotedesktopmanager
Version:         5.1.0.0
Code Type:       X86-64
Parent Process:  launchd [1]

Date/Time:       2018-03-02 16:34:29 +0000
OS Version:      Mac OS X 10.13.4 (17E139j)
Report Version:  104

Exception Type:  SIGSEGV
Exception Codes: SEGV_NOOP at 0x114314d40
Crashed Thread:  0

Thread 0 Crashed:
0   libsystem_kernel.dylib              0x00007fff7870cafe 0x7fff786f0000 + 117502
1   libsystem_c.dylib                   0x00007fff7861a6fe 0x7fff7860b000 + 63230
2   ???                                 0x00000001333436c4 0x0 + 0
3   RemoteDesktopManager                0x000000010dad0548 0x10d9a3000 + 1234248
4   RemoteDesktopManager                0x000000010db9b2c8 0x10d9a3000 + 2065096
5   RemoteDesktopManager                0x000000010db9b240 0x10d9a3000 + 2064960
6   RemoteDesktopManager                0x000000010d9d6fcc 0x10d9a3000 + 212940
7   RemoteDesktopManager                0x000000010d9d7e3d 0x10d9a3000 + 216637
8   RemoteDesktopManager                0x000000010d9d92d1 0x10d9a3000 + 221905
9   AppKit                              0x00007fff4ddde516 0x7fff4d604000 + 8234262
10  AppKit                              0x00007fff4d884083 0x7fff4d604000 + 2621571
11  AppKit                              0x00007fff4d883fab 0x7fff4d604000 + 2621355
12  AppKit                              0x00007fff4d883eb1 0x7fff4d604000 + 2621105
13  AppKit                              0x00007fff4d8c5168 0x7fff4d604000 + 2888040
14  AppKit                              0x00007fff4d88271a 0x7fff4d604000 + 2615066
15  AppKit                              0x00007fff4d8c4eaf 0x7fff4d604000 + 2887343
16  AppKit                              0x00007fff4d8811b4 0x7fff4d604000 + 2609588
17  AppKit                              0x00007fff4df7d715 0x7fff4d604000 + 9934613
18  AppKit                              0x00007fff4df7a36c 0x7fff4d604000 + 9921388
19  AppKit                              0x00007fff4df79618 0x7fff4d604000 + 9917976
20  AppKit                              0x00007fff4ddda3d3 0x7fff4d604000 + 8217555
21  AppKit                              0x00007fff4d63b4ed 0x7fff4d604000 + 226541
22  AppKit                              0x00007fff4d60a66a 0x7fff4d604000 + 26218
23  ???                                 0x0000000120d24368 0x0 + 0
24  ???                                 0x0000000120471a93 0x0 + 0
25  ???                                 0x000000010f722dc9 0x0 + 0
26  RemoteDesktopManager                0x000000010dad0548 0x10d9a3000 + 1234248
27  RemoteDesktopManager                0x000000010db9b2c8 0x10d9a3000 + 2065096
28  RemoteDesktopManager                0x000000010db9e909 0x10d9a3000 + 2078985
29  RemoteDesktopManager                0x000000010da3616f 0x10d9a3000 + 602479
30  RemoteDesktopManager                0x000000010da389fb 0x10d9a3000 + 612859
31  RemoteDesktopManager                0x000000010d9d9cae 0x10d9a3000 + 224430
32  RemoteDesktopManager                0x000000010d9dac04 0x10d9a3000 + 228356
33  libdyld.dylib                       0x00007fff785bc015 0x7fff785bb000 + 4117

If I disable the crash reporter and let Xamarin handle the crash, I'll get something like this as an output in the console:

Stacktrace:

[...]

Native stacktrace:

    0   RemoteDesktopManager                0x0000000106c51261 mono_handle_native_crash + 257
    1   RemoteDesktopManager                0x0000000106bd0f16 altstack_handle_and_restore + 70
    2   libsystem_kernel.dylib              0x00007fff7870cafe __pthread_kill + 10
    3   libsystem_c.dylib                   0x00007fff7861a6fe raise + 26
    4   ???                                 0x0000000125d73864 0x0 + 4929828964
    5   RemoteDesktopManager                0x0000000106c62548 mono_jit_runtime_invoke + 1288
    6   RemoteDesktopManager                0x0000000106d2d2c8 do_runtime_invoke + 88
    7   RemoteDesktopManager                0x0000000106d2d240 mono_runtime_invoke + 208
    8   RemoteDesktopManager                0x0000000106b68fcc xamarin_invoke_trampoline + 5996
    9   RemoteDesktopManager                0x0000000106b69e3d xamarin_arch_trampoline + 189
    10  RemoteDesktopManager                0x0000000106b6b2d1 xamarin_x86_64_common_trampoline + 110
    11  AppKit                              0x00007fff4ddde516 -[NSApplication(NSResponder) sendAction:to:from:] + 312
    12  AppKit                              0x00007fff4d884083 -[NSControl sendAction:to:] + 86
    13  AppKit                              0x00007fff4d883fab __26-[NSCell _sendActionFrom:]_block_invoke + 136
    14  AppKit                              0x00007fff4d883eb1 -[NSCell _sendActionFrom:] + 183
    15  AppKit                              0x00007fff4d8c5168 -[NSButtonCell _sendActionFrom:] + 97
    16  AppKit                              0x00007fff4d88271a -[NSCell trackMouse:inRect:ofView:untilMouseUp:] + 2438
    17  AppKit                              0x00007fff4d8c4eaf -[NSButtonCell trackMouse:inRect:ofView:untilMouseUp:] + 777
    18  AppKit                              0x00007fff4d8811b4 -[NSControl mouseDown:] + 965
    19  AppKit                              0x00007fff4df7d715 -[NSWindow(NSEventRouting) _handleMouseDownEvent:isDelayedEvent:] + 5891
    20  AppKit                              0x00007fff4df7a36c -[NSWindow(NSEventRouting) _reallySendEvent:isDelayedEvent:] + 2359
    21  AppKit                              0x00007fff4df79618 -[NSWindow(NSEventRouting) sendEvent:] + 497
    22  AppKit                              0x00007fff4ddda3d3 -[NSApplication(NSEvent) sendEvent:] + 307
    23  AppKit                              0x00007fff4d63b4ed -[NSApplication run] + 812
    24  AppKit                              0x00007fff4d60a66a NSApplicationMain + 804
    25  ???                                 0x0000000119ea4368 0x0 + 4729750376
    26  ???                                 0x00000001195fea93 0x0 + 4720683667
    27  ???                                 0x0000000108a14dc9 0x0 + 4439756233
    28  RemoteDesktopManager                0x0000000106c62548 mono_jit_runtime_invoke + 1288
    29  RemoteDesktopManager                0x0000000106d2d2c8 do_runtime_invoke + 88
    30  RemoteDesktopManager                0x0000000106d30909 do_exec_main_checked + 137
    31  RemoteDesktopManager                0x0000000106bc816f mono_jit_exec + 287
    32  RemoteDesktopManager                0x0000000106bca9fb mono_main + 9307
    33  RemoteDesktopManager                0x0000000106b6bcae xamarin_main + 1182
    34  RemoteDesktopManager                0x0000000106b6cc04 main + 36
    35  libdyld.dylib                       0x00007fff785bc015 start + 1

Debug info from gdb:

(lldb) command source -s 0 '/tmp/mono-gdb-commands.JSddT3'
Executing commands in '/tmp/mono-gdb-commands.JSddT3'.
(lldb) process attach --pid 21034
Process 21034 stopped
* thread #1, name = 'tid_307', queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
    frame #0: 0x00007fff7870d1c2 libsystem_kernel.dylib`__wait4 + 10
libsystem_kernel.dylib`__wait4:
->  0x7fff7870d1c2 <+10>: jae    0x7fff7870d1cc            ; <+20>
    0x7fff7870d1c4 <+12>: movq   %rax, %rdi
    0x7fff7870d1c7 <+15>: jmp    0x7fff787039a5            ; cerror
    0x7fff7870d1cc <+20>: retq   
Target 0: (RemoteDesktopManager) stopped.

[...]

* thread #1, name = 'tid_307', queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
  * frame #0: 0x00007fff7870d1c2 libsystem_kernel.dylib`__wait4 + 10
    frame #1: 0x0000000106c512ee RemoteDesktopManager`mono_handle_native_crash(signal="SIGSEGV", ctx=<unavailable>, info=<unavailable>) at mini-exceptions.c:2720 [opt]
    frame #2: 0x0000000106bd0f16 RemoteDesktopManager`altstack_handle_and_restore(ctx=0x00007ffee90c7dc0, obj=0x0000000000000000, stack_ovf=0) at exceptions-amd64.c:799 [opt]
    frame #3: 0x00007fff7870cafe libsystem_kernel.dylib`__pthread_kill + 10
    frame #4: 0x00007fff7861a6fe libsystem_c.dylib`raise + 26
    frame #5: 0x0000000125d73864
    frame #6: 0x0000000106c62548 RemoteDesktopManager`mono_jit_runtime_invoke(method=0x0000000000000307, obj=<unavailable>, params=0x00007ffee90c85f0, exc=0x0000000000000000, error=<unavailable>) at mini-runtime.c:2791 [opt]
    frame #7: 0x0000000106d2d2c8 RemoteDesktopManager`do_runtime_invoke(method=0x00007fef865f2218, obj=0x0000000124949f30, params=0x00007ffee90c85f0, exc=0x0000000000000000, error=0x00007ffee90c8558) at object.c:2862 [opt]
    frame #8: 0x0000000106d2d240 RemoteDesktopManager`mono_runtime_invoke [inlined] mono_runtime_invoke_checked(method=<unavailable>, obj=0x0000000124949f30, params=0x00007ffee90c85f0, error=0x0000000000000000) at object.c:3016 [opt]
    frame #9: 0x0000000106d2d1ff RemoteDesktopManager`mono_runtime_invoke(method=0x00007fef865f2218, obj=0x0000000124949f30, params=0x00007ffee90c85f0, exc=<unavailable>) at object.c:2917 [opt]
    frame #10: 0x0000000106b68fcc RemoteDesktopManager`::xamarin_invoke_trampoline(type=Tramp_Default, self=0x0000600000c99e60, sel="Abort:", iterator=(RemoteDesktopManager`param_iter_next(IteratorAction, void*, char const*, unsigned long, void*, unsigned int*) at trampolines-x86_64.m:236), marshal_return_value=(RemoteDesktopManager`marshal_return_value(void*, char const*, unsigned long, void*, _MonoType*, bool, _MonoMethod*, MethodDescription*, unsigned int*) at trampolines-x86_64.m:307), context=0x00007ffee90c8b18) at trampolines-invoke.m:456
    frame #11: 0x0000000106b69e3d RemoteDesktopManager`::xamarin_arch_trampoline(state=0x00007ffee90c8b60) at trampolines-x86_64.m:545
    frame #12: 0x0000000106b6b2d1 RemoteDesktopManager`xamarin_x86_64_common_trampoline + 110
    frame #13: 0x00007fff4ddde516 AppKit`-[NSApplication(NSResponder) sendAction:to:from:] + 312
    frame #14: 0x00007fff4d884083 AppKit`-[NSControl sendAction:to:] + 86
    frame #15: 0x00007fff4d883fab AppKit`__26-[NSCell _sendActionFrom:]_block_invoke + 136
    frame #16: 0x00007fff4d883eb1 AppKit`-[NSCell _sendActionFrom:] + 183
    frame #17: 0x00007fff4d8c5168 AppKit`-[NSButtonCell _sendActionFrom:] + 97
    frame #18: 0x00007fff4d88271a AppKit`-[NSCell trackMouse:inRect:ofView:untilMouseUp:] + 2438
    frame #19: 0x00007fff4d8c4eaf AppKit`-[NSButtonCell trackMouse:inRect:ofView:untilMouseUp:] + 777
    frame #20: 0x00007fff4d8811b4 AppKit`-[NSControl mouseDown:] + 965
    frame #21: 0x00007fff4df7d715 AppKit`-[NSWindow(NSEventRouting) _handleMouseDownEvent:isDelayedEvent:] + 5891
    frame #22: 0x00007fff4df7a36c AppKit`-[NSWindow(NSEventRouting) _reallySendEvent:isDelayedEvent:] + 2359
    frame #23: 0x00007fff4df79618 AppKit`-[NSWindow(NSEventRouting) sendEvent:] + 497
    frame #24: 0x00007fff4ddda3d3 AppKit`-[NSApplication(NSEvent) sendEvent:] + 307
    frame #25: 0x00007fff4d63b4ed AppKit`-[NSApplication run] + 812
    frame #26: 0x00007fff4d60a66a AppKit`NSApplicationMain + 804
    frame #27: 0x0000000119ea4368
    frame #28: 0x00000001195fea93
    frame #29: 0x0000000108a14dc9
    frame #30: 0x0000000106c62548 RemoteDesktopManager`mono_jit_runtime_invoke(method=0x0000000000000000, obj=<unavailable>, params=0x00007ffee90ca1b8, exc=0x0000000000000000, error=<unavailable>) at mini-runtime.c:2791 [opt]
    frame #31: 0x0000000106d2d2c8 RemoteDesktopManager`do_runtime_invoke(method=0x00007fef87a017d8, obj=0x0000000000000000, params=0x00007ffee90ca1b8, exc=0x0000000000000000, error=0x00007ffee90ca1f8) at object.c:2862 [opt]
    frame #32: 0x0000000106d30909 RemoteDesktopManager`do_exec_main_checked [inlined] mono_runtime_invoke_checked(method=<unavailable>, obj=<unavailable>, error=<unavailable>) at object.c:3016 [opt]
    frame #33: 0x0000000106d308c8 RemoteDesktopManager`do_exec_main_checked(method=0x00007fef87a017d8, args=<unavailable>, error=0x00007ffee90ca1f8) at object.c:4690 [opt]
    frame #34: 0x0000000106bc816f RemoteDesktopManager`mono_jit_exec(domain=<unavailable>, assembly=<unavailable>, argc=2, argv=0x0000608000053cc8) at driver.g.c:1036 [opt]
    frame #35: 0x0000000106bca9fb RemoteDesktopManager`mono_main [inlined] main_thread_handler at driver.g.c:1105 [opt]
    frame #36: 0x0000000106bca9c5 RemoteDesktopManager`mono_main(argc=<unavailable>, argv=<unavailable>) at driver.g.c:2226 [opt]
    frame #37: 0x0000000106b6bcae RemoteDesktopManager`::xamarin_main(argc=2, argv=0x00007ffee90ca518, launch_mode=XamarinLaunchModeApp) at launcher.m:662
    frame #38: 0x0000000106b6cc04 RemoteDesktopManager`main(argc=2, argv=0x00007ffee90ca518) at launcher.m:680
    frame #39: 0x00007fff785bc015 libdyld.dylib`start + 1
    frame #40: 0x00007fff785bc015 libdyld.dylib`start + 1

[...]

While there is a method to symbolicate the symbols at runtime in PLCrashReporter, their documentation seems to deter us from using it.

Is there any better way to do it with Xamarin?


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>