dynmap icon indicating copy to clipboard operation
dynmap copied to clipboard

Two Issues on .30 update. Error and CPU% spike

Open LigerXT5 opened this issue 14 years ago • 12 comments

I recently updated to Dynmap .30 and noticed a couple issues. When a user accesses the dynmap via the url, a couple errors appear in the server log.

2012-01-26 14:56:07 [SEVERE] [dynmap] Exception occured: java.util.concurrent.ExecutionException: java.lang.ArrayIndexOutOfBoundsException: -326655 at java.util.concurrent.FutureTask$Sync.innerGet(Unknown Source) at java.util.concurrent.FutureTask.get(Unknown Source) at org.dynmap.MapManager$FullWorldRenderState.run(MapManager.java:552) at org.dynmap.MapManager$DynmapScheduledThreadPoolExecutor$1.run(MapManager.java:177) at org.dynmap.MapManager$DynmapScheduledThreadPoolExecutor$2.run(MapManager.java:193) at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(Unknown Source) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: java.lang.ArrayIndexOutOfBoundsException: -326655 at org.dynmap.hdmap.TexturePack.biomeLookup(TexturePack.java:1397) at org.dynmap.hdmap.TexturePack.readColor(TexturePack.java:1371) at org.dynmap.hdmap.TexturePackHDShader$ShaderState.processBlock(TexturePackHDShader.java:153) at org.dynmap.hdmap.IsoHDPerspective$OurPerspectiveState.visit_block(IsoHDPerspective.java:611) at org.dynmap.hdmap.IsoHDPerspective$OurPerspectiveState.raytrace(IsoHDPerspective.java:632) at org.dynmap.hdmap.IsoHDPerspective$OurPerspectiveState.access$400(IsoHDPerspective.java:92) at org.dynmap.hdmap.IsoHDPerspective.render(IsoHDPerspective.java:1107) at org.dynmap.hdmap.HDMapTile.render(HDMapTile.java:96) at org.dynmap.MapManager$FullWorldRenderState.processTile(MapManager.java:625) at org.dynmap.MapManager$FullWorldRenderState.access$800(MapManager.java:210) at org.dynmap.MapManager$FullWorldRenderState$1.call(MapManager.java:541) at org.dynmap.MapManager$FullWorldRenderState$1.call(MapManager.java:539) ... 7 more 2012-01-26 15:12:05 [SEVERE] [dynmap] Unable read the file '/home/hgs883/plugins/dynmap/web/js/leaflet.js' or respond to the HTTP-request. org.eclipse.jetty.io.EofException at org.eclipse.jetty.http.HttpGenerator.flushBuffer(HttpGenerator.java:919) at org.eclipse.jetty.http.AbstractGenerator.blockForOutput(AbstractGenerator.java:536) at org.eclipse.jetty.http.AbstractGenerator.flush(AbstractGenerator.java:456) at org.eclipse.jetty.server.HttpOutput.flush(HttpOutput.java:90) at org.eclipse.jetty.server.HttpConnection$Output.flush(HttpConnection.java:1001) at org.eclipse.jetty.server.HttpConnection$Output.sendContent(HttpConnection.java:1108) at org.eclipse.jetty.server.handler.ResourceHandler.handle(ResourceHandler.java:414) at org.dynmap.servlet.FileLockResourceHandler.handle(FileLockResourceHandler.java:33) at org.dynmap.web.HandlerRouter.handle(HandlerRouter.java:51) at org.dynmap.web.FilterHandler$1.doFilter(FilterHandler.java:56) at org.dynmap.web.CustomHeaderFilter.doFilter(CustomHeaderFilter.java:32) at org.dynmap.web.FilterHandler$1.doFilter(FilterHandler.java:54) at org.dynmap.web.BanIPFilter.doFilter(BanIPFilter.java:33) at org.dynmap.web.FilterHandler$1.doFilter(FilterHandler.java:54) at org.dynmap.web.FilterHandler.handle(FilterHandler.java:60) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:110) at org.eclipse.jetty.server.Server.handle(Server.java:350) at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:442) at org.eclipse.jetty.server.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:910) at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:565) at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:217) at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:46) at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:545) at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:43) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:598) at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:533) at java.lang.Thread.run(Unknown Source) Caused by: java.io.IOException: Broken pipe at sun.nio.ch.FileDispatcherImpl.write0(Native Method) at sun.nio.ch.SocketDispatcher.write(Unknown Source) at sun.nio.ch.IOUtil.writeFromNativeBuffer(Unknown Source) at sun.nio.ch.IOUtil.write(Unknown Source) at sun.nio.ch.SocketChannelImpl.write(Unknown Source) at org.eclipse.jetty.io.nio.ChannelEndPoint.flush(ChannelEndPoint.java:230) at org.eclipse.jetty.io.nio.SelectChannelEndPoint.flush(SelectChannelEndPoint.java:292) at org.eclipse.jetty.http.HttpGenerator.flushBuffer(HttpGenerator.java:858) ... 26 more

