I'm using .NET CORE 2.1.1 on a ARM32 Linux Iot board (Raspberry Pi3B+).
I've collected a crash dump for my console app, by following the analyzing dump on linux, I'm trying to do a analysis via lldb
.
the post seems a bit old, the path of libsosplugin.so
now changed under to /opt/dotnet/shared/Microsoft.NETCore.App/2.1.1/
, meanwhile, I can't see anything from command ldd libsosplugin.so | grep lldb
, and this is my ldd libsosplugin.so
result:
linux-vdso.so.1 (0x7edcb000)
/usr/lib/arm-linux-gnueabihf/libarmmem.so (0x76ee4000)
libstdc++.so.6 => /usr/lib/arm-linux-gnueabihf/libstdc++.so.6 (0x76d87000)
libm.so.6 => /lib/arm-linux-gnueabihf/libm.so.6 (0x76d08000)
libgcc_s.so.1 => /lib/arm-linux-gnueabihf/libgcc_s.so.1 (0x76cdb000)
libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0x76b9c000)
/lib/ld-linux-armhf.so.3 (0x76f10000)
so I have no way to know what it the target lldb
, then I have to try from lldb-3.5
to lldb-4.0
via apt-get install lldb-x.x
one by one.
I've noticed, 3.5 - 3.9 have the issue to accept my key stroke! all key strokes were interpreted as a Uncode string, finally, lldb-4.0
can load the dump and plugin:
plugin load /opt/dotnet/shared/Microsoft.NETCore.App/2.1.1/libsosplugin.so
setclrpath /opt/dotnet/shared/Microsoft.NETCore.App/2.1.1
but once I key in sos PrintException
, lldb
crashed it self with Segmentation fault, everything listed below:
pi@raspberrypi:~/crash_dumps $ lldb-4.0 $(which dotnet) --core ./core.dotnet.1402.raspberrypi.1533274692
(lldb) target create "/usr/local/bin/dotnet" --core "./core.dotnet.1402.raspberrypi.1533274692"
Core file '/home/pi/crash_dumps/./core.dotnet.1402.raspberrypi.1533274692' (arm) was loaded.
(lldb) plugin load /opt/dotnet/shared/Microsoft.NETCore.App/2.1.1/libsosplugin.so
(lldb) setclrpath /opt/dotnet/shared/Microsoft.NETCore.App/2.1.1
(lldb) sos PrintException
(lldb)
Stack dump:
0. HandleCommand(command = "")
Segmentation fault (core dumped)
ldd | grep lldb
no longer works because it was considered a bug: github.com/dotnet/coreclr/issues/12098. I think the goal is that you should be able to load it with any lldb version. – omajid