-
Notifications
You must be signed in to change notification settings - Fork 292
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
[🍒 #7885] Fix memory leak in Exception Replay #7892
Merged
Merged
Conversation
This file contains 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
The weak map stateByThrowable keep the throwable as the key but this exception is also strong referenced by snapshots stored inside the ThrowableState in CapturedThrowable and in locals and extensions for @exception. Fixing by storing weak reference inside the CapturedThrowable and clearing the other ref for @exception at commit time
evanchooly
approved these changes
Nov 5, 2024
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 57 metrics, 6 unstable metrics. Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.43.0-SNAPSHOT~b34fdcc2cd, baseline=1.43.0-SNAPSHOT~21c0b2df63
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.604 s) : 0, 1604293
Total [baseline] (11.921 s) : 0, 11921075
Agent [candidate] (1.59 s) : 0, 1589576
Total [candidate] (11.91 s) : 0, 11909981
section iast
Agent [baseline] (1.76 s) : 0, 1760269
Total [baseline] (12.847 s) : 0, 12847325
Agent [candidate] (1.764 s) : 0, 1763614
Total [candidate] (12.852 s) : 0, 12851896
section iast_HARDCODED_SECRET_DISABLED
Agent [baseline] (1.763 s) : 0, 1763405
Total [baseline] (12.84 s) : 0, 12839711
Agent [candidate] (1.764 s) : 0, 1763971
Total [candidate] (12.819 s) : 0, 12819290
section iast_TELEMETRY_OFF
Agent [baseline] (1.756 s) : 0, 1756290
Total [baseline] (12.845 s) : 0, 12845065
Agent [candidate] (1.758 s) : 0, 1757771
Total [candidate] (12.825 s) : 0, 12824516
gantt
title insecure-bank - break down per module: candidate=1.43.0-SNAPSHOT~b34fdcc2cd, baseline=1.43.0-SNAPSHOT~21c0b2df63
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (1.025 s) : 0, 1025177
BytebuddyAgent [candidate] (1.017 s) : 0, 1016580
GlobalTracer [baseline] (470.53 ms) : 0, 470530
GlobalTracer [candidate] (465.906 ms) : 0, 465906
AppSec [baseline] (76.406 ms) : 0, 76406
AppSec [candidate] (75.879 ms) : 0, 75879
Remote Config [baseline] (838.177 µs) : 0, 838
Remote Config [candidate] (825.386 µs) : 0, 825
Telemetry [baseline] (10.863 ms) : 0, 10863
Telemetry [candidate] (9.988 ms) : 0, 9988
section iast
BytebuddyAgent [baseline] (1.179 s) : 0, 1179273
BytebuddyAgent [candidate] (1.181 s) : 0, 1181396
GlobalTracer [baseline] (445.257 ms) : 0, 445257
GlobalTracer [candidate] (445.568 ms) : 0, 445568
AppSec [baseline] (78.023 ms) : 0, 78023
AppSec [candidate] (77.045 ms) : 0, 77045
IAST [baseline] (26.968 ms) : 0, 26968
IAST [candidate] (28.68 ms) : 0, 28680
Remote Config [baseline] (769.073 µs) : 0, 769
Remote Config [candidate] (774.873 µs) : 0, 775
Telemetry [baseline] (9.655 ms) : 0, 9655
Telemetry [candidate] (9.706 ms) : 0, 9706
section iast_HARDCODED_SECRET_DISABLED
BytebuddyAgent [baseline] (1.18 s) : 0, 1180146
BytebuddyAgent [candidate] (1.181 s) : 0, 1180827
GlobalTracer [baseline] (446.72 ms) : 0, 446720
GlobalTracer [candidate] (446.38 ms) : 0, 446380
AppSec [baseline] (78.778 ms) : 0, 78778
AppSec [candidate] (79.055 ms) : 0, 79055
IAST [baseline] (26.897 ms) : 0, 26897
IAST [candidate] (26.833 ms) : 0, 26833
Remote Config [baseline] (768.075 µs) : 0, 768
Remote Config [candidate] (750.022 µs) : 0, 750
Telemetry [baseline] (9.736 ms) : 0, 9736
Telemetry [candidate] (9.691 ms) : 0, 9691
section iast_TELEMETRY_OFF
BytebuddyAgent [baseline] (1.175 s) : 0, 1175131
BytebuddyAgent [candidate] (1.176 s) : 0, 1176189
GlobalTracer [baseline] (445.228 ms) : 0, 445228
GlobalTracer [candidate] (445.691 ms) : 0, 445691
AppSec [baseline] (78.699 ms) : 0, 78699
AppSec [candidate] (78.971 ms) : 0, 78971
IAST [baseline] (26.583 ms) : 0, 26583
IAST [candidate] (26.285 ms) : 0, 26285
Remote Config [baseline] (774.723 µs) : 0, 775
Remote Config [candidate] (764.745 µs) : 0, 765
Telemetry [baseline] (9.58 ms) : 0, 9580
Telemetry [candidate] (9.468 ms) : 0, 9468
Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.43.0-SNAPSHOT~b34fdcc2cd, baseline=1.43.0-SNAPSHOT~21c0b2df63
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.598 s) : 0, 1597617
Total [baseline] (14.408 s) : 0, 14408006
Agent [candidate] (1.596 s) : 0, 1595782
Total [candidate] (14.328 s) : 0, 14327919
section appsec
Agent [baseline] (1.791 s) : 0, 1790998
Total [baseline] (14.727 s) : 0, 14727071
Agent [candidate] (1.797 s) : 0, 1796721
Total [candidate] (14.698 s) : 0, 14697744
section iast
Agent [baseline] (1.763 s) : 0, 1762752
Total [baseline] (15.095 s) : 0, 15094515
Agent [candidate] (1.761 s) : 0, 1760847
Total [candidate] (14.953 s) : 0, 14952638
section profiling
Agent [baseline] (1.919 s) : 0, 1918563
Total [baseline] (14.858 s) : 0, 14858036
Agent [candidate] (1.92 s) : 0, 1919957
Total [candidate] (14.712 s) : 0, 14712351
gantt
title petclinic - break down per module: candidate=1.43.0-SNAPSHOT~b34fdcc2cd, baseline=1.43.0-SNAPSHOT~21c0b2df63
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (1.021 s) : 0, 1020578
BytebuddyAgent [candidate] (1.019 s) : 0, 1019475
GlobalTracer [baseline] (467.924 ms) : 0, 467924
GlobalTracer [candidate] (467.501 ms) : 0, 467501
AppSec [baseline] (76.414 ms) : 0, 76414
AppSec [candidate] (76.066 ms) : 0, 76066
Remote Config [baseline] (845.69 µs) : 0, 846
Remote Config [candidate] (819.213 µs) : 0, 819
Telemetry [baseline] (11.467 ms) : 0, 11467
Telemetry [candidate] (11.425 ms) : 0, 11425
section appsec
BytebuddyAgent [baseline] (1.041 s) : 0, 1040638
BytebuddyAgent [candidate] (1.042 s) : 0, 1042247
GlobalTracer [baseline] (461.359 ms) : 0, 461359
GlobalTracer [candidate] (463.443 ms) : 0, 463443
AppSec [baseline] (244.978 ms) : 0, 244978
AppSec [candidate] (246.604 ms) : 0, 246604
Remote Config [baseline] (802.404 µs) : 0, 802
Remote Config [candidate] (807.002 µs) : 0, 807
Telemetry [baseline] (10.373 ms) : 0, 10373
Telemetry [candidate] (10.618 ms) : 0, 10618
IAST [baseline] (25.135 ms) : 0, 25135
IAST [candidate] (25.206 ms) : 0, 25206
section iast
BytebuddyAgent [baseline] (1.181 s) : 0, 1180860
BytebuddyAgent [candidate] (1.18 s) : 0, 1179559
GlobalTracer [baseline] (445.632 ms) : 0, 445632
GlobalTracer [candidate] (444.971 ms) : 0, 444971
AppSec [baseline] (78.361 ms) : 0, 78361
AppSec [candidate] (78.616 ms) : 0, 78616
Remote Config [baseline] (769.809 µs) : 0, 770
Remote Config [candidate] (755.166 µs) : 0, 755
Telemetry [baseline] (9.656 ms) : 0, 9656
Telemetry [candidate] (9.578 ms) : 0, 9578
IAST [baseline] (27.116 ms) : 0, 27116
IAST [candidate] (26.937 ms) : 0, 26937
section profiling
BytebuddyAgent [baseline] (1.011 s) : 0, 1010772
BytebuddyAgent [candidate] (1.009 s) : 0, 1008806
GlobalTracer [baseline] (595.508 ms) : 0, 595508
GlobalTracer [candidate] (596.515 ms) : 0, 596515
AppSec [baseline] (76.65 ms) : 0, 76650
AppSec [candidate] (76.346 ms) : 0, 76346
Remote Config [baseline] (852.891 µs) : 0, 853
Remote Config [candidate] (843.08 µs) : 0, 843
Telemetry [baseline] (13.376 ms) : 0, 13376
Telemetry [candidate] (14.813 ms) : 0, 14813
ProfilingAgent [baseline] (163.077 ms) : 0, 163077
ProfilingAgent [candidate] (164.453 ms) : 0, 164453
Profiling [baseline] (163.133 ms) : 0, 163133
Profiling [candidate] (164.508 ms) : 0, 164508
LoadParameters
See matching parameters
SummaryFound 0 performance improvements and 1 performance regressions! Performance is the same for 6 metrics, 21 unstable metrics.
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.43.0-SNAPSHOT~b34fdcc2cd, baseline=1.43.0-SNAPSHOT~21c0b2df63
dateFormat X
axisFormat %s
section baseline
no_agent (1.716 ms) : 1691, 1742
. : milestone, 1716,
appsec (2.196 ms) : 2164, 2228
. : milestone, 2196,
appsec_no_iast (2.186 ms) : 2154, 2218
. : milestone, 2186,
iast (1.862 ms) : 1832, 1892
. : milestone, 1862,
profiling (1.891 ms) : 1861, 1921
. : milestone, 1891,
tracing (1.869 ms) : 1838, 1901
. : milestone, 1869,
section candidate
no_agent (1.701 ms) : 1676, 1725
. : milestone, 1701,
appsec (2.191 ms) : 2162, 2221
. : milestone, 2191,
appsec_no_iast (2.203 ms) : 2169, 2237
. : milestone, 2203,
iast (1.907 ms) : 1877, 1937
. : milestone, 1907,
profiling (1.97 ms) : 1936, 2004
. : milestone, 1970,
tracing (1.894 ms) : 1861, 1926
. : milestone, 1894,
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.43.0-SNAPSHOT~b34fdcc2cd, baseline=1.43.0-SNAPSHOT~21c0b2df63
dateFormat X
axisFormat %s
section baseline
no_agent (462.033 µs) : 430, 494
. : milestone, 462,
iast (586.432 µs) : 555, 618
. : milestone, 586,
iast_FULL (831.881 µs) : 799, 865
. : milestone, 832,
iast_GLOBAL (619.109 µs) : 586, 652
. : milestone, 619,
iast_HARDCODED_SECRET_DISABLED (588.608 µs) : 556, 621
. : milestone, 589,
iast_INACTIVE (543.07 µs) : 512, 574
. : milestone, 543,
iast_TELEMETRY_OFF (587.993 µs) : 556, 620
. : milestone, 588,
tracing (537.522 µs) : 507, 568
. : milestone, 538,
section candidate
no_agent (451.926 µs) : 423, 481
. : milestone, 452,
iast (590.172 µs) : 559, 622
. : milestone, 590,
iast_FULL (834.55 µs) : 801, 868
. : milestone, 835,
iast_GLOBAL (622.983 µs) : 591, 655
. : milestone, 623,
iast_HARDCODED_SECRET_DISABLED (583.428 µs) : 552, 615
. : milestone, 583,
iast_INACTIVE (537.342 µs) : 507, 568
. : milestone, 537,
iast_TELEMETRY_OFF (576.011 µs) : 544, 608
. : milestone, 576,
tracing (531.385 µs) : 501, 561
. : milestone, 531,
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.43.0-SNAPSHOT~b34fdcc2cd, baseline=1.43.0-SNAPSHOT~21c0b2df63
dateFormat X
axisFormat %s
section baseline
no_agent (1.472 ms) : 1460, 1483
. : milestone, 1472,
appsec (2.338 ms) : 2296, 2379
. : milestone, 2338,
iast (2.085 ms) : 2032, 2137
. : milestone, 2085,
iast_GLOBAL (2.111 ms) : 2059, 2163
. : milestone, 2111,
profiling (1.934 ms) : 1892, 1977
. : milestone, 1934,
tracing (1.904 ms) : 1865, 1943
. : milestone, 1904,
section candidate
no_agent (1.463 ms) : 1452, 1475
. : milestone, 1463,
appsec (2.325 ms) : 2284, 2366
. : milestone, 2325,
iast (2.073 ms) : 2021, 2125
. : milestone, 2073,
iast_GLOBAL (2.117 ms) : 2065, 2169
. : milestone, 2117,
profiling (1.922 ms) : 1882, 1963
. : milestone, 1922,
tracing (1.918 ms) : 1878, 1958
. : milestone, 1918,
Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.43.0-SNAPSHOT~b34fdcc2cd, baseline=1.43.0-SNAPSHOT~21c0b2df63
dateFormat X
axisFormat %s
section baseline
no_agent (15.106 s) : 15106000, 15106000
. : milestone, 15106000,
appsec (15.201 s) : 15201000, 15201000
. : milestone, 15201000,
iast (19.081 s) : 19081000, 19081000
. : milestone, 19081000,
iast_GLOBAL (18.061 s) : 18061000, 18061000
. : milestone, 18061000,
profiling (14.976 s) : 14976000, 14976000
. : milestone, 14976000,
tracing (14.99 s) : 14990000, 14990000
. : milestone, 14990000,
section candidate
no_agent (15.026 s) : 15026000, 15026000
. : milestone, 15026000,
appsec (15.18 s) : 15180000, 15180000
. : milestone, 15180000,
iast (18.622 s) : 18622000, 18622000
. : milestone, 18622000,
iast_GLOBAL (17.897 s) : 17897000, 17897000
. : milestone, 17897000,
profiling (15.4 s) : 15400000, 15400000
. : milestone, 15400000,
tracing (15.024 s) : 15024000, 15024000
. : milestone, 15024000,
|
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.
Backport #7885 to v1.42.1
What Does This Do
The weak map stateByThrowable keep the throwable as the key but this exception is also strong referenced by snapshots stored inside the ThrowableState in CapturedThrowable and in locals and extensions for @exception.
Fixing by storing weak reference inside the CapturedThrowable and clearing the other ref for @exception at commit time
Motivation
Additional Notes
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: [PROJ-IDENT]