-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[Dynamic Instrumentation] Fix stability issues #34340
base: main
Are you sure you want to change the base?
Conversation
|
ff13c65
to
2e3cba1
Compare
[Fast Unit Tests Report] On pipeline 56883287 (CI Visibility). The following jobs did not run any unit tests: Jobs:
If you modified Go files and expected unit tests to run in these jobs, please double check the job logs. If you think tests should have been executed reach out to #agent-devx-help |
Uncompressed package size comparisonComparison with ancestor Diff per package
Decision✅ Passed |
2e3cba1
to
08a01e0
Compare
Regression DetectorRegression Detector ResultsMetrics dashboard Baseline: 153cd14 Optimization Goals: ✅ No significant changes detected
|
perf | experiment | goal | Δ mean % | Δ mean % CI | trials | links |
---|---|---|---|---|---|---|
➖ | uds_dogstatsd_to_api_cpu | % cpu utilization | +0.65 | [-0.20, +1.51] | 1 | Logs |
➖ | tcp_syslog_to_blackhole | ingress throughput | +0.65 | [+0.59, +0.71] | 1 | Logs |
➖ | quality_gate_idle | memory utilization | +0.24 | [+0.18, +0.29] | 1 | Logs bounds checks dashboard |
➖ | file_to_blackhole_1000ms_latency | egress throughput | +0.19 | [-0.60, +0.97] | 1 | Logs |
➖ | file_to_blackhole_500ms_latency | egress throughput | +0.08 | [-0.70, +0.86] | 1 | Logs |
➖ | quality_gate_idle_all_features | memory utilization | +0.05 | [-0.01, +0.10] | 1 | Logs bounds checks dashboard |
➖ | file_to_blackhole_100ms_latency | egress throughput | +0.01 | [-0.64, +0.66] | 1 | Logs |
➖ | file_to_blackhole_300ms_latency | egress throughput | +0.00 | [-0.62, +0.63] | 1 | Logs |
➖ | file_to_blackhole_0ms_latency | egress throughput | +0.00 | [-0.76, +0.77] | 1 | Logs |
➖ | tcp_dd_logs_filter_exclude | ingress throughput | +0.00 | [-0.02, +0.02] | 1 | Logs |
➖ | file_to_blackhole_0ms_latency_http1 | egress throughput | +0.00 | [-0.81, +0.81] | 1 | Logs |
➖ | file_to_blackhole_0ms_latency_http2 | egress throughput | -0.00 | [-0.80, +0.80] | 1 | Logs |
➖ | uds_dogstatsd_to_api | ingress throughput | -0.00 | [-0.27, +0.27] | 1 | Logs |
➖ | file_to_blackhole_1000ms_latency_linear_load | egress throughput | -0.27 | [-0.74, +0.19] | 1 | Logs |
➖ | file_tree | memory utilization | -0.39 | [-0.45, -0.33] | 1 | Logs |
➖ | quality_gate_logs | % cpu utilization | -0.40 | [-3.28, +2.49] | 1 | Logs |
Bounds Checks: ✅ Passed
perf | experiment | bounds_check_name | replicates_passed | links |
---|---|---|---|---|
✅ | 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 | |
✅ | quality_gate_logs | lost_bytes | 10/10 | |
✅ | quality_gate_logs | memory_usage | 10/10 |
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:
-
Its estimated |Δ mean %| ≥ 5.00%, indicating the change is big enough to merit a closer look.
-
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.
-
Its configuration does not mark it "erratic".
CI Pass/Fail Decision
✅ Passed. All Quality Gates 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_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_logs, bounds check lost_bytes: 10/10 replicas passed. Gate passed.
- quality_gate_logs, bounds check intake_connections: 10/10 replicas passed. Gate passed.
- quality_gate_logs, bounds check memory_usage: 10/10 replicas passed. Gate passed.
2de5570
to
07334c5
Compare
I can't get the tests to actually run. Issues with running git:
Regardless I think dependencies would be better served as git submodules, what do you think?. |
} | ||
|
||
func (pt *ProcessTracker) scanProcessTree() error { | ||
if err := syscall.Kill(-g_cmd.Process.Pid, syscall.SIGSTOP); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you document more the need to use signals for stopping/continuing procs?
My understanding so far is that we download the protobuf library, compile all test binaries, attach probes to all functions in the binaries, then run them and inspect results. Why is it necessary to start a process group and orchestrate with signals instead of running the binaries one at a time?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In order to do what you suggest, I'll have to use Go DI in unusual way. With the Exploration Testing, I wanted to mimic real-world scenario as much as I can, including all the process tracking logic, analysis of binaries with their ProcessInfo
struct, etc. Essentially treating Go DI and the project-under-test as two blackboxes.
Your recommendation could guide us in creating a new test that is tailored to unravel the scope of our support.
In the work of designing the moving parts of Exploration Testing I considered a couple of approaches and ended up going in the approach of running the tests in a blackbox without caring much about their nature. The infra is pretty flexible and can be easily adjusted to add more projects. I didn't want to manually import protobuf, look into how to run it continuously and be forced to put probes on predefined locations.
I do agree, though, that we have a challenge in determining which functions are actually executing. I don't think this challenge rule out the whole technique just yet. I have a few ideas of how to deal with that (use static analysis / profling to determine which symbols should be prioritized to probe)
Having said all of that, I still believe the exploration tests are incredibly useful in their current state. Simply running them helped me uncover 6+ crashes caused by nil/invalid indexing dereferences, 1 race condition, and 2 logical bugs - bugs that would have otherwise been really hard to find. Debugging it was also a bless. The fact that numerous subtests involve in the execution of protobuf, some of which are very short-lived, also helped uncover these edge cases.
I don't say that exploration tests are a complete task as they currently stand, but they're totally a tool to assess the readiness to private beta. We could choose to create more tests either by utilizing this infra or creating a new one, but the current exploration tests did prove themselves.
|
07334c5
to
62f7f41
Compare
I've splitted the PR into Stability & Exploration Testing. The exploration testing PR is: #34423 and is stacked on top of this PR. |
Test changes on VMUse this command from test-infra-definitions to manually test this PR changes on a VM: inv aws.create-vm --pipeline-id=56883287 --os-family=ubuntu Note: This applies to commit 62f7f41 |
Static quality checks ✅Please find below the results from static quality gates Successful checksInfo
|
if procInfo.TypeMap == nil { | ||
err := AnalyzeBinary(procInfo) | ||
if err != nil { | ||
log.Errorf("couldn't inspect binary: %v\n", err) | ||
return | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's other fields which are set in procInfo from AnalyzeBinary besides the type map, so i'm not sure if this is the correct way to do this check.
I originally thought that it would be an issue because when the binary is inspected we're only analyzing types for target functions, so if a config is updated, we wouldn't be able to parse types for the new configuration. However testing this branch doesn't show any issues.
What were the reservations you had about this particular change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok I did further investigation and realized this code doesn't belong here at all. AnalyzeBinary
needs to be called for the sake of the RC config manager, but the memory config manager (i.e. what file based configuration is built on) has separate callbacks for when procs/configs are updated which call AnalyzeBinary already.
So remove this call to AnalyzeBinary all together and add it before the call to applyConfigUpdate()
on line 239 (without the condition nil check)
What does this PR do?
Motivation
Improve stability of Go DI
Describe how you validated your changes
I ran locally our e2e tests & exploration tests and verified the proposed changes improved our stability.