33

I'm trying to open a .NET Core 2.0 dump on Ubuntu 16.04, following instructions from http://blogs.microsoft.co.il/sasha/2017/02/26/analyzing-a-net-core-core-dump-on-linux/

Dump is created from running process with createdump PID.

I can not determine correct version of lldb. ldd $(find /usr/share/dotnet -name libsosplugin.so) | grep lldb does not return anything (there is no lldb in the output).

I have tried latest, 3.5 and 3.6, to no avail: Can not load or initialize libmscordaccore.so. The target runtime may not be initialized.

How can I find a correct lldb version for .NET Core 2.0 dumps?


Update: commands with output

$ find /usr/share/dotnet -name libsosplugin.so /usr/share/dotnet/shared/Microsoft.NETCore.App/2.0.5/libsosplugin.so

$ ldd $(find /usr/share/dotnet -name libsosplugin.so) linux-vdso.so.1 => (0x00007ffca344f000) libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f3d7eecc000) libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f3d7ebc3000) libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f3d7e9ad000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f3d7e5e3000)

Pavel Tupitsyn
  • 8,393
  • 3
  • 22
  • 44
  • Check commands individually and post their outputs `find /usr/share/dotnet -name libsosplugin.so` and then `ldd $(find /usr/share/dotnet -name libsosplugin.so)` – Tarun Lalwani May 01 '18 at 16:26
  • @TarunLalwani added to the question – Pavel Tupitsyn May 02 '18 at 12:53
  • See if this https://github.com/dotnet/coreclr/issues/13937 or https://github.com/mikem8361/coreclr/blob/5c22cb85c7cc9173f2fb783bf24c0cbbb6096c89/Documentation/building/debugging-instructions.md helps – Tarun Lalwani May 02 '18 at 14:20
  • As stated, I have already tried all of that. Linked article uses lldb-3.6, which does not work for me. – Pavel Tupitsyn May 02 '18 at 15:13
  • 1
    Can you try customizing the dotnet docker image and install lldb inside and try and see if it helps? So basically the same environment where you actually took the dump – Tarun Lalwani May 02 '18 at 15:15

1 Answers1

0

Quite old question, but maybe this helps someone:

E.g. Dockerfile to include lldb and into asp dotnet 3.1

FROM mcr.microsoft.com/dotnet/core/aspnet:3.1

WORKDIR /vsdbg
RUN apt-get update \
    && apt-get install -y --no-install-recommends \
        unzip \
        procps \
        lldb-3.9 \
    && rm -rf /var/lib/apt/lists/* \
    && curl -sSL https://aka.ms/getvsdbgsh | bash /dev/stdin -v vs2019 -l /vsdbg
WORKDIR /app

Also at a look at this site: https://www.aaron-powell.com/posts/2019-04-04-debugging-dotnet-in-docker-with-vscode/

And add CAP_SYS_PTRACE at docker run if you want to attach to the running process inside container.

bruegth
  • 461
  • 5
  • 13