8000 [AGENTRUN-500] Add libraries folder to the runtime search path to have CMake find RTLoader libraries on macOS by Enzu83 · Pull Request #38099 · DataDog/datadog-agent · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[AGENTRUN-500] Add libraries folder to the runtime search path to have CMake find RTLoader libraries on macOS #38099

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

Merged
merged 3 commits into from
Jun 23, 2025

Conversation

Enzu83
Copy link
Contributor
@Enzu83 Enzu83 commented Jun 20, 2025

What does this PR do?

This PR fixes the problem of no LC_RPATH's found by adding the RTLoader libraries folder to the runtime search path rpath.

Motivation

I was unable to run the RTLoader tests due to a no LC_RPATH's found issue, which occurred when executing dda inv rtloader.test. For some reason, CMake is no longer able to locate the RTLoader libraries.

Here's the error:

dyld[28146]: Library not loaded: @rpath/libdatadog-agent-rtloader.2.dylib
  Referenced from: <13C11ED4-AE0C-3BC4-FB03-9F36D382F1B0> /private/var/folders/lf/k2z6_b753rng0ckph1wclg1c0000gp/T/go-build2770284591/b250/containers.test
  Reason: no LC_RPATH's found
signal: abort trap

Describe how you validated your changes

Possible Drawbacks / Trade-offs

Additional Notes

@github-actions github-actions bot added short review PR is simple enough to be reviewed quickly team/agent-runtimes labels Jun 20, 2025
@Enzu83 Enzu83 added qa/done QA done before merge and regressions are covered by tests changelog/no-changelog labels Jun 20, 2025
@Enzu83 Enzu83 changed the title [AGENTRUN-500] Add libraries folder path to rpath to run RTLoader Go tests [AGENTRUN-500] Add libraries folder to rpath to run RTLoader Go tests Jun 20, 2025
@Enzu83 Enzu83 changed the title [AGENTRUN-500] Add libraries folder to rpath to run RTLoader Go tests [AGENTRUN-500] Add libraries folder to rpath in CGO_LDFLAGS to have CMake finds RTLoader libraries Jun 20, 2025
@Enzu83 Enzu83 changed the title [AGENTRUN-500] Add libraries folder to rpath in CGO_LDFLAGS to have CMake finds RTLoader libraries [AGENTRUN-500] Add libraries folder to CGO_LDFLAGS's rpath to have CMake finds RTLoader libraries Jun 20, 2025
@Enzu83 Enzu83 force-pushed the maxime.chambre/AGENTRUN-500-no-lc-rpath-is-found branch from db38df4 to 4fa8368 Compare June 20, 2025 14:37
@Enzu83 Enzu83 changed the title [AGENTRUN-500] Add libraries folder to CGO_LDFLAGS's rpath to have CMake finds RTLoader libraries [AGENTRUN-500] Add libraries folder to CGO_LDFLAGS rpath so that CMake can find RTLoader libraries Jun 20, 2025
Copy link

Regression Detector

Regression Detector Results

Metrics dashboard
Target profiles
Run ID: ba2b31cb-04f6-4e70-aaff-59f5da79fe99

Baseline: 205dd75
Comparison: b1c3cbe
Diff

Optimization Goals: ✅ No significant changes detected

Fine details of change detection per experiment

perf experiment goal Δ mean % Δ mean % CI trials links
uds_dogstatsd_to_api_cpu % cpu utilization +1.80 [+0.89, +2.72] 1 Logs
quality_gate_logs % cpu utilizatio 8000 n +1.47 [-1.39, +4.33] 1 Logs bounds checks dashboard
ddot_logs memory utilization +0.38 [+0.29, +0.47] 1 Logs
docker_containers_cpu % cpu utilization +0.37 [-2.74, +3.48] 1 Logs
quality_gate_idle memory utilization +0.27 [+0.20, +0.33] 1 Logs bounds checks dashboard
otlp_ingest_metrics memory utilization +0.24 [+0.06, +0.42] 1 Logs
uds_dogstatsd_20mb_12k_contexts_20_senders memory utilization +0.23 [+0.17, +0.28] 1 Logs
tcp_syslog_to_blackhole ingress throughput +0.17 [+0.11, +0.23] 1 Logs
file_to_blackhole_1000ms_latency_linear_load egress throughput +0.04 [-0.19, +0.28] 1 Logs
file_to_blackhole_100ms_latency egress throughput +0.03 [-0.61, +0.67] 1 Logs
file_to_blackhole_1000ms_latency egress throughput +0.02 [-0.55, +0.58] 1 Logs
uds_dogstatsd_to_api ingress throughput +0.00 [-0.26, +0.26] 1 Logs
file_to_blackhole_300ms_latency egress throughput -0.00 [-0.62, +0.61] 1 Logs
tcp_dd_logs_filter_exclude ingress throughput -0.00 [-0.03, +0.02] 1 Logs
file_to_blackhole_0ms_latency_http1 egress throughput -0.02 [-0.62, +0.57] 1 Logs
file_to_blackhole_0ms_latency_http2 egress throughput -0.06 [-0.62, +0.51] 1 Logs
file_to_blackhole_500ms_latency egress throughput -0.07 [-0.63, +0.50] 1 Logs
file_to_blackhole_0ms_latency egress throughput -0.07 [-0.71, +0.57] 1 Logs
ddot_metrics memory utilization -0.08 [-0.19, +0.04] 1 Logs
docker_containers_memory memory utilization -0.24 [-0.32, -0.17] 1 Logs
quality_gate_idle_all_features memory utilization -0.38 [-0.49, -0.27] 1 Logs bounds checks dashboard
otlp_ingest_logs memory utilization -0.63 [-0.76, -0.50] 1 Logs
file_tree memory utilization -1.55 [-1.78, -1.32] 1 Logs

