-
Notifications
You must be signed in to change notification settings - Fork 1k
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
JvmGcMetricsTest#sizeMetricsNotSetToZero is failing on CI with generational ZGC #4497
Comments
I'm still baffled but without changing anything, CI is passing now: https://app.circleci.com/pipelines/github/micrometer-metrics/micrometer/5436/workflows/05fd24a9-8e9f-419a-9650-329b76acf8a8/jobs/27819 |
This continues to be flaky, but I still do not understand the conditions in which it is happening. Edit: latest failure https://app.circleci.com/pipelines/github/micrometer-metrics/micrometer/5583/workflows/b23e3578-1e22-4f59-8907-cfa7df952150/jobs/28483 |
I was able to repro this locally by killing the Gradle daemons (see later) and enable gc logs for the test task. I added some "syso debugging" and the interesting part is that the value we get from the notification, set to the state object and verify in the test is almost always zero.
but then another notification comes after it that overwrites this value:
I'm not sure what "Warmup" exactly means for ZGC but I think if the live data after GC size in the GC notification is zero, we should ignore these notifications and not update the state object of our Repro stepsModify the task zgcGenerationalTest(type: Test) {
// set heap size for the test JVM(s)
maxHeapSize = "1500m"
useJUnitPlatform {
includeTags 'gc'
}
jvmArgs '-XX:+UseZGC', '-XX:+ZGenerational', '-Xlog:gc'
testLogging {
outputs.upToDateWhen { false }
showStandardStreams = true
}
} Then kill the Gradle daemons since it might happen that if the JVM is reused between test executions, ZGC is already "warm" so it will not emit those GC notifications that might cause problems. ./gradlew clean zgcGenerationalTest --tests '*JvmGcMetricsTest.sizeMetricsNotSetToZero' --rerun-tasks --no-build-cache |
Reopening to narrow down the fix for only ZGC warmup notifications. |
See for example https://ge.micrometer.io/s/bcf466z2dbkke
When I tried to reproduce this locally, I could not: https://ge.micrometer.io/s/pzp56wcywsmrg/
Failing command:
./gradlew zgcGenerationalTest
The text was updated successfully, but these errors were encountered: