Closed tmds closed 5 years ago
I think this is probably something in the dump that it can’t handle. Can you send me the core dump?
FYI, dotnet-dump should not be loading Microsoft.DiaSymReader.Native.amd64.dll on Linux. It is Windows only for Windows PDBs.
Can you send me the core dump?
This is how I create the coredump:
static void Main(string[] args)
{
throw new Exception("Throwing exception to abort");
}
executed with dotnet 3.0.100-preview6-012264 on Fedora 30. Then get the coredump file:
$ coredumpctl dump -1 -o /tmp/dump
@mikem8361 are you able to reproduce the issue?
Yes, I can repro the exception with your dump. I haven't had a chance to really debug it yet.
It seems to throw when we get the BuildId from the ElfFile.
Unhandled Exception: System.IO.IOException: I/O error occurred.
at Microsoft.Diagnostics.Runtime.Linux.Reader.Read[T](Int64 position)
at Microsoft.Diagnostics.Runtime.Linux.ElfFile.LoadNotes()
at Microsoft.Diagnostics.Runtime.Linux.ElfFile.get_BuildId(
Taking some bits from clrmd master, and trying to repro as follows:
var stream = File.Open("/tmp/dump", FileMode.Open, FileAccess.Read, FileShare.Read);
var reader = new Reader(new StreamAddressSpace(stream));
var elfFile = new ElfFile(reader);
System.Console.WriteLine(elfFile.BuildId);
This is not throwing, elfFile.BuildId returns null.
Looking into clrmd changes, maybe this is fixed by https://github.com/microsoft/clrmd/commit/be718af9496e65b9e610f99409657de796281a18.
Is there some daily build I could use to see if the issue is fixed?
Yes, I have this fixed. I need to get into the clrmd repo (Microsoft.Diagnostics.Runtime) that dotnet-dump depends on in the diagnostics repo. It will be fixed by the Preview 7 release of the diagnostics tools.
The above clrmd change isn't enough. Some modules don't have a build id and so the IOException needs to be catch.
Fixed with this PR. It updated the version of Microsoft.Diagnostics.Runtime with the fix.
@mikem8361 is there a daily nuget feed I can use to try this?
This is a preview 7 (not the final one) build: 3.0.0-preview7.19359.1
$ dotnet tool install -g dotnet-dump --version 3.0.0-preview7.19359.1 --add-source https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json
I've installed latest versions of dotnet-dump and .NET Core 3.0 on Fedora 30.
I'm trying to analyze a coredump:
Things go wrong:
I had a look at the files
dotnet dump
is trying to use. It is looking for aMicrosoft.DiaSymReader.Native.amd64.dll
but is not able to find it.In the linux-x64 sdk, there are such files at:
the Windows sdk has an additional one:
I tried copying the windows sdk dll to the linux sdk, but I still get the same stacktrace.