-
Notifications
You must be signed in to change notification settings - Fork 301
Solve file leakage and turn JDK socket support on by default #8752
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
+227
−34
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
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 64 metrics, 7 unstable metrics. Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.50.0-SNAPSHOT~c089869839, baseline=1.49.0-SNAPSHOT~5bfab6549b
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.007 s) : 0, 1006602
Total [baseline] (8.615 s) : 0, 8615407
Agent [candidate] (1.011 s) : 0, 1011065
Total [candidate] (8.665 s) : 0, 8665322
section iast
Agent [baseline] (1.14 s) : 0, 1139712
Total [baseline] (9.211 s) : 0, 9210521
Agent [candidate] (1.145 s) : 0, 1145191
Total [candidate] (9.219 s) : 0, 9219303
section iast_HARDCODED_SECRET_DISABLED
Agent [baseline] (1.148 s) : 0, 1147918
Total [baseline] (9.213 s) : 0, 9212973
Agent [candidate] (1.139 s) : 0, 1139489
Total [candidate] (9.161 s) : 0, 9160588
section iast_TELEMETRY_OFF
Agent [baseline] (1.138 s) : 0, 1137676
Total [baseline] (9.201 s) : 0, 9201019
Agent [candidate] (1.142 s) : 0, 1142090
Total [candidate] (9.221 s) : 0, 9220749
gantt
title insecure-bank - break down per module: candidate=1.50.0-SNAPSHOT~c089869839, baseline=1.49.0-SNAPSHOT~5bfab6549b
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (670.367 ms) : 0, 670367
BytebuddyAgent [candidate] (675.054 ms) : 0, 675054
GlobalTracer [baseline] (239.997 ms) : 0, 239997
GlobalTracer [candidate] (241.343 ms) : 0, 241343
AppSec [baseline] (54.587 ms) : 0, 54587
AppSec [candidate] (54.922 ms) : 0, 54922
Debugger [baseline] (6.221 ms) : 0, 6221
Debugger [candidate] (6.941 ms) : 0, 6941
Remote Config [baseline] (711.072 µs) : 0, 711
Remote Config [candidate] (706.101 µs) : 0, 706
Telemetry [baseline] (11.377 ms) : 0, 11377
Telemetry [candidate] (8.466 ms) : 0, 8466
section iast
BytebuddyAgent [baseline] (791.3 ms) : 0, 791300
BytebuddyAgent [candidate] (795.987 ms) : 0, 795987
GlobalTracer [baseline] (230.827 ms) : 0, 230827
GlobalTracer [candidate] (231.795 ms) : 0, 231795
IAST [baseline] (22.721 ms) : 0, 22721
IAST [candidate] (23.068 ms) : 0, 23068
AppSec [baseline] (56.878 ms) : 0, 56878
AppSec [candidate] (56.328 ms) : 0, 56328
Debugger [baseline] (5.956 ms) : 0, 5956
Debugger [candidate] (5.915 ms) : 0, 5915
Remote Config [baseline] (599.175 µs) : 0, 599
Remote Config [candidate] (604.5 µs) : 0, 605
Telemetry [baseline] (7.949 ms) : 0, 7949
Telemetry [candidate] (7.922 ms) : 0, 7922
section iast_HARDCODED_SECRET_DISABLED
BytebuddyAgent [baseline] (797.169 ms) : 0, 797169
BytebuddyAgent [candidate] (791.26 ms) : 0, 791260
GlobalTracer [baseline] (232.617 ms) : 0, 232617
GlobalTracer [candidate] (230.986 ms) : 0, 230986
IAST [baseline] (23.08 ms) : 0, 23080
IAST [candidate] (22.846 ms) : 0, 22846
AppSec [baseline] (56.712 ms) : 0, 56712
AppSec [candidate] (56.496 ms) : 0, 56496
Debugger [baseline] (5.971 ms) : 0, 5971
Debugger [candidate] (5.952 ms) : 0, 5952
Remote Config [baseline] (590.572 µs) : 0, 591
Remote Config [candidate] (594.602 µs) : 0, 595
Telemetry [baseline] (8.044 ms) : 0, 8044
Telemetry [candidate] (7.924 ms) : 0, 7924
section iast_TELEMETRY_OFF
BytebuddyAgent [baseline] (789.323 ms) : 0, 789323
BytebuddyAgent [candidate] (793.245 ms) : 0, 793245
GlobalTracer [baseline] (231.364 ms) : 0, 231364
GlobalTracer [candidate] (231.999 ms) : 0, 231999
IAST [baseline] (22.606 ms) : 0, 22606
IAST [candidate] (22.536 ms) : 0, 22536
AppSec [baseline] (56.564 ms) : 0, 56564
AppSec [candidate] (56.469 ms) : 0, 56469
Debugger [baseline] (5.975 ms) : 0, 5975
Debugger [candidate] (5.909 ms) : 0, 5909
Remote Config [baseline] (599.133 µs) : 0, 599
Remote Config [candidate] (597.175 µs) : 0, 597
Telemetry [baseline] (7.769 ms) : 0, 7769
Telemetry [candidate] (7.793 ms) : 0, 7793
Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.50.0-SNAPSHOT~c089869839, baseline=1.49.0-SNAPSHOT~5bfab6549b
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.008 s) : 0, 1008426
Total [baseline] (10.498 s) : 0, 10498431
Agent [candidate] (1.005 s) : 0, 1005011
Total [candidate] (10.49 s) : 0, 10490122
section appsec
Agent [baseline] (1.15 s) : 0, 1149879
Total [baseline] (10.696 s) : 0, 10696393
Agent [candidate] (1.15 s) : 0, 1149759
Total [candidate] (10.692 s) : 0, 10691671
section iast
Agent [baseline] (1.139 s) : 0, 1139481
Total [baseline] (10.855 s) : 0, 10854777
Agent [candidate] (1.148 s) : 0, 1147915
Total [candidate] (10.843 s) : 0, 10842591
section profiling
Agent [baseline] (1.266 s) : 0, 1266263
Total [baseline] (10.815 s) : 0, 10814807
Agent [candidate] (1.273 s) : 0, 1273371
Total [candidate] (10.84 s) : 0, 10840190
gantt
title petclinic - break down per module: candidate=1.50.0-SNAPSHOT~c089869839, baseline=1.49.0-SNAPSHOT~5bfab6549b
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (671.716 ms) : 0, 671716
BytebuddyAgent [candidate] (670.353 ms) : 0, 670353
GlobalTracer [baseline] (240.316 ms) : 0, 240316
GlobalTracer [candidate] (239.686 ms) : 0, 239686
AppSec [baseline] (54.793 ms) : 0, 54793
AppSec [candidate] (54.766 ms) : 0, 54766
Debugger [baseline] (6.182 ms) : 0, 6182
Debugger [candidate] (6.88 ms) : 0, 6880
Remote Config [baseline] (688.581 µs) : 0, 689
Remote Config [candidate] (696.731 µs) : 0, 697
Telemetry [baseline] (11.289 ms) : 0, 11289
Telemetry [candidate] (9.177 ms) : 0, 9177
section appsec
BytebuddyAgent [baseline] (689.254 ms) : 0, 689254
BytebuddyAgent [candidate] (688.547 ms) : 0, 688547
GlobalTracer [baseline] (237.051 ms) : 0, 237051
GlobalTracer [candidate] (236.748 ms) : 0, 236748
AppSec [baseline] (174.932 ms) : 0, 174932
AppSec [candidate] (175.784 ms) : 0, 175784
Debugger [baseline] (5.9 ms) : 0, 5900
Debugger [candidate] (5.894 ms) : 0, 5894
Remote Config [baseline] (640.312 µs) : 0, 640
Remote Config [candidate] (632.117 µs) : 0, 632
Telemetry [baseline] (7.82 ms) : 0, 7820
Telemetry [candidate] (7.807 ms) : 0, 7807
IAST [baseline] (21.752 ms) : 0, 21752
IAST [candidate] (21.777 ms) : 0, 21777
section iast
BytebuddyAgent [baseline] (792.162 ms) : 0, 792162
BytebuddyAgent [candidate] (797.975 ms) : 0, 797975
GlobalTracer [baseline] (230.655 ms) : 0, 230655
GlobalTracer [candidate] (232.293 ms) : 0, 232293
AppSec [baseline] (56.336 ms) : 0, 56336
AppSec [candidate] (56.692 ms) : 0, 56692
Debugger [baseline] (5.835 ms) : 0, 5835
Debugger [candidate] (5.945 ms) : 0, 5945
Remote Config [baseline] (577.005 µs) : 0, 577
Remote Config [candidate] (603.927 µs) : 0, 604
Telemetry [baseline] (7.769 ms) : 0, 7769
Telemetry [candidate] (7.953 ms) : 0, 7953
IAST [baseline] (22.647 ms) : 0, 22647
IAST [candidate] (22.848 ms) : 0, 22848
section profiling
ProfilingAgent [baseline] (97.734 ms) : 0, 97734
ProfilingAgent [candidate] (97.693 ms) : 0, 97693
BytebuddyAgent [baseline] (666.648 ms) : 0, 666648
BytebuddyAgent [candidate] (671.796 ms) : 0, 671796
GlobalTracer [baseline] (381.294 ms) : 0, 381294
GlobalTracer [candidate] (383.414 ms) : 0, 383414
AppSec [baseline] (54.95 ms) : 0, 54950
AppSec [candidate] (54.44 ms) : 0, 54440
Debugger [baseline] (6.232 ms) : 0, 6232
Debugger [candidate] (6.214 ms) : 0, 6214
Remote Config [baseline] (662.453 µs) : 0, 662
Remote Config [candidate] (661.932 µs) : 0, 662
Telemetry [baseline] (8.24 ms) : 0, 8240
Telemetry [candidate] (8.262 ms) : 0, 8262
Profiling [baseline] (97.757 ms) : 0, 97757
Profiling [candidate] (97.717 ms) : 0, 97717
LoadParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 12 metrics, 18 unstable metrics. Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.50.0-SNAPSHOT~c089869839, baseline=1.49.0-SNAPSHOT~5bfab6549b
dateFormat X
axisFormat %s
section baseline
no_agent (386.546 µs) : 366, 407
. : milestone, 387,
iast (526.66 µs) : 503, 550
. : milestone, 527,
iast_FULL (738.905 µs) : 716, 762
. : milestone, 739,
iast_GLOBAL (574.006 µs) : 551, 597
. : milestone, 574,
iast_HARDCODED_SECRET_DISABLED (520.355 µs) : 497, 543
. : milestone, 520,
iast_INACTIVE (475.894 µs) : 453, 499
. : milestone, 476,
iast_TELEMETRY_OFF (518.126 µs) : 496, 541
. : milestone, 518,
tracing (472.186 µs) : 450, 494
. : milestone, 472,
section candidate
no_agent (397.096 µs) : 377, 417
. : milestone, 397,
iast (519.194 µs) : 496, 542
. : milestone, 519,
iast_FULL (745.822 µs) : 722, 769
. : milestone, 746,
iast_GLOBAL (567.406 µs) : 544, 590
. : milestone, 567,
iast_HARDCODED_SECRET_DISABLED (529.517 µs) : 507, 552
. : milestone, 530,
iast_INACTIVE (470.962 µs) : 449, 493
. : milestone, 471,
iast_TELEMETRY_OFF (518.028 µs) : 495, 541
. : milestone, 518,
tracing (463.672 µs) : 442, 486
. : milestone, 464,
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.50.0-SNAPSHOT~c089869839, baseline=1.49.0-SNAPSHOT~5bfab6549b
dateFormat X
axisFormat %s
section baseline
no_agent (1.373 ms) : 1352, 1394
. : milestone, 1373,
appsec (1.742 ms) : 1718, 1766
. : milestone, 1742,
appsec_no_iast (1.744 ms) : 1720, 1768
. : milestone, 1744,
code_origins (1.68 ms) : 1653, 1707
. : milestone, 1680,
iast (1.519 ms) : 1494, 1543
. : milestone, 1519,
profiling (1.554 ms) : 1528, 1580
. : milestone, 1554,
tracing (1.515 ms) : 1491, 1540
. : milestone, 1515,
section candidate
no_agent (1.356 ms) : 1336, 1375
. : milestone, 1356,
appsec (1.747 ms) : 1723, 1771
. : milestone, 1747,
appsec_no_iast (1.748 ms) : 1725, 1772
. : milestone, 1748,
code_origins (1.719 ms) : 1692, 1745
. : milestone, 1719,
iast (1.54 ms) : 1515, 1566
. : milestone, 1540,
profiling (1.525 ms) : 1502, 1548
. : milestone, 1525,
tracing (1.503 ms) : 1478, 1528
. : milestone, 1503,
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 tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.50.0-SNAPSHOT~c089869839, baseline=1.49.0-SNAPSHOT~5bfab6549b
dateFormat X
axisFormat %s
section baseline
no_agent (1.469 ms) : 1458, 1481
. : milestone, 1469,
appsec (2.372 ms) : 2325, 2419
. : milestone, 2372,
iast (2.147 ms) : 2088, 2206
. : milestone, 2147,
iast_GLOBAL (2.193 ms) : 2133, 2253
. : milestone, 2193,
profiling (1.993 ms) : 1947, 2040
. : milestone, 1993,
tracing (1.976 ms) : 1931, 2022
. : milestone, 1976,
section candidate
no_agent (1.467 ms) : 1455, 1478
. : milestone, 1467,
appsec (2.374 ms) : 2327, 2421
. : milestone, 2374,
iast (2.15 ms) : 2091, 2209
. : milestone, 2150,
iast_GLOBAL (2.199 ms) : 2140, 2259
. : milestone, 2199,
profiling (1.995 ms) : 1948, 2042
. : milestone, 1995,
tracing (1.969 ms) : 1924, 2015
. : milestone, 1969,
Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.50.0-SNAPSHOT~c089869839, baseline=1.49.0-SNAPSHOT~5bfab6549b
dateFormat X
axisFormat %s
section baseline
no_agent (15.016 s) : 15016000, 15016000
. : milestone, 15016000,
appsec (15.204 s) : 15204000, 15204000
. : milestone, 15204000,
iast (19.153 s) : 19153000, 19153000
. : milestone, 19153000,
iast_GLOBAL (17.975 s) : 17975000, 17975000
. : milestone, 17975000,
profiling (15.04 s) : 15040000, 15040000
. : milestone, 15040000,
tracing (14.927 s) : 14927000, 14927000
. : milestone, 14927000,
section candidate
no_agent (14.978 s) : 14978000, 14978000
. : milestone, 14978000,
appsec (15.051 s) : 15051000, 15051000
. : milestone, 15051000,
iast (19.059 s) : 19059000, 19059000
. : milestone, 19059000,
iast_GLOBAL (18.424 s) : 18424000, 18424000
. : milestone, 18424000,
profiling (15.754 s) : 15754000, 15754000
. : milestone, 15754000,
tracing (14.927 s) : 14927000, 14927000
. : milestone, 14927000,
|
ce4aaa1
to
d79201e
Compare
amarziali
approved these changes
May 2, 2025
mcculls
reviewed
May 2, 2025
c8a66a3
to
4e6eb27
Compare
dougqh
reviewed
May 6, 2025
utils/socket-utils/src/main/java17/datadog/common/socket/TunnelingJdkSocket.java
Outdated
Show resolved
Hide resolved
dougqh
reviewed
May 6, 2025
utils/socket-utils/src/main/java17/datadog/common/socket/TunnelingJdkSocket.java
Outdated
Show resolved
Hide resolved
dougqh
reviewed
May 6, 2025
utils/socket-utils/src/main/java17/datadog/common/socket/TunnelingJdkSocket.java
Outdated
Show resolved
Hide resolved
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What Does This Do
Address file leakage issue with the native UDS implementation.
Update closing technique such that when the input stream, output stream, or socket is closed, all resources (i.e. input stream, output stream, channel, selector, and socket) are closed. This better matches expected socket behavior.
Turn JDK socket support by default back on.
Motivation
Resolve issue: #8696
Update closing technique to match expected behavior - closing the input stream should close the socket, closing the output stream should close the socket, and closing the socket should close both streams and the associated channel.
Additional Notes
OpenJDK Socket class for reference: https://github.com/openjdk/jdk/blob/master/src/java.base/share/classes/java/net/Socket.java
Contributor Checklist
type:
and (comp:
orinst:
) labels in addition to any usefull labelsclose
,fix
or any linking keywords when referencing an issue.Use
solves
instead, and assign the PR milestone to the issueJira ticket: https://datadoghq.atlassian.net/browse/LANGPLAT-459