After doing some checking, I noticed the server is using around 100% CPU. I purged the render queue, still have the issue. Currently no one on while checking this. /dynmap stats shows clear and all 0.

Thoughts?

LigerXT5 avatar Jan 26 '12 23:01 LigerXT5

The first exception is caused by the biome data returning an invalid value - likely caused by a biome plugin that doesn't restrict the raw biome data to the proper ranges.

The second is a benign exception caused by the browser being terminated during a transfer - we'll not report this in the future, but it doesn't cause problems.

If the render queie is empty and no fullrender is running I'm quite sure we don't use CPU - if you have data that supports the notion that we're using the CPU in those cases, versus some other code, please share it

mikeprimm avatar Jan 27 '12 05:01 mikeprimm

I did a basic troubleshoot technique I should have done before hand, it's not dynmap causing the lag. I removed it from the plugins folder and restarted the server. Still high cpu. I need to find out what other plugin I recently updated that is causing this issue now.

Thanks for the help.

The first exception, could it result to a possible world biome issue? I have gotten a couple reports of snow and ice in regions that didn't have before. I'm just hoping my main world did bug out at some point. :/

Edit: CPU issue related to a new plugin I was trying out. BukkitLink.

LigerXT5 avatar Jan 27 '12 06:01 LigerXT5

If it's been updated, take a look at a plugin called BukkitInsider - provides a VERY detailed look as to how much event processing is happening, and how much time each plugin is taking to handle them. This is often more than enough to gauge who is being 'bad' - I know I use it to make sure we're being 'good' (since we've got massive potential to be bad!).

mikeprimm avatar Jan 27 '12 14:01 mikeprimm

Also, give the latest development build of 0.30.1 a go - it should take care of the bogus exception reporting.

mikeprimm avatar Jan 27 '12 14:01 mikeprimm

On the first exception - there was a biome related mod I recall confirming a problem with (basically, raw biome temperature and rainfall data is all required to be between 0.0 and 1.0, and it was not following that contract). Custom world generators can definitely mess with this, as well - if you give me a list of any plugins that have anything to do with biome or world generation that you're using, I'll give them a look.

mikeprimm avatar Jan 27 '12 14:01 mikeprimm

I'll install .30.1 later today after my last college class.

The only world generation plugins I can think of at this moment is Multiverse and terrain-control. My guess is terrain-control.

I'll take a look into the bukkitinsider plugin next time I have a cpu spiking issue. For now, it's come down to either BukkitLink or Orebfuscator. If I have either one installed, cpu spikes to 100%. Without them, and leaving the other 70-78 plugins, cpu idles around 15-25% with a few players. http://m-c-den.blogspot.com/2011/10/plugins-on-server.html

LigerXT5 avatar Jan 27 '12 16:01 LigerXT5

Yep - 99.9% likely its terrain-control related (I just looked at it). I made a world, and was able to make a world with default settings and render OK - I'm using the latest code for them (1.2.14) with the 1.1-R1 RB (1818). Have you tailored your configuration of the Terrain Control world experiencing the problem? If so, could you share the configuration data (zip up plugins/TerrainControl/worlds)?

mikeprimm avatar Jan 27 '12 18:01 mikeprimm

I don't have any worlds generated (and kept) as of yet. I'm still tinkering on a config to make a full 0-128 mining world (extending the ground). Other than that, the plugin is just sitting there, taking up space.

I need to go in and update the plugin, I'm still using 1.2.11, which was the newest until about 5 hours ago. (5hrs ago 1.2.14 came out :S )

If you'd like, I'll send you a full list of the plugins (and versions) including the filtered ones from the /plugins and on the site. Would rather not put it publicly.

LigerXT5 avatar Jan 27 '12 18:01 LigerXT5

If its convenient - I'm going to add some safety checking on that path, anyway (just going to stop trusting the API to respect the limits), so 0.30.1 should not experience the problem, independent of cause.

mikeprimm avatar Jan 27 '12 19:01 mikeprimm

I installed the new dynmap update and bukkitinsider. I ran what I think was the needed command, introspect scheduler. I see a few plugins set to use -1 ticks while others are either 1 or a higher number. What command(s) should I be using and what should I be looking for exactly? Here is a log of when I use introspect all right after startup: http://hgs883.hostedd.com/misc/introspectStartup-1-27-2012.txt If I wait, the CPU% goes down. http://hgs883.hostedd.com/misc/introspectWait-1-27-2012.txt

Minor off topic: I noticed after adding MixedSlabs (spout plugin), dynmap will freeze after Spout Detected and fail to start. I'll let the author of the plugin know.

LigerXT5 avatar Jan 27 '12 22:01 LigerXT5

None of your event load looks suspicious - which would suggest that the load is in the scheduled tasks. The large number of JSONAPI jobs is suspicious, but seems consistent between the two cases. Unfortuntately, BukkitInsider doesn't measure how much time the scheduled jobs spend running....

mikeprimm avatar Jan 28 '12 13:01 mikeprimm

Idle - please reopen with more details if problem persists with current CB and Dynmap 0.32 or later

mikeprimm avatar Feb 16 '12 19:02 mikeprimm