-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
ConcurrentModificationException when Quarkus Micrometer extension is used #43471
Comments
/cc @brunobat (micrometer), @ebullient (micrometer) |
Thanks @mabartos, as soon as the release is performed with your fix will create the upgrade and the backport. |
What exactly causes us to have some concurrency issue here? I would have expected the setup to not be concurrent and done once and for all. |
@gsmet this PR explains it: micrometer-metrics/micrometer#5490 |
Yes, I have seen the PR. But I'm curious as to why we end up accessing this set concurrently. I would have expected the initialization to be done sequentially and then the collection being used. |
I wonder if this can be reproduced in a simpler context... This is very suspect... |
They have a reproducer on the Micrometer side.
|
OK, FWIW, my question was more to know if we could find a workaround while the issue is being addressed on the Micrometer side. But it seems like we need to wait. |
Given Micrometer 1.13 was already part of some Quarkus 3.14 releases, I assume it's not possible to temporarily downgrade back to Micrometer 1.12 due to the breaking changes. Correct? |
Sorry @vmuzikar, we cannot downgrade. We'll need to wait for their fix. |
The Micrometer side PR has been merged. Waiting for realease. |
Will create the PR now |
Describe the bug
In Keycloak, we're facing an issue (keycloak/keycloak#33246) that the server is unable to start when metrics are enabled - with the Quarkus Micrometer extension.
AFAIK, it started to happen after the Micrometer 1.13.x upgrade.
It happens only sometimes (after ~10 startups) and is reproducible after multiple start/stops of the Keycloak (Quarkus-based) server.
The related log:
AFAIK, the bug is on the Micrometer side, but it'd be necessary to upgrade Micrometer and backport it to the Quarkus 3.15 LTS.
The issue is probably touching the addition of meter filters after the creation of Meters described here: micrometer-metrics/micrometer#4920
Issue and PR for the Micrometer: micrometer-metrics/micrometer#5489
Expected behavior
Server properly started
Actual behavior
ConcurrentModificationException thrown during the startup
How to Reproduce?
Sequentially execute Keycloak multiple times (maybe plain Quarkus) with the Quarkus Micrometer extension.
Or execute multiple times this test: https://github.com/keycloak/keycloak/blob/main/quarkus/tests/integration/src/test/java/org/keycloak/it/cli/dist/StartCommandDistTest.java#L134
Output of
uname -a
orver
Linux mabartos 6.10.6-100.fc39.x86_64 SMP PREEMPT_DYNAMIC Mon Aug 19 14:35:32 UTC 2024 x86_64 GNU/Linux
Output of
java -version
openjdk 21.0.3 2024-04-16 LTS
Quarkus version or git rev
3.14.4
Build tool (ie. output of
mvnw --version
orgradlew --version
)Apache Maven 3.9.1 (Red Hat 3.9.1-3)
Additional information
No response
The text was updated successfully, but these errors were encountered: