-
Notifications
You must be signed in to change notification settings - Fork 324
Use modern Logback for Java 21+ tests with better Virtual Threads support. #10551
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
Use modern Logback for Java 21+ tests with better Virtual Threads support. #10551
Conversation
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 59 metrics, 12 unstable metrics. Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.60.0-SNAPSHOT~622e4e48d5, baseline=1.60.0-SNAPSHOT~36e285c979
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.076 s) : 0, 1076281
Total [baseline] (11.022 s) : 0, 11022219
Agent [candidate] (1.069 s) : 0, 1069320
Total [candidate] (10.894 s) : 0, 10893937
section appsec
Agent [baseline] (1.239 s) : 0, 1239210
Total [baseline] (11.082 s) : 0, 11082448
Agent [candidate] (1.257 s) : 0, 1257202
Total [candidate] (11.077 s) : 0, 11077340
section iast
Agent [baseline] (1.235 s) : 0, 1234985
Total [baseline] (11.173 s) : 0, 11172779
Agent [candidate] (1.249 s) : 0, 1248759
Total [candidate] (11.222 s) : 0, 11222102
section profiling
Agent [baseline] (1.192 s) : 0, 1191718
Total [baseline] (10.969 s) : 0, 10968783
Agent [candidate] (1.194 s) : 0, 1193731
Total [candidate] (11.03 s) : 0, 11030387
gantt
title petclinic - break down per module: candidate=1.60.0-SNAPSHOT~622e4e48d5, baseline=1.60.0-SNAPSHOT~36e285c979
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.194 ms) : 0, 1194
crashtracking [candidate] (1.204 ms) : 0, 1204
BytebuddyAgent [baseline] (634.651 ms) : 0, 634651
BytebuddyAgent [candidate] (632.046 ms) : 0, 632046
AgentMeter [baseline] (29.178 ms) : 0, 29178
AgentMeter [candidate] (28.82 ms) : 0, 28820
GlobalTracer [baseline] (259.882 ms) : 0, 259882
GlobalTracer [candidate] (258.188 ms) : 0, 258188
AppSec [baseline] (33.148 ms) : 0, 33148
AppSec [candidate] (32.819 ms) : 0, 32819
Debugger [baseline] (64.296 ms) : 0, 64296
Debugger [candidate] (63.412 ms) : 0, 63412
Remote Config [baseline] (635.43 µs) : 0, 635
Remote Config [candidate] (637.757 µs) : 0, 638
Telemetry [baseline] (12.267 ms) : 0, 12267
Telemetry [candidate] (12.094 ms) : 0, 12094
Flare Poller [baseline] (5.44 ms) : 0, 5440
Flare Poller [candidate] (4.568 ms) : 0, 4568
section appsec
crashtracking [baseline] (1.176 ms) : 0, 1176
crashtracking [candidate] (1.194 ms) : 0, 1194
BytebuddyAgent [baseline] (657.858 ms) : 0, 657858
BytebuddyAgent [candidate] (667.945 ms) : 0, 667945
AgentMeter [baseline] (12.013 ms) : 0, 12013
AgentMeter [candidate] (12.135 ms) : 0, 12135
GlobalTracer [baseline] (259.39 ms) : 0, 259390
GlobalTracer [candidate] (262.289 ms) : 0, 262289
IAST [baseline] (25.208 ms) : 0, 25208
IAST [candidate] (25.747 ms) : 0, 25747
AppSec [baseline] (167.966 ms) : 0, 167966
AppSec [candidate] (169.727 ms) : 0, 169727
Debugger [baseline] (66.733 ms) : 0, 66733
Debugger [candidate] (68.769 ms) : 0, 68769
Remote Config [baseline] (662.812 µs) : 0, 663
Remote Config [candidate] (671.395 µs) : 0, 671
Telemetry [baseline] (9.111 ms) : 0, 9111
Telemetry [candidate] (9.298 ms) : 0, 9298
Flare Poller [baseline] (3.736 ms) : 0, 3736
Flare Poller [candidate] (3.784 ms) : 0, 3784
section iast
crashtracking [baseline] (1.184 ms) : 0, 1184
crashtracking [candidate] (1.199 ms) : 0, 1199
BytebuddyAgent [baseline] (797.26 ms) : 0, 797260
BytebuddyAgent [candidate] (808.278 ms) : 0, 808278
AgentMeter [baseline] (11.307 ms) : 0, 11307
AgentMeter [candidate] (11.837 ms) : 0, 11837
GlobalTracer [baseline] (249.289 ms) : 0, 249289
GlobalTracer [candidate] (251.352 ms) : 0, 251352
IAST [baseline] (27.045 ms) : 0, 27045
IAST [candidate] (26.958 ms) : 0, 26958
AppSec [baseline] (31.334 ms) : 0, 31334
AppSec [candidate] (32.39 ms) : 0, 32390
Debugger [baseline] (69.455 ms) : 0, 69455
Debugger [candidate] (68.464 ms) : 0, 68464
Remote Config [baseline] (548.575 µs) : 0, 549
Remote Config [candidate] (533.226 µs) : 0, 533
Telemetry [baseline] (8.666 ms) : 0, 8666
Telemetry [candidate] (8.656 ms) : 0, 8656
Flare Poller [baseline] (3.499 ms) : 0, 3499
Flare Poller [candidate] (3.422 ms) : 0, 3422
section profiling
crashtracking [baseline] (1.223 ms) : 0, 1223
crashtracking [candidate] (1.214 ms) : 0, 1214
BytebuddyAgent [baseline] (682.812 ms) : 0, 682812
BytebuddyAgent [candidate] (683.805 ms) : 0, 683805
AgentMeter [baseline] (8.599 ms) : 0, 8599
AgentMeter [candidate] (8.61 ms) : 0, 8610
GlobalTracer [baseline] (216.464 ms) : 0, 216464
GlobalTracer [candidate] (216.798 ms) : 0, 216798
AppSec [baseline] (32.415 ms) : 0, 32415
AppSec [candidate] (32.572 ms) : 0, 32572
Debugger [baseline] (67.955 ms) : 0, 67955
Debugger [candidate] (67.993 ms) : 0, 67993
Remote Config [baseline] (601.824 µs) : 0, 602
Remote Config [candidate] (600.6 µs) : 0, 601
Telemetry [baseline] (8.879 ms) : 0, 8879
Telemetry [candidate] (8.994 ms) : 0, 8994
Flare Poller [baseline] (3.738 ms) : 0, 3738
Flare Poller [candidate] (3.729 ms) : 0, 3729
ProfilingAgent [baseline] (98.98 ms) : 0, 98980
ProfilingAgent [candidate] (99.436 ms) : 0, 99436
Profiling [baseline] (99.543 ms) : 0, 99543
Profiling [candidate] (99.992 ms) : 0, 99992
Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.60.0-SNAPSHOT~622e4e48d5, baseline=1.60.0-SNAPSHOT~36e285c979
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.065 s) : 0, 1064840
Total [baseline] (8.733 s) : 0, 8733388
Agent [candidate] (1.067 s) : 0, 1066566
Total [candidate] (8.732 s) : 0, 8732433
section iast
Agent [baseline] (1.234 s) : 0, 1234461
Total [baseline] (9.427 s) : 0, 9427021
Agent [candidate] (1.244 s) : 0, 1244267
Total [candidate] (9.44 s) : 0, 9440077
gantt
title insecure-bank - break down per module: candidate=1.60.0-SNAPSHOT~622e4e48d5, baseline=1.60.0-SNAPSHOT~36e285c979
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.183 ms) : 0, 1183
crashtracking [candidate] (1.191 ms) : 0, 1191
BytebuddyAgent [baseline] (628.486 ms) : 0, 628486
BytebuddyAgent [candidate] (630.339 ms) : 0, 630339
AgentMeter [baseline] (29.013 ms) : 0, 29013
AgentMeter [candidate] (28.962 ms) : 0, 28962
GlobalTracer [baseline] (258.064 ms) : 0, 258064
GlobalTracer [candidate] (258.643 ms) : 0, 258643
AppSec [baseline] (32.721 ms) : 0, 32721
AppSec [candidate] (32.728 ms) : 0, 32728
Debugger [baseline] (60.884 ms) : 0, 60884
Debugger [candidate] (59.727 ms) : 0, 59727
Remote Config [baseline] (613.21 µs) : 0, 613
Remote Config [candidate] (624.554 µs) : 0, 625
Telemetry [baseline] (13.043 ms) : 0, 13043
Telemetry [candidate] (11.323 ms) : 0, 11323
Flare Poller [baseline] (5.358 ms) : 0, 5358
Flare Poller [candidate] (7.658 ms) : 0, 7658
section iast
crashtracking [baseline] (1.183 ms) : 0, 1183
crashtracking [candidate] (1.193 ms) : 0, 1193
BytebuddyAgent [baseline] (796.603 ms) : 0, 796603
BytebuddyAgent [candidate] (805.191 ms) : 0, 805191
AgentMeter [baseline] (11.344 ms) : 0, 11344
AgentMeter [candidate] (11.598 ms) : 0, 11598
GlobalTracer [baseline] (250.015 ms) : 0, 250015
GlobalTracer [candidate] (249.722 ms) : 0, 249722
IAST [baseline] (27.191 ms) : 0, 27191
IAST [candidate] (26.936 ms) : 0, 26936
AppSec [baseline] (31.467 ms) : 0, 31467
AppSec [candidate] (34.395 ms) : 0, 34395
Debugger [baseline] (68.49 ms) : 0, 68490
Debugger [candidate] (66.744 ms) : 0, 66744
Remote Config [baseline] (547.503 µs) : 0, 548
Remote Config [candidate] (552.786 µs) : 0, 553
Telemetry [baseline] (8.74 ms) : 0, 8740
Telemetry [candidate] (8.786 ms) : 0, 8786
Flare Poller [baseline] (3.53 ms) : 0, 3530
Flare Poller [candidate] (3.544 ms) : 0, 3544
LoadParameters
See matching parameters
SummaryFound 4 performance improvements and 0 performance regressions! Performance is the same for 16 metrics, 16 unstable metrics.
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.60.0-SNAPSHOT~622e4e48d5, baseline=1.60.0-SNAPSHOT~36e285c979
dateFormat X
axisFormat %s
section baseline
no_agent (18.701 ms) : 18505, 18897
. : milestone, 18701,
appsec (18.733 ms) : 18544, 18922
. : milestone, 18733,
code_origins (18.753 ms) : 18562, 18943
. : milestone, 18753,
iast (18.193 ms) : 18013, 18374
. : milestone, 18193,
profiling (18.595 ms) : 18411, 18778
. : milestone, 18595,
tracing (17.456 ms) : 17283, 17630
. : milestone, 17456,
section candidate
no_agent (18.367 ms) : 18175, 18559
. : milestone, 18367,
appsec (18.548 ms) : 18361, 18735
. : milestone, 18548,
code_origins (17.702 ms) : 17522, 17883
. : milestone, 17702,
iast (17.573 ms) : 17404, 17742
. : milestone, 17573,
profiling (18.451 ms) : 18266, 18637
. : milestone, 18451,
tracing (17.304 ms) : 17135, 17474
. : milestone, 17304,
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.60.0-SNAPSHOT~622e4e48d5, baseline=1.60.0-SNAPSHOT~36e285c979
dateFormat X
axisFormat %s
section baseline
no_agent (1.177 ms) : 1165, 1188
. : milestone, 1177,
iast (3.146 ms) : 3105, 3188
. : milestone, 3146,
iast_FULL (5.779 ms) : 5721, 5837
. : milestone, 5779,
iast_GLOBAL (3.588 ms) : 3529, 3647
. : milestone, 3588,
profiling (1.898 ms) : 1883, 1914
. : milestone, 1898,
tracing (1.8 ms) : 1785, 1816
. : milestone, 1800,
section candidate
no_agent (1.174 ms) : 1163, 1186
. : milestone, 1174,
iast (3.114 ms) : 3073, 3155
. : milestone, 3114,
iast_FULL (5.865 ms) : 5805, 5925
. : milestone, 5865,
iast_GLOBAL (3.302 ms) : 3252, 3353
. : milestone, 3302,
profiling (2.058 ms) : 2036, 2080
. : milestone, 2058,
tracing (1.798 ms) : 1784, 1813
. : milestone, 1798,
DacapoParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 11 metrics, 1 unstable metrics. Execution time for tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.60.0-SNAPSHOT~622e4e48d5, baseline=1.60.0-SNAPSHOT~36e285c979
dateFormat X
axisFormat %s
section baseline
no_agent (1.47 ms) : 1458, 1481
. : milestone, 1470,
appsec (3.761 ms) : 3542, 3980
. : milestone, 3761,
iast (2.244 ms) : 2175, 2313
. : milestone, 2244,
iast_GLOBAL (2.28 ms) : 2211, 2349
. : milestone, 2280,
profiling (2.068 ms) : 2014, 2123
. : milestone, 2068,
tracing (2.041 ms) : 1988, 2094
. : milestone, 2041,
section candidate
no_agent (1.471 ms) : 1459, 1482
. : milestone, 1471,
appsec (3.784 ms) : 3564, 4003
. : milestone, 3784,
iast (2.241 ms) : 2173, 2310
. : milestone, 2241,
iast_GLOBAL (2.285 ms) : 2215, 2354
. : milestone, 2285,
profiling (2.077 ms) : 2022, 2132
. : milestone, 2077,
tracing (2.059 ms) : 2005, 2113
. : milestone, 2059,
Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.60.0-SNAPSHOT~622e4e48d5, baseline=1.60.0-SNAPSHOT~36e285c979
dateFormat X
axisFormat %s
section baseline
no_agent (14.852 s) : 14852000, 14852000
. : milestone, 14852000,
appsec (15.018 s) : 15018000, 15018000
. : milestone, 15018000,
iast (18.318 s) : 18318000, 18318000
. : milestone, 18318000,
iast_GLOBAL (17.782 s) : 17782000, 17782000
. : milestone, 17782000,
profiling (14.784 s) : 14784000, 14784000
. : milestone, 14784000,
tracing (14.861 s) : 14861000, 14861000
. : milestone, 14861000,
section candidate
no_agent (14.839 s) : 14839000, 14839000
. : milestone, 14839000,
appsec (14.956 s) : 14956000, 14956000
. : milestone, 14956000,
iast (18.318 s) : 18318000, 18318000
. : milestone, 18318000,
iast_GLOBAL (17.698 s) : 17698000, 17698000
. : milestone, 17698000,
profiling (14.622 s) : 14622000, 14622000
. : milestone, 14622000,
tracing (14.674 s) : 14674000, 14674000
. : milestone, 14674000,
|
PerfectSlayer
left a comment
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.
Rather than migrating for few selected modules, why not bump the logger version completel?
dd-java-agent/instrumentation/java/java-concurrent/java-concurrent-21.0/build.gradle
Show resolved
Hide resolved
|
/merge |
|
View all feedbacks in Devflow UI.
This pull request is not mergeable according to GitHub. Common reasons include pending required checks, missing approvals, or merge conflicts — but it could also be blocked by other repository rules or settings.
The expected merge time in
|
What Does This Do
This PR reworks #9435 and follows up on #10535.
We upgrade Logback from
1.2.13to a modern version that properly supports Java 21 and Virtual Threads. The currently used Logback version is known to have issues in Virtual Thread environments (see the Logback issue for details), which leads to intermittent CI hangs on Java 21.Motivation
Unblock CI on Java 21+ and keep it green..
Additional Notes
With Logback
1.2.13, jobs frequently hang on Java 21 in GitLab CI. A typical blocked call path looks like this:The root cause is that legacy Logback is not aware of Virtual Threads. When multiple virtual threads share the same carrier thread, Logback’s internal locking can lead to deadlocks.
Since this behavior only manifests on JDK 21+, upgrading to a Logback version designed with Java 21 and Virtual Thread support is the correct long-term fix.
Why not slf4j-simple?
slf4j-simpleworks because it is truly simple: it has no internal locking and just writes to stdout. However:Using a modern Logback version keeps logging consistent across the codebase while properly supporting Virtual Threads.