Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
sanikolov opened this issue Oct 1, 2020 · 2 comments
Open

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

sanikolov opened this issue Oct 1, 2020 · 2 comments

Comments

@sanikolov
Copy link

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?

@WilliamXieMSFT
Copy link
Member

Looks like we have the following around CProfilerManager::SetupRawProfiler()

And we haven't had the resources yet to officially support CLRIE for Linux as our ConfigurationLocator code hardcodes to ProductionBreakpoints:
https://github.com/microsoft/CLRInstrumentationEngine/blob/develop/src/InstrumentationEngine.Lib/ConfigurationLocator.cpp#L73

@sanikolov, Do you require Linux support? We can help prioritize work around this. What flavors of Linux are you looking to target? What sort of platforms do you want CLRIE to run on?

@sanikolov
Copy link
Author

I don't require Linux support.
I was merely testing compatibility with 3rd party APM.
For now "not supported" will be added to release notes.
As for linux platforms, when you get around to it try an older Debian distro, like 16.04. If you support that your code should work equally well for newer Debian/Ubuntu and even Fedora.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants