question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to use ReadyToRun on Debian 8 due to incorrect runtime bits resolution by SDK

See original GitHub issue

Original bug: https://github.com/dotnet/coreclr/issues/24565

Repro app is here: https://github.com/wieslawsoltes/Draw2D. To repro:

  1. clone
  2. Edit Draw2D.csproj and add netcoreapp3.0 to the list of target frameworks
  3. run this command:
dotnet publish ./src/Draw2D/Draw2D.csproj -f netcoreapp3.0 -c Release -r debian.8-x64 -o Draw2D_netcoreapp3.0_debian.8-x64

Running the application throws a Failed to initialize CoreCLR,, HRESULT: 0x80131500 error.

Looking at the msbuild verbose logs, you can see that the SDK is copying the runtime bits from the runtime.debian.8-x64.microsoft.netcore.runtime.coreclr/1.0.7/runtimes/debian.8-x64 package, which is incorrect.

On Debian9 targets, the runtime bits are copied correctly (version 3). On Debian8, the SDK doesn’t resolve correctly. Here’s an example error I got:

/home/fadi/dotnet_preview5/sdk/3.0.100-preview5-011569/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.ConflictResolution.targets(39,5): message NETSDK1041: Encountered conflict between 'CopyLocal:/home/fadi/.nuget/packages/runtime.debian.8-x64.microsoft.netcore.runtime.coreclr/1.0.7/runtimes/debian.8-x64/native/libcoreclr.so' and 'CopyLocal:/home/fadi/.nuget/packages/runtime.linux-x64.microsoft.netcore.app/3.0.0-preview5-27709-08/runtimes/linux-x64/native/libcoreclr.so'.  NETSDK1037: Could not determine winner due to equal file and assembly versions. [/home/fadi/git/Draw2D/src/Draw2D/Draw2D.csproj]

Also, it ends up copying the runtime bits from the 1.0.7 runtime package. Example:

Copying file from "/home/fadi/.nuget/packages/runtime.debian.8-x64.microsoft.netcore.runtime.coreclr/1.0.7/runtimes/debian.8-x64/native/libcoreclr.so" to "/home/fadi/git/Draw2D/src/Draw2D/bin/Release/netcoreapp3.0/debian.8-x64/libcoreclr.so".

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:14 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
dsplaistedcommented, Jun 27, 2019

Just curious, did you guys try to repro this and couldn’t, and that why you need the binlog?

Yes, I tried to repro this and wasn’t able to.

0reactions
fadimounircommented, Jun 27, 2019

Filed #3364

Read more comments on GitHub >

github_iconTop Results From Across the Web

When running published executable with ...
On Debian9 targets, the runtime bits are copied correctly. On Debian8, the SDK doesn't resolve correctly. Here's an example error I got:.
Read more >
ReadyToRun deployment overview - .NET
R2R binaries improve startup performance by reducing the amount of work the just-in-time (JIT) compiler needs to do as your application loads.
Read more >
Install the .NET SDK or the .NET Runtime on Debian
Demonstrates the various ways to install .NET SDK and .NET Runtime on Debian.
Read more >
Building .NET Core AWS Lambda with ReadyToRun on ...
I decided to start from the two biggest problems: a big deployment package and a huge cold start. The Lambda function has been...
Read more >
Common Problems | TeamCity On-Premises Documentation
Build works locally but fails or misbehaves in TeamCity ... the agent is under Connected — the agent is ready to run builds....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found