-
If SOS or dotnet-dump analyze commands display "UNKNOWN" for types or functions names, your core dump may not have all the managed state. Dumps created with gdb or gcore have this problem. Linux system generated core dumps need the
coredump_filter
for the process to be set to at least 0x3f. See core for more information. -
If dump collection (
dotnet-dump collect
orcreatedump
) doesn't work in a docker container, try adding the SYS_TRACE capability with --cap-add=SYS_PTRACE or --privileged. -
If dump analysis (
dotnet-dump analyze
) on Microsoft .NET Core SDK Linux docker images fails with anUnhandled exception: System.DllNotFoundException: Unable to load shared library 'libdl.so' or one of its dependencies
exception. Try installing the "libc6-dev" package. -
During dump collection (
dotnet-dump collect
) a failure ending in a message likePermission denied /tmp/dotnet-diagnostic-19668-22628141-socket error
hints you don't have access to use such a socket. Verify the target process is owned by the user trying to create the dump, or trigger dump creation command withsudo
. If you usesudo
to collect the dump, make sure the dump file output path is accessible by the target process/user (via the --output option). The default dump path is the in the current directory and may not be the same user as the target process. -
If dump collection (
dotnet-dump collect
) fails withCore dump generation FAILED 0x80004005
look for error message output on the target process's console (not the console executing the dotnet-dump collect). This error may be caused by writing the core dump to a protected, inaccessible or non-existent location. To get more information about the core dump generation add the--diag
option the dotnet-dump collect command and look for the diagnostic logging on the target process's console. -
If you receive the following error message executing a SOS command under
lldb
ordotnet-dump analyze
, SOS cannot find the DAC module (libmscordaccore.so
orlibmscordaccore.dylib
) in the same directory as the runtime (libcoreclr.so or libcoreclr.dylib) module.(lldb) clrstack Failed to load data access module, 0x80131c64 Can not load or initialize libmscordaccore.so. The target runtime may not be initialized. ClrStack failed
First try enabling the symbol downloading with
setsymbolserver -ms
. This is already enabled fordotnet-dump analyze
and if SOS for lldb was installed withdotnet-sos install
.If that doesn't work, try using the
setclrpath <directory>
command with a directory that contains the matching version of the DAC module. This is useful for private runtimes or debug builds that haven't been published to our symbol servers. -
If you receive this error message executing a SOS command:
Failed to find runtime module (libcoreclr.so), 0x80004005 Extension commands need it in order to have something to do. ClrStack failed
The following could be the problem:
- The process or core dump hasn't loaded the .NET Core runtime yet.
- The coredump was loaded under lldb without specifying the host (i.e
dotnet
).target modules list
doesn't displaylibcoreclr.so
orlibcoreclr.dylib
. Start lldb with the host as the target program and the core file, for examplelldb --core coredump /usr/share/dotnet/dotnet
. In case you don't have the host available,dotnet symbol
is will be able to download them. - If a coredump was loaded under lldb, a host was specified, and
target modules list
displays the runtime module but you still get that message lldb needs the correct version of libcoreclr.so/dylib next to the coredump. You can usedotnet-symbol --modules <coredump>
to download the needed binaries.