Skip to content

Debugging singlefile deployment: Failed to find runtime module (libcoreclr.so), 0x80004005 #1764

@am11

Description

@am11

Steps to repro

$ dotnet new console -n app1; cd app1
$ cat > Program.cs <<EOF
using System;
class Program
{
    static void Main() => throw new Exception("foo");
}
EOF
$ dotnet publish -c Release -r linux-x64 --self-contained true -p:PublishSingleFile=true
$ lldb bin/Release/net5.0/linux-x64/publish/app1
(lldb) r
(lldb) clrstack

Expected

Shows the stack trace similar to the one without -p:PublishSingleFile=true, which looks like this:

OS Thread Id: 0x158c (1)
        Child SP               IP Call Site
00007FFFFFFFD4E0 00007ffff6cc0f47 [HelperMethodFrame: 00007fffffffd4e0] 
00007FFFFFFFD650 00007FFF7CF35CF9 Program.Main(System.String[])

Actual

Failed to find runtime module (libcoreclr.so), 0x80004005
Extension commands need it in order to have something to do.
For more information see https://go.microsoft.com/fwlink/?linkid=2135652
ClrStack  failed

Version

$ dotnet sos --version
5.0.152202+4d281c71a14e6226ab0bf0c98687db4a5c4217e3

$ dotnet --info
.NET SDK (reflecting any global.json):
 Version:   5.0.100
 Commit:    5044b93829

Runtime Environment:
 OS Name:     ubuntu
 OS Version:  18.04
 OS Platform: Linux
 RID:         ubuntu.18.04-x64
 Base Path:   /usr/share/dotnet/sdk/5.0.100/

.....

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions