-
Notifications
You must be signed in to change notification settings - Fork 319
Disable process advice until after agent tracer is registered #10088
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
Open
mcculls
wants to merge
1
commit into
master
Choose a base branch
from
mcculls/avoid-config-loopback-via-process-instrumentation
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Disable process advice until after agent tracer is registered #10088
mcculls
wants to merge
1
commit into
master
from
mcculls/avoid-config-loopback-via-process-instrumentation
+13
−12
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
83a9432 to
bb69b39
Compare
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 58 metrics, 7 unstable metrics. Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.57.0-SNAPSHOT~eb98d0407a, baseline=1.57.0-SNAPSHOT~4e48384724
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.08 s) : 0, 1080083
Total [baseline] (10.841 s) : 0, 10840709
Agent [candidate] (1.084 s) : 0, 1083558
Total [candidate] (10.836 s) : 0, 10835679
section appsec
Agent [baseline] (1.269 s) : 0, 1269148
Total [baseline] (11.149 s) : 0, 11148553
Agent [candidate] (1.274 s) : 0, 1274017
Total [candidate] (11.159 s) : 0, 11158696
section iast
Agent [baseline] (1.233 s) : 0, 1232590
Total [baseline] (11.337 s) : 0, 11336517
Agent [candidate] (1.233 s) : 0, 1233058
Total [candidate] (11.207 s) : 0, 11206710
section profiling
Agent [baseline] (1.205 s) : 0, 1205307
Total [baseline] (11.084 s) : 0, 11084141
Agent [candidate] (1.206 s) : 0, 1206161
Total [candidate] (11.019 s) : 0, 11019438
gantt
title petclinic - break down per module: candidate=1.57.0-SNAPSHOT~eb98d0407a, baseline=1.57.0-SNAPSHOT~4e48384724
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.191 ms) : 0, 1191
crashtracking [candidate] (1.195 ms) : 0, 1195
BytebuddyAgent [baseline] (646.905 ms) : 0, 646905
BytebuddyAgent [candidate] (649.584 ms) : 0, 649584
GlobalTracer [baseline] (282.46 ms) : 0, 282460
GlobalTracer [candidate] (283.086 ms) : 0, 283086
AppSec [baseline] (32.256 ms) : 0, 32256
AppSec [candidate] (32.476 ms) : 0, 32476
Debugger [baseline] (68.302 ms) : 0, 68302
Debugger [candidate] (68.155 ms) : 0, 68155
Remote Config [baseline] (626.119 µs) : 0, 626
Remote Config [candidate] (645.862 µs) : 0, 646
Telemetry [baseline] (9.058 ms) : 0, 9058
Telemetry [candidate] (9.067 ms) : 0, 9067
Flare Poller [baseline] (3.671 ms) : 0, 3671
Flare Poller [candidate] (3.725 ms) : 0, 3725
section appsec
crashtracking [baseline] (1.195 ms) : 0, 1195
crashtracking [candidate] (1.21 ms) : 0, 1210
BytebuddyAgent [baseline] (690.497 ms) : 0, 690497
BytebuddyAgent [candidate] (695.169 ms) : 0, 695169
GlobalTracer [baseline] (260.714 ms) : 0, 260714
GlobalTracer [candidate] (261.113 ms) : 0, 261113
AppSec [baseline] (175.321 ms) : 0, 175321
AppSec [candidate] (174.561 ms) : 0, 174561
Debugger [baseline] (67.597 ms) : 0, 67597
Debugger [candidate] (67.862 ms) : 0, 67862
Remote Config [baseline] (748.591 µs) : 0, 749
Remote Config [candidate] (717.671 µs) : 0, 718
Telemetry [baseline] (8.908 ms) : 0, 8908
Telemetry [candidate] (9.014 ms) : 0, 9014
Flare Poller [baseline] (3.886 ms) : 0, 3886
Flare Poller [candidate] (3.888 ms) : 0, 3888
IAST [baseline] (24.627 ms) : 0, 24627
IAST [candidate] (24.682 ms) : 0, 24682
section iast
crashtracking [baseline] (1.211 ms) : 0, 1211
crashtracking [candidate] (1.21 ms) : 0, 1210
BytebuddyAgent [baseline] (796.449 ms) : 0, 796449
BytebuddyAgent [candidate] (797.004 ms) : 0, 797004
GlobalTracer [baseline] (257.88 ms) : 0, 257880
GlobalTracer [candidate] (257.42 ms) : 0, 257420
AppSec [baseline] (34.587 ms) : 0, 34587
AppSec [candidate] (35.851 ms) : 0, 35851
Debugger [baseline] (67.031 ms) : 0, 67031
Debugger [candidate] (66.198 ms) : 0, 66198
Remote Config [baseline] (561.64 µs) : 0, 562
Remote Config [candidate] (548.338 µs) : 0, 548
Telemetry [baseline] (8.475 ms) : 0, 8475
Telemetry [candidate] (8.47 ms) : 0, 8470
Flare Poller [baseline] (3.483 ms) : 0, 3483
Flare Poller [candidate] (3.421 ms) : 0, 3421
IAST [baseline] (27.257 ms) : 0, 27257
IAST [candidate] (27.169 ms) : 0, 27169
section profiling
ProfilingAgent [baseline] (98.436 ms) : 0, 98436
ProfilingAgent [candidate] (98.071 ms) : 0, 98071
crashtracking [baseline] (1.198 ms) : 0, 1198
crashtracking [candidate] (1.2 ms) : 0, 1200
BytebuddyAgent [baseline] (700.97 ms) : 0, 700970
BytebuddyAgent [candidate] (702.566 ms) : 0, 702566
GlobalTracer [baseline] (221.117 ms) : 0, 221117
GlobalTracer [candidate] (220.682 ms) : 0, 220682
AppSec [baseline] (32.272 ms) : 0, 32272
AppSec [candidate] (32.264 ms) : 0, 32264
Debugger [baseline] (68.154 ms) : 0, 68154
Debugger [candidate] (68.296 ms) : 0, 68296
Remote Config [baseline] (632.536 µs) : 0, 633
Remote Config [candidate] (660.996 µs) : 0, 661
Telemetry [baseline] (9.025 ms) : 0, 9025
Telemetry [candidate] (8.976 ms) : 0, 8976
Flare Poller [baseline] (3.766 ms) : 0, 3766
Flare Poller [candidate] (3.795 ms) : 0, 3795
Profiling [baseline] (99.031 ms) : 0, 99031
Profiling [candidate] (98.642 ms) : 0, 98642
Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.57.0-SNAPSHOT~eb98d0407a, baseline=1.57.0-SNAPSHOT~4e48384724
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.08 s) : 0, 1080109
Total [baseline] (8.758 s) : 0, 8758428
Agent [candidate] (1.083 s) : 0, 1083053
Total [candidate] (8.783 s) : 0, 8783314
section iast
Agent [baseline] (1.222 s) : 0, 1221920
Total [baseline] (9.523 s) : 0, 9523408
Agent [candidate] (1.223 s) : 0, 1223216
Total [candidate] (9.501 s) : 0, 9500921
gantt
title insecure-bank - break down per module: candidate=1.57.0-SNAPSHOT~eb98d0407a, baseline=1.57.0-SNAPSHOT~4e48384724
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.196 ms) : 0, 1196
crashtracking [candidate] (1.195 ms) : 0, 1195
BytebuddyAgent [baseline] (647.442 ms) : 0, 647442
BytebuddyAgent [candidate] (650.246 ms) : 0, 650246
GlobalTracer [baseline] (282.734 ms) : 0, 282734
GlobalTracer [candidate] (282.645 ms) : 0, 282645
AppSec [baseline] (32.37 ms) : 0, 32370
AppSec [candidate] (32.391 ms) : 0, 32391
Debugger [baseline] (67.411 ms) : 0, 67411
Debugger [candidate] (67.506 ms) : 0, 67506
Remote Config [baseline] (627.848 µs) : 0, 628
Remote Config [candidate] (630.507 µs) : 0, 631
Telemetry [baseline] (9.003 ms) : 0, 9003
Telemetry [candidate] (9.061 ms) : 0, 9061
Flare Poller [baseline] (3.693 ms) : 0, 3693
Flare Poller [candidate] (3.729 ms) : 0, 3729
section iast
crashtracking [baseline] (1.186 ms) : 0, 1186
crashtracking [candidate] (1.2 ms) : 0, 1200
BytebuddyAgent [baseline] (788.497 ms) : 0, 788497
BytebuddyAgent [candidate] (790.894 ms) : 0, 790894
GlobalTracer [baseline] (255.807 ms) : 0, 255807
GlobalTracer [candidate] (255.556 ms) : 0, 255556
IAST [baseline] (26.976 ms) : 0, 26976
IAST [candidate] (27.004 ms) : 0, 27004
AppSec [baseline] (35.806 ms) : 0, 35806
AppSec [candidate] (34.809 ms) : 0, 34809
Debugger [baseline] (65.363 ms) : 0, 65363
Debugger [candidate] (65.663 ms) : 0, 65663
Remote Config [baseline] (557.196 µs) : 0, 557
Remote Config [candidate] (565.563 µs) : 0, 566
Telemetry [baseline] (8.603 ms) : 0, 8603
Telemetry [candidate] (8.513 ms) : 0, 8513
Flare Poller [baseline] (3.539 ms) : 0, 3539
Flare Poller [candidate] (3.516 ms) : 0, 3516
LoadParameters
See matching parameters
SummaryFound 1 performance improvements and 0 performance regressions! Performance is the same for 19 metrics, 16 unstable metrics.
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.57.0-SNAPSHOT~eb98d0407a, baseline=1.57.0-SNAPSHOT~4e48384724
dateFormat X
axisFormat %s
section baseline
no_agent (17.992 ms) : 17806, 18178
. : milestone, 17992,
appsec (19.48 ms) : 19278, 19681
. : milestone, 19480,
code_origins (18.016 ms) : 17836, 18196
. : milestone, 18016,
iast (17.661 ms) : 17486, 17836
. : milestone, 17661,
profiling (19.531 ms) : 19327, 19734
. : milestone, 19531,
tracing (17.666 ms) : 17490, 17842
. : milestone, 17666,
section candidate
no_agent (17.873 ms) : 17687, 18059
. : milestone, 17873,
appsec (18.723 ms) : 18530, 18916
. : milestone, 18723,
code_origins (17.51 ms) : 17337, 17683
. : milestone, 17510,
iast (17.528 ms) : 17352, 17704
. : milestone, 17528,
profiling (19.381 ms) : 19187, 19575
. : milestone, 19381,
tracing (17.474 ms) : 17302, 17647
. : milestone, 17474,
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.57.0-SNAPSHOT~eb98d0407a, baseline=1.57.0-SNAPSHOT~4e48384724
dateFormat X
axisFormat %s
section baseline
no_agent (1.182 ms) : 1171, 1193
. : milestone, 1182,
iast (3.291 ms) : 3246, 3335
. : milestone, 3291,
iast_FULL (5.755 ms) : 5698, 5812
. : milestone, 5755,
iast_GLOBAL (3.642 ms) : 3582, 3703
. : milestone, 3642,
profiling (1.897 ms) : 1881, 1914
. : milestone, 1897,
tracing (1.784 ms) : 1769, 1799
. : milestone, 1784,
section candidate
no_agent (1.195 ms) : 1183, 1206
. : milestone, 1195,
iast (3.384 ms) : 3335, 3433
. : milestone, 3384,
iast_FULL (5.679 ms) : 5623, 5735
. : milestone, 5679,
iast_GLOBAL (3.607 ms) : 3556, 3658
. : milestone, 3607,
profiling (1.984 ms) : 1967, 2000
. : milestone, 1984,
tracing (1.749 ms) : 1734, 1763
. : milestone, 1749,
DacapoParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 12 metrics, 0 unstable metrics. Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.57.0-SNAPSHOT~eb98d0407a, baseline=1.57.0-SNAPSHOT~4e48384724
dateFormat X
axisFormat %s
section baseline
no_agent (15.057 s) : 15057000, 15057000
. : milestone, 15057000,
appsec (14.474 s) : 14474000, 14474000
. : milestone, 14474000,
iast (18.043 s) : 18043000, 18043000
. : milestone, 18043000,
iast_GLOBAL (17.97 s) : 17970000, 17970000
. : milestone, 17970000,
profiling (15.345 s) : 15345000, 15345000
. : milestone, 15345000,
tracing (14.823 s) : 14823000, 14823000
. : milestone, 14823000,
section candidate
no_agent (15.478 s) : 15478000, 15478000
. : milestone, 15478000,
appsec (14.518 s) : 14518000, 14518000
. : milestone, 14518000,
iast (18.153 s) : 18153000, 18153000
. : milestone, 18153000,
iast_GLOBAL (17.989 s) : 17989000, 17989000
. : milestone, 17989000,
profiling (14.775 s) : 14775000, 14775000
. : milestone, 14775000,
tracing (14.971 s) : 14971000, 14971000
. : milestone, 14971000,
Execution time for tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.57.0-SNAPSHOT~eb98d0407a, baseline=1.57.0-SNAPSHOT~4e48384724
dateFormat X
axisFormat %s
section baseline
no_agent (1.484 ms) : 1472, 1496
. : milestone, 1484,
appsec (2.472 ms) : 2420, 2523
. : milestone, 2472,
iast (2.208 ms) : 2144, 2273
. : milestone, 2208,
iast_GLOBAL (2.254 ms) : 2190, 2319
. : milestone, 2254,
profiling (2.103 ms) : 2049, 2157
. : milestone, 2103,
tracing (2.034 ms) : 1984, 2085
. : milestone, 2034,
section candidate
no_agent (1.476 ms) : 1464, 1487
. : milestone, 1476,
appsec (2.487 ms) : 2435, 2539
. : milestone, 2487,
iast (2.22 ms) : 2155, 2285
. : milestone, 2220,
iast_GLOBAL (2.256 ms) : 2191, 2321
. : milestone, 2256,
profiling (2.07 ms) : 2017, 2122
. : milestone, 2070,
tracing (2.048 ms) : 1997, 2099
. : milestone, 2048,
|
amarziali
approved these changes
Dec 5, 2025
bb69b39 to
7cdda3a
Compare
7cdda3a to
bb69b39
Compare
This avoids a potential reentrant situation when tracer debug is enabled: 1. The full `Config` is logged during startup in its constructor 2. This includes any lazy config fields, such as the `hostname` 3. If the host is not available in the environment/host-files then `Config` calls the `hostname` command using `Runtime.exec(...)` 4. The `Runtime.exec(...)` call is intercepted by the process advice 5. The process advice calls `Config.get()` to see if RASP is enabled 6. `Config.get()` returns `null` as the config is still being built The resulting NPE is caught before it escapes to the application, but it still results in log-spam that could confuse investigations.
bb69b39 to
eb98d04
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
inst: java
Core Java language instrumentation
tag: no release notes
Changes to exclude from release notes
type: bug
Bug report and fix
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
This avoids a potential reentrant situation when tracer debug is enabled:
Configis logged during startup in its constructorhostnameConfigcalls thehostnamecommand usingRuntime.exec(...)Runtime.exec(...)call is intercepted by the process adviceConfig.get()to see if RASP is enabledConfig.get()returnsnullas the config is still being builtThe resulting NPE is caught before it escapes to the application, but it still results in log-spam that could confuse investigations.
The APPSEC feature will only be marked as ready (and active) after
Confighas been initialized, at which point it is safe to enable the RASP process advice.Additional Notes
Example stack trace:
Contributor Checklist
type:and (comp:orinst:) labels in addition to any useful labelsclose,fixor any linking keywords when referencing an issue.Use
solvesinstead, and assign the PR milestone to the issueJira ticket: [PROJ-IDENT]