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

[Profiler] Error relocating /opt/datadog/continuousprofiler/Datadog.Linux.ApiWrapper.x64.so #3218

Open
seanamos opened this issue Sep 15, 2022 · 6 comments

Comments

@seanamos
Copy link

seanamos commented Sep 15, 2022

On a M1 Pro Macbook in docker with mcr.microsoft.com/dotnet/aspnet:6.0.9-alpine3.16 as a base image.

If LD_PRELOAD=/opt/datadog/continuousprofiler/Datadog.Linux.ApiWrapper.x64.so is set, attempting to do anything with the container results in:

Error relocating /opt/datadog/continuousprofiler/Datadog.Linux.ApiWrapper.x64.so: unsupported relocation type 7
Error relocating /opt/datadog/continuousprofiler/Datadog.Linux.ApiWrapper.x64.so: unsupported relocation type 7
Error relocating /opt/datadog/continuousprofiler/Datadog.Linux.ApiWrapper.x64.so: unsupported relocation type 7
Error relocating /opt/datadog/continuousprofiler/Datadog.Linux.ApiWrapper.x64.so: unsupported relocation type 7
Error relocating /opt/datadog/continuousprofiler/Datadog.Linux.ApiWrapper.x64.so: unsupported relocation type 8
Error relocating /opt/datadog/continuousprofiler/Datadog.Linux.ApiWrapper.x64.so: unsupported relocation type 6
Error relocating /opt/datadog/continuousprofiler/Datadog.Linux.ApiWrapper.x64.so: unsupported relocation type 6
Error relocating /opt/datadog/continuousprofiler/Datadog.Linux.ApiWrapper.x64.so: unsupported relocation type 6
Error relocating /opt/datadog/continuousprofiler/Datadog.Linux.ApiWrapper.x64.so: unsupported relocation type 6
Error relocating /opt/datadog/continuousprofiler/Datadog.Linux.ApiWrapper.x64.so: unsupported relocation type 6

Runtime environment:

  • Tracer version: 2.14.0 (musl)
  • OS: Host MacOS 12.5.1 / Container alpine3.16 arm64
  • Docker engine: 20.10.17

Workaround is to conditionally set LD_PRELOAD.

@gleocadie
Copy link
Collaborator

gleocadie commented Sep 20, 2022

Hello @seanamos

Thanks for reporting it.

What artifact did you download ? the ARM64 one or the other ?

According to the error, you might be using the non-ARM64 artifact on ARM64.

For your information, the profiler is deactivated today on ARM64. The stack collection is not ready yet.

@seanamos
Copy link
Author

seanamos commented Sep 20, 2022

I used the musl artifact as its an alpine container:
https://github.com/DataDog/dd-trace-dotnet/releases/download/v2.14.0/datadog-dotnet-apm-2.14.0-musl.tar.gz

I haven't tested yet with:
https://github.com/DataDog/dd-trace-dotnet/releases/download/v2.14.0/datadog-dotnet-apm-2.14.0.arm64.tar.gz

EDIT: I'm aware profiling is de-activated on ARM64 at the moment due to the issue with stacktraces.

@seanamos
Copy link
Author

Switching to https://github.com/DataDog/dd-trace-dotnet/releases/download/v2.14.0/datadog-dotnet-apm-2.14.0.arm64.tar.gz has other issues.

LD_PRELOAD doesn't immediately cause problems, however I get a segfault if I try start a dotnet app with:

ENV CORECLR_ENABLE_PROFILING=1
ENV CORECLR_PROFILER={846F5F1C-F9AE-4B07-969E-05C26BC060D8}
ENV CORECLR_PROFILER_PATH=/opt/datadog/Datadog.Trace.ClrProfiler.Native.so

This isn't an immediate blocker for us, however we are exploring running our dotnet alpine containers on AWS Graviton instances in the future.

@gleocadie
Copy link
Collaborator

Hi @seanamos
I see.
I'll do some testing, but I think we miss an artifact Alpine/ARM64 that would explain why it's not working for you.
I'll get back to you.

@Baune8D
Copy link

Baune8D commented Feb 3, 2023

Also seeing the same problem as @seanamos, trying to run a .NET 6 application on mcr.microsoft.com/dotnet/aspnet:6.0.13-alpine3.17-arm64v8 casuses the application to immediately crash with a Segmentation Fault. The continuousprofile folder only contains Datadog.Linux.ApiWrapper.x64.so

@seanamos
Copy link
Author

seanamos commented Jun 14, 2023

@gleocadie Any progress on this? While this wasn't a big deal 6 months ago, its becoming more urgent for us.

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

3 participants