-
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
Protect currentContext access for reactor inner operators #7883
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
amarziali
force-pushed
the
andrea.marziali/reactor-npe
branch
from
November 5, 2024 11:46
490c9af
to
026938a
Compare
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 49 metrics, 14 unstable metrics. Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.43.0-SNAPSHOT~490c9afce2, baseline=1.43.0-SNAPSHOT~318e5c8bcf
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.596 s) : 0, 1596139
Total [baseline] (11.874 s) : 0, 11874125
Agent [candidate] (1.586 s) : 0, 1586424
Total [candidate] (11.91 s) : 0, 11910211
section iast
Agent [baseline] (1.756 s) : 0, 1755757
Total [baseline] (12.907 s) : 0, 12907248
Agent [candidate] (1.761 s) : 0, 1760666
Total [candidate] (12.809 s) : 0, 12809463
section iast_HARDCODED_SECRET_DISABLED
Agent [baseline] (1.761 s) : 0, 1760993
Total [baseline] (12.81 s) : 0, 12809636
Agent [candidate] (1.761 s) : 0, 1760526
Total [candidate] (12.784 s) : 0, 12784187
section iast_TELEMETRY_OFF
Agent [baseline] (1.754 s) : 0, 1754477
Total [baseline] (12.825 s) : 0, 12825195
Agent [candidate] (1.754 s) : 0, 1753736
Total [candidate] (12.854 s) : 0, 12854170
gantt
title insecure-bank - break down per module: candidate=1.43.0-SNAPSHOT~490c9afce2, baseline=1.43.0-SNAPSHOT~318e5c8bcf
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (1.02 s) : 0, 1019570
BytebuddyAgent [candidate] (1.013 s) : 0, 1012730
GlobalTracer [baseline] (467.893 ms) : 0, 467893
GlobalTracer [candidate] (466.079 ms) : 0, 466079
AppSec [baseline] (75.351 ms) : 0, 75351
AppSec [candidate] (75.382 ms) : 0, 75382
Remote Config [baseline] (810.448 µs) : 0, 810
Remote Config [candidate] (808.29 µs) : 0, 808
Telemetry [baseline] (12.207 ms) : 0, 12207
Telemetry [candidate] (11.216 ms) : 0, 11216
section iast
BytebuddyAgent [baseline] (1.176 s) : 0, 1175878
BytebuddyAgent [candidate] (1.179 s) : 0, 1178569
GlobalTracer [baseline] (445.025 ms) : 0, 445025
GlobalTracer [candidate] (446.353 ms) : 0, 446353
AppSec [baseline] (76.42 ms) : 0, 76420
AppSec [candidate] (77.444 ms) : 0, 77444
IAST [baseline] (28.112 ms) : 0, 28112
IAST [candidate] (27.634 ms) : 0, 27634
Remote Config [baseline] (735.347 µs) : 0, 735
Remote Config [candidate] (753.31 µs) : 0, 753
Telemetry [baseline] (9.381 ms) : 0, 9381
Telemetry [candidate] (9.595 ms) : 0, 9595
section iast_HARDCODED_SECRET_DISABLED
BytebuddyAgent [baseline] (1.179 s) : 0, 1178714
BytebuddyAgent [candidate] (1.178 s) : 0, 1178387
GlobalTracer [baseline] (446.303 ms) : 0, 446303
GlobalTracer [candidate] (446.642 ms) : 0, 446642
AppSec [baseline] (77.521 ms) : 0, 77521
AppSec [candidate] (78.164 ms) : 0, 78164
IAST [baseline] (27.776 ms) : 0, 27776
IAST [candidate] (26.763 ms) : 0, 26763
Remote Config [baseline] (762.804 µs) : 0, 763
Remote Config [candidate] (753.87 µs) : 0, 754
Telemetry [baseline] (9.704 ms) : 0, 9704
Telemetry [candidate] (9.509 ms) : 0, 9509
section iast_TELEMETRY_OFF
BytebuddyAgent [baseline] (1.173 s) : 0, 1172844
BytebuddyAgent [candidate] (1.173 s) : 0, 1172710
GlobalTracer [baseline] (446.032 ms) : 0, 446032
GlobalTracer [candidate] (445.909 ms) : 0, 445909
AppSec [baseline] (78.011 ms) : 0, 78011
AppSec [candidate] (78.379 ms) : 0, 78379
IAST [baseline] (26.308 ms) : 0, 26308
IAST [candidate] (26.302 ms) : 0, 26302
Remote Config [baseline] (745.193 µs) : 0, 745
Remote Config [candidate] (745.245 µs) : 0, 745
Telemetry [baseline] (10.313 ms) : 0, 10313
Telemetry [candidate] (9.424 ms) : 0, 9424
Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.43.0-SNAPSHOT~490c9afce2, baseline=1.43.0-SNAPSHOT~318e5c8bcf
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.596 s) : 0, 1595930
Total [baseline] (14.392 s) : 0, 14392429
Agent [candidate] (1.59 s) : 0, 1589590
Total [candidate] (14.341 s) : 0, 14341121
section appsec
Agent [baseline] (1.796 s) : 0, 1795611
Total [baseline] (14.582 s) : 0, 14582191
Agent [candidate] (1.793 s) : 0, 1792576
Total [candidate] (14.695 s) : 0, 14695446
section iast
Agent [baseline] (1.769 s) : 0, 1768577
Total [baseline] (14.986 s) : 0, 14985631
Agent [candidate] (1.764 s) : 0, 1763793
Total [candidate] (14.997 s) : 0, 14997137
section profiling
Agent [baseline] (1.914 s) : 0, 1914068
Total [baseline] (14.647 s) : 0, 14646995
Agent [candidate] (1.917 s) : 0, 1916695
Total [candidate] (14.651 s) : 0, 14650694
gantt
title petclinic - break down per module: candidate=1.43.0-SNAPSHOT~490c9afce2, baseline=1.43.0-SNAPSHOT~318e5c8bcf
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (1.019 s) : 0, 1019245
BytebuddyAgent [candidate] (1.016 s) : 0, 1015566
GlobalTracer [baseline] (467.278 ms) : 0, 467278
GlobalTracer [candidate] (466.61 ms) : 0, 466610
AppSec [baseline] (75.933 ms) : 0, 75933
AppSec [candidate] (75.7 ms) : 0, 75700
Remote Config [baseline] (838.981 µs) : 0, 839
Remote Config [candidate] (819.496 µs) : 0, 819
Telemetry [baseline] (12.343 ms) : 0, 12343
Telemetry [candidate] (10.605 ms) : 0, 10605
section appsec
BytebuddyAgent [baseline] (1.043 s) : 0, 1042902
BytebuddyAgent [candidate] (1.041 s) : 0, 1040707
GlobalTracer [baseline] (463.883 ms) : 0, 463883
GlobalTracer [candidate] (462.682 ms) : 0, 462682
AppSec [baseline] (243.639 ms) : 0, 243639
AppSec [candidate] (244.012 ms) : 0, 244012
IAST [baseline] (25.915 ms) : 0, 25915
IAST [candidate] (28.214 ms) : 0, 28214
Remote Config [baseline] (798.714 µs) : 0, 799
Remote Config [candidate] (796.509 µs) : 0, 797
Telemetry [baseline] (11.179 ms) : 0, 11179
Telemetry [candidate] (10.009 ms) : 0, 10009
section iast
BytebuddyAgent [baseline] (1.184 s) : 0, 1184240
BytebuddyAgent [candidate] (1.181 s) : 0, 1181200
GlobalTracer [baseline] (447.628 ms) : 0, 447628
GlobalTracer [candidate] (446.446 ms) : 0, 446446
AppSec [baseline] (76.289 ms) : 0, 76289
AppSec [candidate] (77.783 ms) : 0, 77783
IAST [baseline] (28.824 ms) : 0, 28824
IAST [candidate] (27.773 ms) : 0, 27773
Remote Config [baseline] (762.351 µs) : 0, 762
Remote Config [candidate] (742.826 µs) : 0, 743
Telemetry [baseline] (10.452 ms) : 0, 10452
Telemetry [candidate] (9.509 ms) : 0, 9509
section profiling
BytebuddyAgent [baseline] (1.007 s) : 0, 1006768
BytebuddyAgent [candidate] (1.009 s) : 0, 1008536
GlobalTracer [baseline] (595.52 ms) : 0, 595520
GlobalTracer [candidate] (596.942 ms) : 0, 596942
AppSec [baseline] (76.077 ms) : 0, 76077
AppSec [candidate] (76.507 ms) : 0, 76507
Remote Config [baseline] (845.477 µs) : 0, 845
Remote Config [candidate] (865.46 µs) : 0, 865
Telemetry [baseline] (11.632 ms) : 0, 11632
Telemetry [candidate] (13.26 ms) : 0, 13260
ProfilingAgent [baseline] (165.408 ms) : 0, 165408
ProfilingAgent [candidate] (162.561 ms) : 0, 162561
Profiling [baseline] (165.462 ms) : 0, 165462
Profiling [candidate] (162.615 ms) : 0, 162615
LoadParameters
See matching parameters
SummaryFound 1 performance improvements and 0 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~490c9afce2, baseline=1.43.0-SNAPSHOT~318e5c8bcf
dateFormat X
axisFormat %s
section baseline
no_agent (1.699 ms) : 1674, 1723
. : milestone, 1699,
appsec (2.196 ms) : 2164, 2228
. : milestone, 2196,
appsec_no_iast (2.181 ms) : 2149, 2213
. : milestone, 2181,
iast (1.874 ms) : 1844, 1904
. : milestone, 1874,
profiling (1.99 ms) : 1955, 2025
. : milestone, 1990,
tracing (1.878 ms) : 1846, 1910
. : milestone, 1878,
section candidate
no_agent (1.708 ms) : 1684, 1731
. : milestone, 1708,
appsec (2.193 ms) : 2162, 2225
. : milestone, 2193,
appsec_no_iast (2.217 ms) : 2186, 2249
. : milestone, 2217,
iast (1.897 ms) : 1867, 1927
. : milestone, 1897,
profiling (1.909 ms) : 1879, 1939
. : milestone, 1909,
tracing (1.875 ms) : 1843, 1906
. : milestone, 1875,
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.43.0-SNAPSHOT~490c9afce2, baseline=1.43.0-SNAPSHOT~318e5c8bcf
dateFormat X
axisFormat %s
section baseline
no_agent (455.911 µs) : 427, 484
. : milestone, 456,
iast (586.211 µs) : 553, 619
. : milestone, 586,
iast_FULL (831.896 µs) : 799, 865
. : milestone, 832,
iast_GLOBAL (618.375 µs) : 585, 651
. : milestone, 618,
iast_HARDCODED_SECRET_DISABLED (590.72 µs) : 558, 623
. : milestone, 591,
iast_INACTIVE (536.93 µs) : 506, 568
. : milestone, 537,
iast_TELEMETRY_OFF (578.942 µs) : 547, 611
. : milestone, 579,
tracing (535.274 µs) : 505, 565
. : milestone, 535,
section candidate
no_agent (445.659 µs) : 417, 475
. : milestone, 446,
iast (580.054 µs) : 547, 613
. : milestone, 580,
iast_FULL (825.56 µs) : 794, 857
. : milestone, 826,
iast_GLOBAL (617.252 µs) : 584, 650
. : milestone, 617,
iast_HARDCODED_SECRET_DISABLED (591.882 µs) : 560, 624
. : milestone, 592,
iast_INACTIVE (544.447 µs) : 514, 575
. : milestone, 544,
iast_TELEMETRY_OFF (573.343 µs) : 542, 604
. : milestone, 573,
tracing (538.513 µs) : 509, 568
. : milestone, 539,
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.43.0-SNAPSHOT~490c9afce2, baseline=1.43.0-SNAPSHOT~318e5c8bcf
dateFormat X
axisFormat %s
section baseline
no_agent (15.184 s) : 15184000, 15184000
. : milestone, 15184000,
appsec (15.23 s) : 15230000, 15230000
. : milestone, 15230000,
iast (18.975 s) : 18975000, 18975000
. : milestone, 18975000,
iast_GLOBAL (18.286 s) : 18286000, 18286000
. : milestone, 18286000,
profiling (15.383 s) : 15383000, 15383000
. : milestone, 15383000,
tracing (15.241 s) : 15241000, 15241000
. : milestone, 15241000,
section candidate
no_agent (15.369 s) : 15369000, 15369000
. : milestone, 15369000,
appsec (15.325 s) : 15325000, 15325000
. : milestone, 15325000,
iast (18.675 s) : 18675000, 18675000
. : milestone, 18675000,
iast_GLOBAL (18.19 s) : 18190000, 18190000
. : milestone, 18190000,
profiling (15.708 s) : 15708000, 15708000
. : milestone, 15708000,
tracing (15.092 s) : 15092000, 15092000
. : milestone, 15092000,
Execution time for tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.43.0-SNAPSHOT~490c9afce2, baseline=1.43.0-SNAPSHOT~318e5c8bcf
dateFormat X
axisFormat %s
section baseline
no_agent (1.472 ms) : 1461, 1484
. : milestone, 1472,
appsec (2.345 ms) : 2304, 2385
. : milestone, 2345,
iast (2.086 ms) : 2035, 2138
. : milestone, 2086,
iast_GLOBAL (2.138 ms) : 2086, 2190
. : milestone, 2138,
profiling (1.939 ms) : 1897, 1981
. : milestone, 1939,
tracing (1.925 ms) : 1885, 1965
. : milestone, 1925,
section candidate
no_agent (1.47 ms) : 1458, 1481
. : milestone, 1470,
appsec (2.349 ms) : 2308, 2391
. : milestone, 2349,
iast (2.092 ms) : 2040, 2144
. : milestone, 2092,
iast_GLOBAL (2.132 ms) : 2080, 2184
. : milestone, 2132,
profiling (1.956 ms) : 1914, 1998
. : milestone, 1956,
tracing (1.929 ms) : 1889, 1970
. : milestone, 1929,
|
smola
approved these changes
Nov 5, 2024
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
CoreSubscriber
instrumentation access to the subscriber context via thecurrentContext
method.While this is not expected to throw, it may happen that inner operators like
reactor.core.publisher.FluxWindowPredicate$WindowFlux
might throw a NPE because it's implementation is defined asand
actual()
returns nullI also put a test to ensure that we do not have unhandled exception in that instrumentation. As well I protected other potential unsafe access context and cleaned up a leftover
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]