Bounds Checks: ❌ Failed

perf experiment bounds_check_name replicates_passed links
quality_gate_logs memory_usage 9/10 bounds checks dashboard
docker_containers_cpu simple_check_run 10/10
docker_containers_memory memory_usage 10/10
docker_containers_memory simple_check_run 10/10
file_to_blackhole_0ms_latency lost_bytes 10/10
file_to_blackhole_0ms_latency memory_usage 10/10
file_to_blackhole_0ms_latency_http1 lost_bytes 10/10
file_to_blackhole_0ms_latency_http1 memory_usage 10/10
file_to_blackhole_0ms_latency_http2 lost_bytes 10/10
file_to_blackhole_0ms_latency_http2 memory_usage 10/10
file_to_blackhole_1000ms_latency memory_usage 10/10
file_to_blackhole_1000ms_latency_linear_load memory_usage 10/10
file_to_blackhole_100ms_latency lost_bytes 10/10
file_to_blackhole_100ms_latency memory_usage 10/10
file_to_blackhole_300ms_latency lost_bytes 10/10
file_to_blackhole_300ms_latency memory_usage 10/10
file_to_blackhole_500ms_latency lost_bytes 10/10
file_to_blackhole_500ms_latency memory_usage 10/10
quality_gate_idle intake_connections 10/10 bounds checks dashboard
quality_gate_idle memory_usage 10/10 bounds checks dashboard
quality_gate_idle_all_features intake_connections 10/10 bounds checks dashboard
quality_gate_idle_all_features memory_usage 10/10 bounds checks dashboard
quality_gate_logs intake_connections 10/10 bounds checks dashboard
quality_gate_logs lost_bytes 10/10 bounds checks dashboard

Explanation

Confidence level: 90.00%
Effect size tolerance: |Δ mean %| ≥ 5.00%

Performance changes are noted in the perf column of each table:

  • ✅ = significantly better comparison variant performance
  • ❌ = significantly worse comparison variant performance
  • ➖ = no significant change in performance

A regression test is an A/B test of target performance in a repeatable rig, where "performance" is measured as "comparison variant minus baseline variant" for an optimization goal (e.g., ingress throughput). Due to intrinsic variability in measuring that goal, we can only estimate its mean value for each experiment; we report uncertainty in that value as a 90.00% confidence interval denoted "Δ mean % CI".

For each experiment, we decide whether a change in performance is a "regression" -- a change worth investigating further -- if all of the following criteria are true:

  1. Its estimated |Δ mean %| ≥ 5.00%, indicating the change is big enough to merit a closer look.

  2. Its 90.00% confidence interval "Δ mean % CI" does not contain zero, indicating that if our statistical model is accurate, there is at least a 90.00% chance there is a difference in performance between baseline and comparison variants.

  3. Its configuration does not mark it "erratic".

CI Pass/Fail Decision

Failed. Some Quality Gates were violated.

  • quality_gate_idle, bounds check memory_usage: 10/10 replicas passed. Gate passed.
  • quality_gate_idle, bounds check intake_connections: 10/10 replicas passed. Gate passed.
  • quality_gate_idle_all_features, bounds check intake_connections: 10/10 replicas passed. Gate passed.
  • quality_gate_idle_all_features, bounds check memory_usage: 10/10 replicas passed. Gate passed.
  • quality_gate_logs, bounds check memory_usage: 9/10 replicas passed. Failed 1 which is > 0. Gate FAILED.
  • quality_gate_logs, bounds check lost_bytes: 10/10 replicas passed. Gate passed.
  • quality_gate_logs, bounds check intake_connections: 10/10 replicas passed. Gate passed.

