Logistics Pipes

Logistics Pipes

13M Downloads

LPTickHandler leaks World instances

fraenkelc opened this issue ยท 3 comments

commented

Versions:

  • FTB Infinity 2.3.5
  • logisticspipes-0.9.3.70.jar
  • mystcraft-1.7.10-0.12.3.01.jar

We are currently encountering severe memory leaks on our FTB Infinity Instance. We currently run out of memory roughly every 90 minutes. We took some heap dumps which revealed the following:

  • The total memory usage is 3.1GB
  • 65 Instances of com.xcompwiz.mystcraft.world.profiling.ChunkProfiler take up 1.874.922.416 bytes
    image
  • Of these one is reachable via net.minecraft.server.dedicated.DedicatedServer. The rest are only reachable via logisticspipes.ticks.LPTickHandler (the retained heap values are misleading):
    image

To see how long these World instances where alive I've grouped the values of logisticspipes.ticks.LPTickHandler.LPWorldInfo.worldTick:
image
as seen, most of these instances live for just shy of a minute (this report also includes non-mystcraft worlds (rftools) which do not have a ChunkProfiler)

This leads me to the conclusion that logisticspipes.ticks.LPTickHandler.worldInfo needs to use a hashmap with weak / soft keys. (That, or the map needs to be cleaned in another way)

commented
new MapMaker()
       .weakKeys()
       .makeMap()

should do it.

commented

com.google.* libs? it is certainly not slow down performance?

commented