Skip to content

Conversation

@AlexeyKuznetsov-DD
Copy link
Contributor

What Does This Do

Refactored await logic from quite complex manipulations with list of latches with simple wait/notifyAll approach.

Motivation

Green CI.

PekkoHttpServerInstrumentationAsyncTest failed from time to time with TimeoutException:

PekkoHttpServerInstrumentationAsyncTest > propagate trace id when we ping pekko-http concurrently FAILED
 org.spockframework.runtime.ConditionFailedWithExceptionError at PekkoHttpServerInstrumentationTest.groovy:74
         Caused by: java.util.concurrent.TimeoutException at ListWriter.java:86

Additional Notes

Contributor Checklist

Jira ticket: [PROJ-IDENT]

@AlexeyKuznetsov-DD AlexeyKuznetsov-DD self-assigned this Jun 11, 2025
@AlexeyKuznetsov-DD AlexeyKuznetsov-DD added type: bug Bug report and fix comp: testing Testing tag: no release notes Changes to exclude from release notes labels Jun 11, 2025
@pr-commenter
Copy link

pr-commenter bot commented Jun 11, 2025

Benchmarks

Startup

Load

Request duration reports for petclinic
gantt
    title petclinic - request duration [CI 0.99] : candidate=1.50.0-SNAPSHOT~73ad88ce2b, baseline=1.50.0-SNAPSHOT~88aa5b2174
    dateFormat X
    axisFormat %s
section baseline
no_agent (12.406 ms) : 12294, 12519
.   : milestone, 12406,
appsec (71.685 ms) : 70693, 72676
.   : milestone, 71685,
code_origins (86.73 ms) : 84959, 88502
.   : milestone, 86730,
iast (80.075 ms) : 78862, 81287
.   : milestone, 80075,
profiling (62.462 ms) : 61601, 63324
.   : milestone, 62462,
tracing (52.586 ms) : 51811, 53361
.   : milestone, 52586,
section candidate
no_agent (13.418 ms) : 13304, 13532
.   : milestone, 13418,
appsec (65.489 ms) : 64384, 66594
.   : milestone, 65489,
code_origins (82.003 ms) : 79670, 84336
.   : milestone, 82003,
iast (73.29 ms) : 71808, 74771
.   : milestone, 73290,
profiling (56.165 ms) : 55257, 57073
.   : milestone, 56165,
tracing (47.68 ms) : 46934, 48427
.   : milestone, 47680,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 12.406 ms [12.294 ms, 12.519 ms] -
appsec 71.685 ms [70.693 ms, 72.676 ms] 59.278 ms (477.8%)
code_origins 86.73 ms [84.959 ms, 88.502 ms] 74.324 ms (599.1%)
iast 80.075 ms [78.862 ms, 81.287 ms] 67.668 ms (545.4%)
profiling 62.462 ms [61.601 ms, 63.324 ms] 50.056 ms (403.5%)
tracing 52.586 ms [51.811 ms, 53.361 ms] 40.18 ms (323.9%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 13.418 ms [13.304 ms, 13.532 ms] -
appsec 65.489 ms [64.384 ms, 66.594 ms] 52.071 ms (388.1%)
code_origins 82.003 ms [79.67 ms, 84.336 ms] 68.585 ms (511.1%)
iast 73.29 ms [71.808 ms, 74.771 ms] 59.872 ms (446.2%)
profiling 56.165 ms [55.257 ms, 57.073 ms] 42.747 ms (318.6%)
tracing 47.68 ms [46.934 ms, 48.427 ms] 34.263 ms (255.4%)

Dacapo

@AlexeyKuznetsov-DD AlexeyKuznetsov-DD marked this pull request as ready for review June 11, 2025 20:22
@AlexeyKuznetsov-DD AlexeyKuznetsov-DD requested a review from a team as a code owner June 11, 2025 20:22
@AlexeyKuznetsov-DD AlexeyKuznetsov-DD deleted the alexeyk/fixed-flaky-pekko-test branch June 16, 2025 13:08
Comment on lines +53 to +60
long deadline = System.currentTimeMillis() + unit.toMillis(timeout);

while (true) {
if (predicate.getAsBoolean()) {
return true;
}
latches.add(latch);

long now = System.currentTimeMillis();
Copy link
Contributor

@bric3 bric3 Jun 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: Shouldn't we use nanoTime here ? currentTimeMillis is not monotonic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp: testing Testing tag: no release notes Changes to exclude from release notes type: bug Bug report and fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants