dotnet / symstore

Implements API for retrieval of symbols and other debug artifacts from symbol store.
MIT License
143 stars 50 forks source link

Error downloading dotnet #438

Closed adrianoc closed 1 year ago

adrianoc commented 1 year ago

I am following the tutorial to troubleshoot dotnet issues on Linux.

When executing the step Download symbols for the dump file, dotnet-symbol returns the following error:

ERROR: Not Found: dotnet - 'https://msdl.microsoft.com/download/symbols/dotnet/elf-buildid-0ab6f9e6182576f7b5725c89211922e35ee182f7/dotnet'

Command line

dotnet-symbol /var/lib/apport/coredump/core._usr_lib_dotnet_dotnet.1000.fd3f1e87-2f24-4306-a0f4-c389cbd5867e.35320.608940 --host-only -o /tmp/symbols/

  1. I did verify /tmp/symbols/ and no files were written (in a similar issue there's a comment that this error is misleading, but it does not look to be the case).
  2. I've tried other output paths to no avail.

Software versions

dotnet-symbol : 1.0.415602

dotnet --info

.NET SDK: Version: 7.0.110 Commit: ba920f88ac

Runtime Environment: OS Name: ubuntu OS Version: 22.04 OS Platform: Linux RID: ubuntu.22.04-x64 Base Path: /usr/lib/dotnet/sdk/7.0.110/

Host: Version: 7.0.10 Architecture: x64 Commit: a6dbb800a4

.NET SDKs installed: 7.0.110 [/usr/lib/dotnet/sdk]

mikem8361 commented 1 year ago

Can you upload or send me the core dump? To generate the dump was the app run with the dotnet host? Or was the app published as a self-contained or single-file app?

adrianoc commented 1 year ago

Can you upload or send me the core dump?

sure. I've shared it with you (used the email from your github account) through dropbox

To generate the dump was the app run with the dotnet host? Or was the app published as a self-contained or single-file app?

I just dotnet run in the app folder

mikem8361 commented 1 year ago

I didn't have a DropBox for my Microsoft email, but I do have one now. I don't see the file. Maybe you need to upload it again. Thanks.

adrianoc commented 1 year ago

Just shared it again. If it does not work, can I send through email (it is 12 MB compressed) ?

mikem8361 commented 1 year ago

This looks like a source build runtime installed through some other mechanism and not an official .NET 7.10 runtime build

mikem8361 commented 1 year ago

Only official .NET SDK/runtimes are published to the symbol servers.

adrianoc commented 1 year ago

This looks like a source build runtime installed through some other mechanism and not an official .NET 7.10 runtime build

I've installed it either from the official ubuntu package repo (using apt) or following the instructions from here (I remember getting trouble to get it to work so I've tried many different approaches)

Only official .NET SDK/runtimes are published to the symbol servers.

are the packages distributes by linux distro considered official ?

mikem8361 commented 1 year ago

I need to investigate this some more. That link does look like it should install the official builds but the build ids of the 7.0.10 runtime binaries in your core dump don't match the ones from the main .NET web site here.

adrianoc commented 1 year ago

first of all tanks for looking into this.

I need to investigate this some more.

No hurry :).

That link does look like it should install the official builds but the build ids of the 7.0.10 runtime binaries in your core dump don't match the ones from the main .NET web site here.

AFAICT I did exactly that.. From the page you linked I've followed the link Package Manager Instructions (for Linux, under SDK 7.0.110) and that lead me to the page I've linked.

Comparing /usr/lib/dotnet/sdk/7.0.110/ (in theory the installed version on my system) with the X64 version from the link you sent above, results in a lot of differences.(meld /usr/lib/dotnet/sdk/7.0.110/ /tmp/DOTNET/dotnet-sdk-7.0.110-linux-x64/sdk/7.0.110/) (I am not 100% I am comparing the correct folders though)

image

Keep in mind that, as I commented above, it is possible that my installation is messed up (and, at least to me, it is not clear, how to do a clean install :( ).

mikem8361 commented 1 year ago

Try comparing /usr/lib/dotnet/shared/Microsoft.NETCore.App/7.0.10 with /tmp/DOTNET/dotnet-sdk-7.0.110-linux-x64/shared/Microsoft.NETCore.App/7.0.10. That is the actual runtime binaries.

mikem8361 commented 1 year ago

To uninstall the 7.0 SDK try sudo apt-get remove dotnet-sdk-7.0. Then sudo apt-get autoremove

adrianoc commented 1 year ago

Try comparing /usr/lib/dotnet/shared/Microsoft.NETCore.App/7.0.10 with /tmp/DOTNET/dotnet-sdk-7.0.110-linux-x64/shared/Microsoft.NETCore.App/7.0.10. That is the actual runtime binaries.

Thanks for pointing me to the correct folder.

Most files in these 2 folders are different (size, time stamp, etc) but in both, the contents of.version are equal :

a6dbb800a47735bde43187350fd3aff4071c7f9c
7.0.10

so I assume my installation can be considered official ?

To uninstall the 7.0 SDK try sudo apt-get remove dotnet-sdk-7.0. Then sudo apt-get autoremove

yeah.. as I commented out above I have tried a lot of different approaches to get it to work so I am a little reluctant to try reinstalling it and risking getting into issues again.

That said I am preparing a new work notebook so I may try reinstalling dotnet once I get that done (since I'll have a backup to work on if for any reasons I hit issues)

mikem8361 commented 1 year ago

As it turns out, by default the Ubuntu package feed is used to install .NET which Ubuntu builds itself ("source build"). The .NET source they use it exactly the same commit as Microsoft's official binaries but Ubuntu doesn't (and can't) publish their binaries and symbols to the Microsoft symbol server. So we end up with core dumps like yours that can't download dotnet, DAC, etc. For SOS under lldb and dotnet-dump analyze this isn't as bad if the dump is loaded on the machine as this .NET runtime (they will find and load the DAC). There are instructions here that show how to switch/override Ubuntu package feed.

You can double check this by running apt show dotnet-sdk-7.0 | grep -i APT-Sources which will display something like this for the Ubuntu feed:

APT-Sources: http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 Packages
adrianoc commented 1 year ago

Thanks for your responses/time...

The .NET source they use it exactly the same commit as Microsoft's official binaries but Ubuntu doesn't (and can't) publish their binaries and symbols to the Microsoft symbol server

I completely understand that.

Doesn't Ubuntu provide a symbol server or publish these symbols somewhere so I can download them (maybe I can pass --server-path to dotnet-symbol) ?

Regardless, if due to the mismatch from binaries/symbols the error I am observing is expected then feel free to close this issue. In that case I am going to wait a little bit for the official release of .NET 8.0 and will install that through MS package as you pointed out in a previous msg

mikem8361 commented 1 year ago

I don't know of any Ubuntu symbol server. They might have some symbol packages that can be downloaded.