Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-12690

Metrics call causes java.util.ConcurrentModificationException

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 18.0.0.Final
    • Fix Version/s: None
    • Component/s: MP Metrics
    • Labels:
      None
    • Steps to Reproduce:
      • Define own application based metrics
      • Deploy the app in wildfly 18
      • Create load, so that the metrics are updated based on the load
      • Run prometheus scraping the metrics from the wildfly management port.

      Description

      Hi I ran our integrations tests together with prometheus calls. In Wildfly 18, I get this errors constantly:

      2019-10-18 14:22:57,284 ERROR [io.undertow.request] (management I/O-2) UT005071: Undertow request failed HttpServerExchange{ GET /metrics}: java.util.ConcurrentModificationException
      	at java.util.HashMap$HashIterator.nextNode(HashMap.java:1445)
      	at java.util.HashMap$EntryIterator.next(HashMap.java:1479)
      	at java.util.HashMap$EntryIterator.next(HashMap.java:1477)
      	at java.util.HashMap.putMapEntries(HashMap.java:512)
      	at java.util.HashMap.<init>(HashMap.java:490)
      	at io.smallrye.metrics.MetricsRegistryImpl.getMetadata(MetricsRegistryImpl.java:560)
      	at io.smallrye.metrics.exporters.OpenMetricsExporter.exposeEntries(OpenMetricsExporter.java:157)
      	at io.smallrye.metrics.exporters.OpenMetricsExporter.getEntriesForScope(OpenMetricsExporter.java:150)
      	at io.smallrye.metrics.exporters.OpenMetricsExporter.exportAllScopes(OpenMetricsExporter.java:101)
      	at io.smallrye.metrics.MetricsRequestHandler.handleRequest(MetricsRequestHandler.java:116)
      	at io.smallrye.metrics.MetricsRequestHandler.handleRequest(MetricsRequestHandler.java:73)
      	at org.wildfly.extension.microprofile.metrics.MetricsContextService$1.handleRequest(MetricsContextService.java:81)
      	at org.jboss.as.domain.http.server.security.RealmReadinessHandler.handleRequest(RealmReadinessHandler.java:51)
      	at org.jboss.as.domain.http.server.security.ServerErrorReadinessHandler.handleRequest(ServerErrorReadinessHandler.java:35)
      	at io.undertow.server.handlers.PathHandler.handleRequest(PathHandler.java:91)
      	at io.undertow.server.handlers.ChannelUpgradeHandler.handleRequest(ChannelUpgradeHandler.java:211)
      	at io.undertow.server.handlers.cache.CacheHandler.handleRequest(CacheHandler.java:92)
      	at io.undertow.server.handlers.error.SimpleErrorPageHandler.handleRequest(SimpleErrorPageHandler.java:78)
      	at io.undertow.server.handlers.CanonicalPathHandler.handleRequest(CanonicalPathHandler.java:49)
      	at org.jboss.as.domain.http.server.ManagementHttpRequestHandler.handleRequest(ManagementHttpRequestHandler.java:57)
      	at org.jboss.as.domain.http.server.cors.CorsHttpHandler.handleRequest(CorsHttpHandler.java:75)
      	at org.jboss.as.domain.http.server.ManagementHttpServer$UpgradeFixHandler.handleRequest(ManagementHttpServer.java:666)
      	at io.undertow.server.Connectors.executeRootHandler(Connectors.java:376)
      	at io.undertow.server.protocol.http.HttpReadListener.handleEventWithNoRunningRequest(HttpReadListener.java:255)
      	at io.undertow.server.protocol.http.HttpReadListener.handleEvent(HttpReadListener.java:136)
      	at io.undertow.server.protocol.http.HttpReadListener.handleEvent(HttpReadListener.java:59)
      	at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92)
      	at org.xnio.conduits.ReadReadyHandler$ChannelListenerHandler.readReady(ReadReadyHandler.java:66)
      	at org.xnio.nio.NioSocketConduit.handleReady(NioSocketConduit.java:89)
      	at org.xnio.nio.WorkerThread.run(WorkerThread.java:591)
      

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                jmesnil Jeff Mesnil
                Reporter:
                rbattenfeld Ralf Battenfeld
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated: