
/spark profiler stop errors and fails to output a link
Trinsdar opened this issue · 2 comments
Description
seems running /spark profiler stop errors when it's started with the --only-ticks-over
flag
Reproduction Steps
start a server with spark
start a profiler with --only-ticks-over, any number will do (probably)
after a while, stop said profile
Expected Behaviour
it doesn't error when runing the stop command and instead outputs a link
Platform Information
- Minecraft Version: 1.18.2
- Platform Type: server
- Platform Brand: Forge
- Platform Version: 40.2.9
- OS: arch linux
Spark Version
1.10.38
Logs and Configs
[19:37:09] [spark-worker-pool-1-thread-2/INFO] [minecraft/DedicatedServer]: [⚡] Stopping the profiler & uploading results, please wait...
[19:37:09] [spark-worker-pool-1-thread-2/ERROR] [spark/]: Exception occurred whilst executing a spark command
java.util.concurrent.RejectedExecutionException: Task java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask@700c038[Not completed, task = java.util.concurrent.Executors$RunnableAdapter@450150a1[Wrapped task = me.lucko.spark.common.sampler.java.TickedDataAggregator$TickList@42c2380a]] rejected from java.util.concurrent.ScheduledThreadPoolExecutor@331f11a5[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 37462]
at java.base/java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2065)
at java.base/java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:833)
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor.delayedExecute(ScheduledThreadPoolExecutor.java:340)
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor.schedule(ScheduledThreadPoolExecutor.java:562)
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor.submit(ScheduledThreadPoolExecutor.java:715)
at TRANSFORMER/[email protected]/me.lucko.spark.common.sampler.java.TickedDataAggregator.pushCurrentTick(TickedDataAggregator.java:119)
at TRANSFORMER/[email protected]/me.lucko.spark.common.sampler.java.TickedDataAggregator.getMetadata(TickedDataAggregator.java:78)
at TRANSFORMER/[email protected]/me.lucko.spark.common.sampler.AbstractSampler.writeMetadataToProto(AbstractSampler.java:183)
at TRANSFORMER/[email protected]/me.lucko.spark.common.sampler.java.JavaSampler.toProto(JavaSampler.java:196)
at TRANSFORMER/[email protected]/me.lucko.spark.common.command.modules.SamplerModule.handleUpload(SamplerModule.java:422)
at TRANSFORMER/[email protected]/me.lucko.spark.common.command.modules.SamplerModule.profilerStop(SamplerModule.java:408)
at TRANSFORMER/[email protected]/me.lucko.spark.common.command.modules.SamplerModule.profiler(SamplerModule.java:141)
at TRANSFORMER/[email protected]/me.lucko.spark.common.SparkPlatform.executeCommand0(SparkPlatform.java:430)
at TRANSFORMER/[email protected]/me.lucko.spark.common.SparkPlatform.lambda$executeCommand$2(SparkPlatform.java:339)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:833)
Extra Details
I've managed to get it to succeed one time while using only ticks over flag, not sure why it worked that time cause the next time I tried with the exact same number it failed again
i have a similar issue on stoneblock 3 modpack server, i run the profiler any of them when stop and create the link on console generate a error and the website says "Uh oh. An unexpected error occurred with spark-viewer client.". Same modpack but no server only client on local world works. The server was made with ftb server installer.
Here the logs:
"""
[spark-worker-pool-1-thread-3/INFO] [minecraft/DedicatedServer]: [⚡] Stopping the profiler & uploading results, please wait...
java.lang.reflect.UndeclaredThrowableException
at TRANSFORMER/jdk.proxy3/jdk.proxy3.$Proxy116.getTotalSwapSpaceSize(Unknown Source) at TRANSFORMER/[email protected]/me.lucko.spark.common.monitor.memory.MemoryInfo.getUsedSwap(MemoryInfo.java:60)
at TRANSFORMER/[email protected]/me.lucko.spark.common.platform.PlatformStatisticsProvider.getSystemStatistics(PlatformStatisticsProvider.java:81)
at TRANSFORMER/[email protected]/me.lucko.spark.common.sampler.AbstractSampler.writeMetadataToProto(AbstractSampler.java:201)
at TRANSFORMER/[email protected]/me.lucko.spark.common.sampler.async.AsyncSampler.toProto(AsyncSampler.java:224)
at TRANSFORMER/[email protected]/me.lucko.spark.common.command.modules.SamplerModule.handleUpload(SamplerModule.java:422)
at TRANSFORMER/[email protected]/me.lucko.spark.common.command.modules.SamplerModule.profilerStop(SamplerModule.java:408)
at TRANSFORMER/[email protected]/me.lucko.spark.common.command.modules.SamplerModule.profiler(SamplerModule.java:141)
at TRANSFORMER/[email protected]/me.lucko.spark.common.SparkPlatform.executeCommand0(SparkPlatform.java:430)
at TRANSFORMER/[email protected]/me.lucko.spark.common.SparkPlatform.lambda$executeCommand$2(SparkPlatform.java:339)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
Caused by: javax.management.InstanceNotFoundException: java.lang:type=OperatingSystem at java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getMBean(Unknown Source)
at java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getAttribute(Unknown Source)
at java.management/com.sun.jmx.mbeanserver.JmxMBeanServer.getAttribute(Unknown Source)
at java.management/com.sun.jmx.mbeanserver.MXBeanProxy$GetHandler.invoke(Unknown Source)
at java.management/com.sun.jmx.mbeanserver.MXBeanProxy.invoke(Unknown Source)
at java.management/javax.management.MBeanServerInvocationHandler.invoke(Unknown Source)
... 16 more
I can't find that error that promp me at the console in the logs file, mybe spark save his logs elsewere?
Hello, I was having the exact same issue because I was running my forge server (1.20.1) in a Docker container. After huge research I finally found the solution on another Github issue, you can try adding -XX:-UseContainerSupport
to your JVM (in user_jvm_args.txt for modern forge versions or directly in your startup bash script after java
) if you use Docker or another virtualization technology of course.