@agent-platform-auto-pr
Copy link
Contributor

Static quality checks

✅ Please find below the results from static quality gates
Comparison made with ancestor 205dd75

Successful checks

Info

Quality gate Delta On disk size (MiB) Delta On wire size (MiB)
agent_deb_amd64 $${0}$$ $${697.13}$$ < $${697.37}$$ $${+0.02}$$ $${176.1}$$ < $${177.03}$$
agent_deb_amd64_fips $${0}$$ $${695.43}$$ < $${695.59}$$ $${+0.05}$$ $${175.65}$$ < $${176.51}$$
agent_heroku_amd64 $${0}$$ $${358.71}$$ < $${359.67}$$ $${-0}$$ $${96.54}$$ < $${97.47}$$
agent_msi $${0}$$ $${958.98}$$ < $${959.86}$$ $${-0.01}$$ $${146.31}$$ < $${147.27}$$
agent_rpm_amd64 $${0}$$ $${697.12}$$ < $${697.36}$$ $${-0.01}$$ $${177.69}$$ < $${178.56}$$
agent_rpm_amd64_fips $${0}$$ $${695.42}$$ < $${695.58}$$ $${-0.01}$$ $${177.59}$$ < $${178.43}$$
agent_rpm_arm64 $${0}$$ $${687.14}$$ < $${687.37}$$ $${+0.01}$$ $${161.15}$$ < $${161.99}$$
agent_rpm_arm64_fips $${0}$$ $${685.54}$$ < $${685.72}$$ $${-0.01}$$ $${160.28}$$ < $${161.11}$$
agent_suse_amd64 $${0}$$ $${697.12}$$ < $${697.36}$$ $${-0.01}$$ $${177.69}$$ < $${178.56}$$
agent_suse_amd64_fips $${0}$$ $${695.42}$$ < $${695.58}$$ $${-0.01}$$ $${177.59}$$ < $${178.43}$$
agent_suse_arm64 $${0}$$ $${687.14}$$ < $${687.37}$$ $${+0.01}$$ $${161.15}$$ < $${161.99}$$
agent_suse_arm64_fips $${0}$$ $${685.54}$$ < $${685.72}$$ $${-0.01}$$ $${160.28}$$ < $${161.11}$$
docker_agent_amd64 $${0}$$ $${780.93}$$ < $${781.16}$$ $${+0}$$ $${268.83}$$ < $${269.63}$$
docker_agent_arm64 $${-0}$$ $${794.4}$$ < $${794.62}$$ $${-0}$$ $${256.19}$$ < $${257.0}$$
docker_agent_jmx_amd64 $${+0}$$ $${972.12}$$ < $${972.35}$$ $${-0}$$ $${337.8}$$ < $${338.6}$$
docker_agent_jmx_arm64 $${+0}$$ $${974.19}$$ < $${974.41}$$ $${+0}$$ $${321.13}$$ < $${321.97}$$
docker_agent_windows1809 $${-0.11}$$ $${1180.44}$$ < $${1185.29}$$ $${-0.02}$$ $${416.17}$$ < $${420.95}$$
docker_agent_windows1809_core $${+0}$$ $${5910.51}$$ < $${5915.25}$$ $${0}$$ $${2048.0}$$ < $${2049.0}$$
docker_agent_windows1809_core_jmx $${+0}$$ $${6032.08}$$ < $${6059.4}$$ $${0}$$ $${2048.0}$$ < $${2049.0}$$
docker_agent_windows1809_jmx $${+0.07}$$ $${1302.18}$$ < $${1306.92}$$ $${+0.05}$$ $${458.53}$$ < $${463.21}$$
docker_agent_windows2022 $${+0.04}$$ $${1199.89}$$ < $${1204.42}$$ $${+0.01}$$ $${428.95}$$ < $${433.71}$$
docker_agent_windows2022_core $${-0.1}$$ $${5883.74}$$ < $${5888.56}$$ $${0}$$ $${2048.0}$$ < $${2049.0}$$
docker_agent_windows2022_core_jmx $${-0.17}$$ $${6005.22}$$ < $${6009.95}$$ $${0}$$ $${2048.0}$$ < $${2049.0}$$
docker_agent_windows2022_jmx $${+0.42}$$ $${1321.66}$$ < $${1326.13}$$ $${+0.01}$$ $${471.22}$$ < $${475.99}$$
docker_cluster_agent_amd64 $${0}$$ $${212.88}$$ < $${213.79}$$ $${+0}$$ $${72.39}$$ < $${73.33}$$
docker_cluster_agent_arm64 $${0}$$ $${228.76}$$ < $${229.64}$$ $${+0}$$ $${68.67}$$ < $${69.6}$$
docker_cws_instrumentation_amd64 $${0}$$ $${7.08}$$ < $${7.12}$$ $${-0}$$ $${2.95}$$ < $${3.29}$$
docker_cws_instrumentation_arm64 $${0}$$ $${6.69}$$ < $${6.92}$$ $${+0}$$ $${2.7}$$ < $${3.07}$$
docker_dogstatsd_amd64 $${-0}$$ $${39.22}$$ < $${39.57}$$ $${+0}$$ $${15.12}$$ < $${15.76}$$
docker_dogstatsd_arm64 $${-0}$$ $${37.88}$$ < $${38.2}$$ $${-0}$$ $${14.53}$$ < $${14.83}$$
dogstatsd_deb_amd64 $${0}$$ $${30.45}$$ < $${31.4}$$ $${-0}$$ $${8.0}$$ < $${8.95}$$
dogstatsd_deb_arm64 $${0}$$ $${29.02}$$ < $${29.97}$$ $${-0}$$ $${6.94}$$ < $${7.89}$$
dogstatsd_rpm_amd64 $${0}$$ $${30.45}$$ < $${31.4}$$ $${-0}$$ $${8.01}$$ < $${8.96}$$
dogstatsd_suse_amd64 $${0}$$ $${30.45}$$ < $${31.4}$$ $${-0}$$ $${8.01}$$ < $${8.96}$$
iot_agent_deb_amd64 $${0}$$ $${50.47}$$ < $${51.38}$$ $${-0}$$ $${12.85}$$ < $${13.79}$$
iot_agent_deb_arm64 $${0}$$ $${47.94}$$ < $${48.85}$$ $${-0}$$ $${11.15}$$ < $${12.09}$$
iot_agent_deb_armhf $${0}$$ $${47.51}$$ < $${48.42}$$ $${+0}$$ $${11.21}$$ < $${12.16}$$
iot_agent_rpm_amd64 $${0}$$ $${50.47}$$ < $${51.38}$$ $${+0}$$ $${12.87}$$ < $${13.81}$$
iot_agent_rpm_arm64 $${0}$$ $${47.94}$$ < $${48.85}$$ $${+0}$$ $${11.17}$$ < $${12.11}$$
iot_agent_suse_amd64 $${0}$$ $${50.47}$$ < $${51.38}$$ $${+0}$$ $${12.87}$$ < $${13.81}$$

@Enzu83 Enzu83 changed the title [AGENTRUN-500] Add libraries folder to CGO_LDFLAGS rpath so that CMake can find RTLoader libraries [AGENTRUN-500] Add libraries folder to the runtime search path to have CMake find RTLoader libraries on macOS Jun 20, 2025
@Enzu83 Enzu83 requested a review from louis-cqrl June 20, 2025 19:17
@Enzu83 Enzu83 marked this pull request as ready for review June 20, 2025 19:17
@Enzu83 Enzu83 requested a review from a team as a code owner June 20, 2025 19:17
Comment on lines 24 to 30
if (WIN32)
set (CGO_LDFLAGS -L${PROJECT_BINARY_DIR}/rtloader -ldatadog-agent-rtloader -lstdc++ -static)
elseif(APPLE)
set (CGO_LDFLAGS -L${PROJECT_BINARY_DIR}/rtloader -ldatadog-agent-rtloader -ldl -rpath ${PROJECT_BINARY_DIR}/../../dev/lib)
else()
set (CGO_LDFLAGS -L${PROJECT_BINARY_DIR}/rtloader -ldatadog-agent-rtloader -ldl)
endif()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you check that windows and linux do not need this para 8000 meter as well ?

@Enzu83
Copy link
Contributor Author
Enzu83 commented Jun 23, 2025

/merge

@dd-devflow
Copy link
dd-devflow bot commented Jun 23, 2025

View all feedbacks in Devflow UI.

2025-06-23 07:29:33 UTC ℹ️ Start processing command /merge


2025-06-23 07:29:37 UTC ℹ️ MergeQueue: pull request added to the queue

The expected merge time in main is approximately 1h (p90).


2025-06-23 08:19:30 UTC ℹ️ MergeQueue: This merge request was merged

@dd-mergequeue dd-mergequeue bot merged commit 61ed32d into main Jun 23, 2025
222 checks passed
@dd-mergequeue dd-mergequeue bot deleted the maxime.chambre/AGENTRUN-500-no-lc-rpath-is-found branch June 23, 2025 08:19
@github-actions github-actions bot added this to the 7.69.0 milestone Jun 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog/no-changelog qa/done QA done before merge and regressions are covered by tests short review PR is simple enough to be reviewed quickly team/agent-runtimes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0