1
votes

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)
1
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
so any suggestion for my problem? what I could try?Shawn

1 Answers

0
votes

As far as I know libsosplugin.so shipped with .NET Core SDKs 2.1.30x (.NET Core 2.1) requires lldb-3.8 or lldb-3.9, so I'd expect 4.0 version to throw all sorts of errors including segfault.

Not sure why you're having unicode issue, though. When I used lldb-3.9 for .NET Core it did print character codes for certain keys (up, Ctrl+), but the rest was fine and that was x64, not ARM. Maybe that's the separate issue caused by environment settings that can be googled separately.