microsoft / microsoft/CLRInstrumentationEngine

unable to load a profiler thru the raw profiler hook on linux

Open
#302 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
102
Forks
52
Avg merge
13h 11m
Merged PRs (30d)
6

Description

Consider this aspnet website

$ ps -eaf | grep dotnet
snikolov  6754    21  1 21:25 tty2     00:00:06 dotnet Some.Core.TestSite.dll

Now let's look at env variables

$ cat /proc/6754/environ | tr '\0' '\n' | grep -i microsoft
MicrosoftInstrumentationEngine_LogLevel=None
MicrosoftInstrumentationEngine_RawProfilerHookPath_64=/mnt/c/tmp/newrelic-netcore20-agent/libNewRelicProfiler.so
MicrosoftInstrumentationEngine_RawProfilerHook={36032161-FFC0-4B61-B559-F6C5D41BAE5A}
MicrosoftInstrumentationEngine_ConfigPath64_mainprofiler=/mnt/c/tmp/somesite/2.1/Release/MainProfiler_dotnet.config
MicrosoftInstrumentationEngine_DisableCodeSignatureValidation=1

The MainProfiler loads fine and does its job as expected, no issues there.
Does the New Relic Profiler exist? Sure it does

$ ls -l /mnt/c/tmp/newrelic-netcore20-agent/libNewRelicProfiler.so
-rwxrwxrwx 1 snikolov snikolov 13979573 Sep 17 13:21 /mnt/c/tmp/newrelic-netcore20-agent/libNewRelicProfiler.so

There is nothing weird in the NewRelic profiler 8.32 such as unsatisifed shared lib dependencies, as you can see for yourself with the ldd command.
Now let's find the NewRelic profiler

$ cat /proc/6754/smaps | grep -i relic

Not there, never got loaded.
No errors about it if I set LogLevel to Errors.
Seems like on linux the raw profiler hook is not supported?
I hope the explanation is a user error. Is this a known issue?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the ASP.NET process setup with MicrosoftInstrumentationEngine_RawProfilerHookPath_64 and the provided New Relic profiler, then inspect the Linux process environment, smaps output, and instrumentation-engine logs. Done means determining whether the raw profiler hook is supported on Linux and documenting or correcting the loading behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, linux
Domain
devtools, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.