You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
4.2.6(Although it looks like all 4.. releases are impacted)
Context
Setting startEmbeddedServer to true
return new VertxPrometheusOptions()
.setStartEmbeddedServer(true)
.setEmbeddedServerOptions(new HttpServerOptions().setPort(port));
and passing -Dvertx.metrics.options.enabled=true results in StackOverFlowException. This is a fragment of the stacktrace that contains 8 stack long repeating fragment.
```
at java.base/java.lang.String.decodeASCII(Unknown Source)
at java.base/java.lang.System$2.decodeASCII(Unknown Source)
at java.base/sun.nio.cs.UTF_8$Decoder.decodeArrayLoop(Unknown Source)
at java.base/sun.nio.cs.UTF_8$Decoder.decodeLoop(Unknown Source)
at java.base/java.nio.charset.CharsetDecoder.decode(Unknown Source)
at java.base/sun.nio.cs.StreamDecoder.implRead(Unknown Source)
at java.base/sun.nio.cs.StreamDecoder.read(Unknown Source)
at java.base/java.io.InputStreamReader.read(Unknown Source)
at java.base/java.io.BufferedReader.fill(Unknown Source)
at java.base/java.io.BufferedReader.readLine(Unknown Source)
at java.base/java.io.BufferedReader.readLine(Unknown Source)
at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.parseLine(Unknown Source)
at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.parse(Unknown Source)
at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.nextProviderClass(Unknown Source)
at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.hasNextService(Unknown Source)
at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.hasNext(Unknown Source)
at java.base/java.util.ServiceLoader$2.hasNext(Unknown Source)
at java.base/java.util.ServiceLoader$3.hasNext(Unknown Source)
at io.vertx.core.ServiceHelper.loadFactories(ServiceHelper.java:55)
at io.vertx.core.ServiceHelper.loadFactories(ServiceHelper.java:42)
at io.vertx.core.impl.VertxBuilder.init(VertxBuilder.java:270)
at io.vertx.core.Vertx.vertx(Vertx.java:86)
at io.vertx.core.Vertx.vertx(Vertx.java:76)
at io.vertx.micrometer.backends.PrometheusBackendRegistry.init(PrometheusBackendRegistry.java:73)
at io.vertx.micrometer.impl.VertxMetricsImpl.init(VertxMetricsImpl.java:102)
at io.vertx.micrometer.impl.VertxMetricsFactoryImpl.metrics(VertxMetricsFactoryImpl.java:48)
at io.vertx.core.spi.VertxMetricsFactory.init(VertxMetricsFactory.java:50)
at io.vertx.core.impl.VertxBuilder.initProviders(VertxBuilder.java:280)
at io.vertx.core.impl.VertxBuilder.init(VertxBuilder.java:271)
at io.vertx.core.Vertx.vertx(Vertx.java:86)
at io.vertx.core.Vertx.vertx(Vertx.java:76)
at io.vertx.micrometer.backends.PrometheusBackendRegistry.init(PrometheusBackendRegistry.java:73)
at io.vertx.micrometer.impl.VertxMetricsImpl.init(VertxMetricsImpl.java:102)
at io.vertx.micrometer.impl.VertxMetricsFactoryImpl.metrics(VertxMetricsFactoryImpl.java:48)
at io.vertx.core.spi.VertxMetricsFactory.init(VertxMetricsFactory.java:50)
at io.vertx.core.impl.VertxBuilder.initProviders(VertxBuilder.java:280)
at io.vertx.core.impl.VertxBuilder.init(VertxBuilder.java:271)
at io.vertx.core.Vertx.vertx(Vertx.java:86)
at io.vertx.core.Vertx.vertx(Vertx.java:76)
at io.vertx.micrometer.backends.PrometheusBackendRegistry.init(PrometheusBackendRegistry.java:73)
at io.vertx.micrometer.impl.VertxMetricsImpl.init(VertxMetricsImpl.java:102)
at io.vertx.micrometer.impl.VertxMetricsFactoryImpl.metrics(VertxMetricsFactoryImpl.java:48)
at io.vertx.core.spi.VertxMetricsFactory.init(VertxMetricsFactory.java:50)
at io.vertx.core.impl.VertxBuilder.initProviders(VertxBuilder.java:280)
at io.vertx.core.impl.VertxBuilder.init(VertxBuilder.java:271)
at io.vertx.core.Vertx.vertx(Vertx.java:86)
at io.vertx.core.Vertx.vertx(Vertx.java:76)
Without `startEmbeddedServer = true` verticle starts successfully. Problem also disappears if we stop
passing -`Dvertx.metrics.options.enabled=true`.
It looks like in 3.* `Vertx.vertx()` was using factory https://github.com/eclipse-vertx/vert.x/blob/3.9/src/main/java/io/vertx/core/Vertx.java#L85.
In 4.* this was changed to use Builder which leads to a loop https://github.com/eclipse-vertx/vert.x/blob/master/vertx-core/src/main/java/io/vertx/core/Vertx.java#L159
### Do you have a reproducer?
-
### Steps to reproduce
-
### Extra
We can reproduce it on linux and mac, java version - 17. Although, none of this seems to matter.
The text was updated successfully, but these errors were encountered:
Version
4.2.6(Although it looks like all 4.. releases are impacted)
Context
Setting startEmbeddedServer to true
and passing
-Dvertx.metrics.options.enabled=true
results in StackOverFlowException. This is a fragment of the stacktrace that contains 8 stack long repeating fragment.The text was updated successfully, but these errors were encountered: