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

Receiver binary path is not executable: /usr/local/lib/python3.11/site-packages/ddtrace/internal/datadog/profiling/crashtracker/crashtracker_exe #10901

Open
ti3x opened this issue Oct 2, 2024 · 1 comment
Assignees
Labels
Profiling Continous Profling

Comments

@ti3x
Copy link

ti3x commented Oct 2, 2024

Summary of problem

Which version of dd-trace-py are you using?

2.14.1

Which version of pip are you using?

24.0

Which libraries and their versions are you using?

datadog = "^0.45.0"

How can we reproduce your problem?

There are 2 relevant code snippets that we are using ddtrace
patch the python logging

from ddtrace import patch
patch(logging=True)
FORMAT = (
    "%(asctime)s %(levelname)s [%(name)s] [%(filename)s:%(lineno)d] "
    "[dd.service=%(dd.service)s dd.env=%(dd.env)s dd.version=%(dd.version)s dd.trace_id=%(dd.trace_id)s dd.span_id=%(dd.span_id)s] "
    "- %(message)s"
)
logging.basicConfig(format=FORMAT)
logger = logging.getLogger(__name__)
logger.level = logging.INFO

using the structlog example:

def tracer_injection(logger, log_method, event_dict):
    """Integrate tracing and logging for Datadog."""
    # get correlation ids from current tracer context
    span = tracer.current_span()
    trace_id, span_id = (span.trace_id, span.span_id) if span else (None, None)

    # add ids to structlog event dictionary
    event_dict["dd.trace_id"] = str(trace_id or 0)
    event_dict["dd.span_id"] = str(span_id or 0)

    # add the env, service, and version configured for the tracer
    event_dict["dd.env"] = "dev"
    event_dict["dd.service"] = "rhino-api"
    event_dict["dd.version"] = ddtrace.config.version or ""

    return event_dict


structlog.configure(processors=[tracer_injection, structlog.processors.JSONRenderer()])
logger = structlog.get_logger("app_logger")
logger.level = logging.INFO

and standard logging will produce above trace, even though the env is on ubuntu

What is the result that you get?

Receiver binary path is not executable: /usr/local/lib/python3.11/site-packages/ddtrace/internal/datadog/profiling/crashtracker/crashtracker_exe in logs

What is the result that you expected?

i am not seeing any datadog logs from my application without any app code update recently, except upgrading ddtrace. Expectation is seeing the logs in datadog logs

@sanchda
Copy link
Contributor

sanchda commented Nov 1, 2024

👋 thank you for the report! crashtracker_exe is a utility binary we ship in ddtrace in order to provide better diagnostics around errors. The error you observe occurs when this utility cannot be executed. Typically, this would happen if we made a mistake in how we packaged the ddtrace wheel for pypi, since this is the most common way end-users acquire ddtrace. However, I checked the 3.11 wheels we have for 2.14.1, and:

  1. every architecture that ships a crashtracker_exe utility has it marked executable
  2. every architecture that ships a crashtracker_exe utility has an appropriate version for the given architecture (the same error may arise e.g., if an x86_64 binary was run on an arm machine)
  3. similarly, all the crashtracker_exe appear to have a valid interpreter (usually some platform-specific path to ld.so) for the given architecture

This could mean that the error message is achievable some other way, or there is something interesting about your setup.

  1. Could you write a few words about how you install ddtrace (e.g., you install through pip, you build from sources, etc)
  2. Could you describe your platform (e.g., alpine linux on aarch64, ubuntu 18.04 on i686, macos on an m1 laptop, etc)

Thanks again! This is an unusual error and it may take a little sleuthing to figure out how it appears.

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

No branches or pull requests

4 participants