Skip to content
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

[Azul] Exception on startup: Monitoring of Synchronizer Usage is not supported. #197

Open
MG8853 opened this issue Sep 19, 2023 · 3 comments · Fixed by #207
Open

[Azul] Exception on startup: Monitoring of Synchronizer Usage is not supported. #197

MG8853 opened this issue Sep 19, 2023 · 3 comments · Fixed by #207
Labels
bug dependencies Pull requests that update a dependency file

Comments

@MG8853
Copy link

MG8853 commented Sep 19, 2023

[17:32:23 INFO]: [PrometheusExporter] Enabling PrometheusExporter v2.5.0
[17:32:23 ERROR]: Error occurred while enabling PrometheusExporter v2.5.0 (Is it up to date?)
java.lang.UnsupportedOperationException: Monitoring of Synchronizer Usage is not supported.
        at sun.management.ThreadImpl.findDeadlockedThreads(ThreadImpl.java:431) ~[?:?]
        at io.prometheus.client.hotspot.ThreadExports.addThreadMetrics(ThreadExports.java:95) ~[minecraft-prometheus-exporter-2.5.0.jar:?]
        at io.prometheus.client.hotspot.ThreadExports.collect(ThreadExports.java:156) ~[minecraft-prometheus-exporter-2.5.0.jar:?]
        at io.prometheus.client.hotspot.ThreadExports.collect(ThreadExports.java:150) ~[minecraft-prometheus-exporter-2.5.0.jar:?]
        at de.sldk.mc.metrics.HotspotPrefixer.prefixFromCollector(HotspotPrefixer.java:12) ~[minecraft-prometheus-exporter-2.5.0.jar:?]
        at de.sldk.mc.metrics.ThreadsWrapper$ThreadExportsCollector.collect(ThreadsWrapper.java:23) ~[minecraft-prometheus-exporter-2.5.0.jar:?]
        at io.prometheus.client.CollectorRegistry.collectorNames(CollectorRegistry.java:113) ~[minecraft-prometheus-exporter-2.5.0.jar:?]
        at io.prometheus.client.CollectorRegistry.register(CollectorRegistry.java:50) ~[minecraft-prometheus-exporter-2.5.0.jar:?]
        at de.sldk.mc.metrics.Metric.enable(Metric.java:54) ~[minecraft-prometheus-exporter-2.5.0.jar:?]
        at de.sldk.mc.config.PrometheusExporterConfig.lambda$enableConfiguredMetrics$1(PrometheusExporterConfig.java:67) ~[minecraft-prometheus-exporter-2.5.0.jar:?]
        at java.util.Arrays$ArrayList.forEach(Arrays.java:4220) ~[?:?]
        at de.sldk.mc.config.PrometheusExporterConfig.enableConfiguredMetrics(PrometheusExporterConfig.java:62) ~[minecraft-prometheus-exporter-2.5.0.jar:?]
        at de.sldk.mc.PrometheusExporter.onEnable(PrometheusExporter.java:18) ~[minecraft-prometheus-exporter-2.5.0.jar:?]
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:281) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:?]
        at io.papermc.paper.plugin.manager.PaperPluginInstanceManager.enablePlugin(PaperPluginInstanceManager.java:189) ~[paper-1.20.1.jar:git-Paper-194]
        at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.enablePlugin(PaperPluginManagerImpl.java:104) ~[paper-1.20.1.jar:git-Paper-194]
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:507) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.craftbukkit.v1_20_R1.CraftServer.enablePlugin(CraftServer.java:640) ~[paper-1.20.1.jar:git-Paper-194]
        at org.bukkit.craftbukkit.v1_20_R1.CraftServer.enablePlugins(CraftServer.java:551) ~[paper-1.20.1.jar:git-Paper-194]
        at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:635) ~[paper-1.20.1.jar:git-Paper-194]
        at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:434) ~[paper-1.20.1.jar:git-Paper-194]
        at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:308) ~[paper-1.20.1.jar:git-Paper-194]
        at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1100) ~[paper-1.20.1.jar:git-Paper-194]
        at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:317) ~[paper-1.20.1.jar:git-Paper-194]
        at java.lang.Thread.run(Thread.java:891) ~[?:?]
[17:32:23 INFO]: [PrometheusExporter] Disabling PrometheusExporter v2.5.0
[17:32:23 WARN]: [PrometheusExporter] Failed to stop metrics server gracefully: Cannot invoke "de.sldk.mc.MetricsServer.stop()" because "this.server" is null
java version "17.0.8.1" 2023-09-06 LTS
Java Runtime Environment Zing23.08.0.0+3 (build 17.0.8.1+1-LTS)
Zing 64-Bit Tiered VM Zing23.08.0.0+3 (build 17.0.8.1-zing_23.08.0.0-b3-product-linux-X86_64, mixed mode)
minecraft server version 1.20.1
This server is running Paper version git-Paper-194 (MC: 1.20.1) (Implementing API version 1.20.1-R0.1-SNAPSHOT) (Git: 1b1c230)
java -Xms14G -Xmx14G -XX:+UnlockExperimentalVMOptions -XX:+UseZGC -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:+PerfDisableSharedMem -XX:-ZUncommit -XX:+ParallelRefProcEnabled -Dterminal.jline=false -Dterminal.ansi=true -jar paper.jar
Ubuntu 20.04
@sladkoff sladkoff added the bug label Dec 26, 2023
@sladkoff
Copy link
Owner

Probably caused by prometheus/client_java#866

@sladkoff
Copy link
Owner

@MG8853 This is a bug that I can not fix at the moment because it's caused by the linked dependency. It only affects certain JVM configurations (Azul).

The workaround is to disable the jvm_threads metric on Azul or to use a different JVM implementation (e.g. OpenJDK).

I'll keep this ticket around until there's a fix in the upstream dependency.

@sladkoff sladkoff changed the title Exception on startup: Monitoring of Synchronizer Usage is not supported. [Azul] Exception on startup: Monitoring of Synchronizer Usage is not supported. Dec 26, 2023
sladkoff added a commit that referenced this issue Jan 2, 2024
This does not fix the underlying bug (prometheus/client_java#866) but allows the plugin to start without the JVM metrics.

Partially fixes #197.
@sladkoff
Copy link
Owner

sladkoff commented Jan 2, 2024

I added a workaround so that the plugin should not completely crash when this happens. Still, the JVM metrics will not be available on Azul environments.

@sladkoff sladkoff reopened this Jan 2, 2024
@sladkoff sladkoff added the dependencies Pull requests that update a dependency file label Jan 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants