Skip to content

Getting "Loading profiler failed during CoCreateInstance" error building on Alpine #66000

@rakista112

Description

@rakista112

Description

We're getting a CoCreateInstance error when trying to load the profiler in my NetCore 3.0 app.

Reproduction Steps

  1. Build coreclr in docker with FROM mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.15-20211214164127-f0ea7ba as base image

  2. use the release from https://codeload.github.com/dotnet/coreclr/tar.gz/release/3.0

  3. add these statements in the docker file
    RUN cd /code/coreclr/src/pal/src/libunwind/src/mi/ && sed -i '28d' dyn-info-list.c
    RUN cd /code/coreclr && ./build.sh x64 release configureonly skipgenerateversion nopgooptimize skiptests
    RUN cd /code/coreclr/bin/obj/Linux.x64.Release/src/pal && make

  4. Set CORECLR_ENABLE_PROFILING, CORECLR_PROFILER and CORECLR_PROFILER_PATH environment variables

  5. build your profiler with that library.

  6. Run the net core 3.0 application

Expected behavior

The profiler should attach and create logs

Actual behavior

This error is printed when the application runs.
Loading profiler failed during CoCreateInstance. Profiler CLSID: '{************}'. HRESULT: 0x8007007e. Process ID (decimal): 161. Message ID: [0x2504]..NET Core SDK (3.1.416)

Regression?

No response

Known Workarounds

No response

Configuration

.net version: 3.1.416
Alpine
x86_64
I don't know

Other information

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions