Skip to content

[Linux] Segfault when AssemblyBuilder.DefineDynamicAssembly and PerfMap #13483

@klesta490

Description

@klesta490

Hi!
When I build app with final .NET Core v3.0.0 and run it with
COMPlus_PerfMapEnabled=1

static void Main(string[] args)
{
     AssemblyBuilder.DefineDynamicAssembly(new AssemblyName("Sth.dll"), AssemblyBuilderAccess.RunAndCollect);
}

I get instantly Segmentation fault.

It seems it is working fine on Preview9 (I was not testing any other versions).

It migh be related to Link

Fun fact,
with COMPlus_PerfMapEnabled=1
I get segfault for

dotnet new console
dotnet tool install -g dotnet-sos
That makes it real fun to diagnose.

Maybe this stack trace helps

frame #0: 0x00007f5a43d32caa libcoreclr.so`PerfInfo::LogImage(PEFile, char16_t) + 90
frame dotnet/coreclr#1: 0x00007f5a43d31e57 libcoreclr.so`PerfMap::LogImage(PEFile*) + 279
frame dotnet/coreclr#2: 0x00007f5a43e6c56a libcoreclr.so`Assembly::CreateDynamic(AppDomain, CreateDynamicAssemblyArgs) + 2538
frame dotnet/coreclr#3: 0x00007f5a43ec052a libcoreclr.so`AppDomainNative::CreateDynamicAssembly(AssemblyNameBaseObject, StackCrawlMark, int) + 234

Of course I can disable it, but this prevents me from profiling apps :-(

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions