[v1.8.14 Bukkit] Error while using /spark profiler --thread *
Teslicek opened this issue · 3 comments
Used command spark profiler --thread *
while my server had 1600% usage (due to an unknown plugin) and then after a few minutes tried spark profiler --stop
.
i9 12900K (threads 0-15)
1.18.2 Pufferfish b51
Error:
>....2022-03-07 16:46:09,554 Craft Scheduler Thread - 468 - spark ERROR Recursive call to appender Async
[16:46:09 WARN]: [spark] Plugin spark v1.8.14 generated an exception while executing task 374410
java.nio.BufferUnderflowException: null
at java.nio.Buffer.nextGetIndex(Buffer.java:699) ~[?:?]
at java.nio.DirectByteBuffer.get(DirectByteBuffer.java:324) ~[?:?]
at me.lucko.spark.common.sampler.async.jfr.JfrReader.getVarint(JfrReader.java:455) ~[spark 1.8.14.jar:?]
at me.lucko.spark.common.sampler.async.jfr.JfrReader.readConstantPool(JfrReader.java:280) ~[spark 1.8.14.jar:?]
at me.lucko.spark.common.sampler.async.jfr.JfrReader.readChunk(JfrReader.java:216) ~[spark 1.8.14.jar:?]
at me.lucko.spark.common.sampler.async.jfr.JfrReader.<init>(JfrReader.java:80) ~[spark 1.8.14.jar:?]
at me.lucko.spark.common.sampler.async.AsyncSampler.aggregateOutput(AsyncSampler.java:180) ~[spark 1.8.14.jar:?]
at me.lucko.spark.common.sampler.async.AsyncSampler.toProto(AsyncSampler.java:160) ~[spark 1.8.14.jar:?]
at me.lucko.spark.common.command.modules.SamplerModule.handleUpload(SamplerModule.java:308) ~[spark 1.8.14.jar:?]
at me.lucko.spark.common.command.modules.SamplerModule.profilerStop(SamplerModule.java:302) ~[spark 1.8.14.jar:?]
at me.lucko.spark.common.command.modules.SamplerModule.profiler(SamplerModule.java:136) ~[spark 1.8.14.jar:?]
at me.lucko.spark.common.SparkPlatform.executeCommand0(SparkPlatform.java:387) ~[spark 1.8.14.jar:?]
at me.lucko.spark.common.SparkPlatform.lambda$executeCommand$2(SparkPlatform.java:300) ~[spark 1.8.14.jar:?]
at org.bukkit.craftbukkit.v1_18_R2.scheduler.CraftTask.run(CraftTask.java:101) ~[pufferfish-1.18.2.jar:git-Pufferfish-51]
at org.bukkit.craftbukkit.v1_18_R2.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57) ~[pufferfish-1.18.2.jar:git-Pufferfish-51]
at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[pufferfish-1.18.2.jar:git-Pufferfish-51]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
at java.lang.Thread.run(Thread.java:833) ~[?:?]
I'm having a very similar issue when stopping the profiler, however, I'm not adding the --thread parameter when running the first command.
[16:57:08 INFO]: [⚡] The active profiler has been stopped! Uploading results... [16:57:08 WARN]: [spark] Plugin spark v1.8.14 generated an exception while executing task 13 java.nio.BufferUnderflowException: null at java.nio.Buffer.nextGetIndex(Buffer.java:699) ~[?:?] at java.nio.DirectByteBuffer.get(DirectByteBuffer.java:329) ~[?:?] at me.lucko.spark.common.sampler.async.jfr.JfrReader.getVarint(JfrReader.java:455) ~[spark-1.8.14-bukkit (1).jar:?] at me.lucko.spark.common.sampler.async.jfr.JfrReader.readConstantPool(JfrReader.java:280) ~[spark-1.8.14-bukkit (1).jar:?] at me.lucko.spark.common.sampler.async.jfr.JfrReader.readChunk(JfrReader.java:216) ~[spark-1.8.14-bukkit (1).jar:?] at me.lucko.spark.common.sampler.async.jfr.JfrReader.<init>(JfrReader.java:80) ~[spark-1.8.14-bukkit (1).jar:?] at me.lucko.spark.common.sampler.async.AsyncSampler.aggregateOutput(AsyncSampler.java:180) ~[spark-1.8.14-bukkit (1).jar:?] at me.lucko.spark.common.sampler.async.AsyncSampler.toProto(AsyncSampler.java:160) ~[spark-1.8.14-bukkit (1).jar:?] at me.lucko.spark.common.command.modules.SamplerModule.handleUpload(SamplerModule.java:308) ~[spark-1.8.14-bukkit (1).jar:?] at me.lucko.spark.common.command.modules.SamplerModule.profilerStop(SamplerModule.java:302) ~[spark-1.8.14-bukkit (1).jar:?] at me.lucko.spark.common.command.modules.SamplerModule.profiler(SamplerModule.java:136) ~[spark-1.8.14-bukkit (1).jar:?] at me.lucko.spark.common.command.modules.SamplerModule$$Lambda$4916/0x000000002cfdd2d0.execute(Unknown Source) ~[spark-1.8.14-bukkit (1).jar:?] at me.lucko.spark.common.SparkPlatform.executeCommand0(SparkPlatform.java:387) ~[spark-1.8.14-bukkit (1).jar:?] at me.lucko.spark.common.SparkPlatform.lambda$executeCommand$2(SparkPlatform.java:300) ~[spark-1.8.14-bukkit (1).jar:?] at me.lucko.spark.common.SparkPlatform$$Lambda$5290/0x000000002cff9e78.run(Unknown Source) ~[spark-1.8.14-bukkit (1).jar:?] at org.bukkit.craftbukkit.v1_18_R2.scheduler.CraftTask.run(CraftTask.java:101) ~[purpur-1.18.2.jar:git-Purpur-1609] at org.bukkit.craftbukkit.v1_18_R2.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57) ~[purpur-1.18.2.jar:git-Purpur-1609] at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[purpur-1.18.2.jar:git-Purpur-1609] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?] at java.lang.Thread.run(Thread.java:884) ~[?:?]
Purpur 1.18.2 Server running on a Pterodactyl container with 3 threads assigned. I've also noticed that it happens only when using OpenJ9 Java17 and after the profiler has been running for several minutes (If I stop it in just a few seconds, it works fine)
I also can't run the profiler again unless I restart the server as it gives me this error, and when I try to start the profiler again, it just says that "An active profiler is already running.":
spark profiler --stop [17:17:00 WARN]: [spark] Plugin spark v1.8.14 generated an exception while executing task 19 java.lang.IllegalStateException: Profiler is not active at me.lucko.spark.lib.asyncprofiler.AsyncProfiler.stop(AsyncProfiler.java:90) ~[spark-1.8.14-bukkit (1).jar:?] at me.lucko.spark.common.sampler.async.AsyncSampler.stop(AsyncSampler.java:148) ~[spark-1.8.14-bukkit (1).jar:?] at me.lucko.spark.common.command.modules.SamplerModule.profilerStop(SamplerModule.java:295) ~[spark-1.8.14-bukkit (1).jar:?] at me.lucko.spark.common.command.modules.SamplerModule.profiler(SamplerModule.java:136) ~[spark-1.8.14-bukkit (1).jar:?] at me.lucko.spark.common.command.modules.SamplerModule$$Lambda$4916/0x000000002cfdd2d0.execute(Unknown Source) ~[spark-1.8.14-bukkit (1).jar:?] at me.lucko.spark.common.SparkPlatform.executeCommand0(SparkPlatform.java:387) ~[spark-1.8.14-bukkit (1).jar:?] at me.lucko.spark.common.SparkPlatform.lambda$executeCommand$2(SparkPlatform.java:300) ~[spark-1.8.14-bukkit (1).jar:?] at me.lucko.spark.common.SparkPlatform$$Lambda$5290/0x000000002cff9e78.run(Unknown Source) ~[spark-1.8.14-bukkit (1).jar:?] at org.bukkit.craftbukkit.v1_18_R2.scheduler.CraftTask.run(CraftTask.java:101) ~[purpur-1.18.2.jar:git-Purpur-1609] at org.bukkit.craftbukkit.v1_18_R2.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57) ~[purpur-1.18.2.jar:git-Purpur-1609] at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[purpur-1.18.2.jar:git-Purpur-1609] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?] at java.lang.Thread.run(Thread.java:884) ~[?:?]
Please try again using the latest version - https://spark.lucko.me/download :)
Should be fixed by 4fa2117
Issue should be reopened since the issue was not fixed:
[11:31:09 INFO]: [⚡] The active profiler has been stopped! Uploading results...
[11:31:09 ERROR]: [spark] Exception occurred whilst executing a spark command
[11:31:09 WARN]: java.nio.BufferUnderflowException
[11:31:09 WARN]: at java.base/java.nio.Buffer.nextGetIndex(Buffer.java:699)
[11:31:09 WARN]: at java.base/java.nio.DirectByteBuffer.get(DirectByteBuffer.java:324)
[11:31:09 WARN]: at spark-1.9.33-bukkit.jar//me.lucko.spark.common.sampler.async.jfr.JfrReader.getVarint(JfrReader.java:455)
[11:31:09 WARN]: at spark-1.9.33-bukkit.jar//me.lucko.spark.common.sampler.async.jfr.JfrReader.readConstantPool(JfrReader.java:280)
[11:31:09 WARN]: at spark-1.9.33-bukkit.jar//me.lucko.spark.common.sampler.async.jfr.JfrReader.readChunk(JfrReader.java:216)
[11:31:09 WARN]: at spark-1.9.33-bukkit.jar//me.lucko.spark.common.sampler.async.jfr.JfrReader.<init>(JfrReader.java:80)
[11:31:09 WARN]: at spark-1.9.33-bukkit.jar//me.lucko.spark.common.sampler.async.AsyncSampler.aggregateOutput(AsyncSampler.java:186)
[11:31:09 WARN]: at spark-1.9.33-bukkit.jar//me.lucko.spark.common.sampler.async.AsyncSampler.toProto(AsyncSampler.java:166)
[11:31:09 WARN]: at spark-1.9.33-bukkit.jar//me.lucko.spark.common.command.modules.SamplerModule.handleUpload(SamplerModule.java:306)
[11:31:09 WARN]: at spark-1.9.33-bukkit.jar//me.lucko.spark.common.command.modules.SamplerModule.profilerStop(SamplerModule.java:300)
[11:31:09 WARN]: at spark-1.9.33-bukkit.jar//me.lucko.spark.common.command.modules.SamplerModule.profiler(SamplerModule.java:134)
[11:31:09 WARN]: at spark-1.9.33-bukkit.jar//me.lucko.spark.common.SparkPlatform.executeCommand0(SparkPlatform.java:382)
[11:31:09 WARN]: at spark-1.9.33-bukkit.jar//me.lucko.spark.common.SparkPlatform.lambda$executeCommand$2(SparkPlatform.java:292)
[11:31:09 WARN]: at org.bukkit.craftbukkit.v1_19_R1.scheduler.CraftTask.run(CraftTask.java:101)
[11:31:09 WARN]: at org.bukkit.craftbukkit.v1_19_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57)
[11:31:09 WARN]: at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22)
[11:31:09 WARN]: at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
[11:31:09 WARN]: at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
[11:31:09 WARN]: at java.base/java.lang.Thread.run(Thread.java:833)```