delvr / Farseek

A Scala API for Minecraft mods.
https://minecraft.curseforge.com/projects/farseek
20 stars 4 forks source link

StructureGenerationChunkProvider might be retaining chunks forever. #8

Closed fluffle closed 7 years ago

fluffle commented 8 years ago

Hi!

I'm playing TechNodefirmacraft, a mod pack that includes this mod. I've run into some problems with performance on my server (https://github.com/Bunsan/TechNodeFirmaCraft/issues/46) that I have traced back to constant concurrent-mode garbage collections. I grabbed a heap dump while the server was in this state and found that it had over 7000 chunks on the heap.

As I stated on the other bug:

2545 are directly held live by a farseek.world.gen.structure.StructureGenerationChunkProvider and its loadedChunks hash map. Another 4756 are directly referenced by nothing in particular according to the MAT dominator tree, but some poking around finds a com.bioxx.tfc.Chunkdata.ChunkDataManager that appears to be holding references to most of them.

https://github.com/delvr/Farseek/blob/release-1.0.10/src/main/scala/farseek/world/gen/structure/StructureGenerationChunkProvider.scala

The comment on line 47 is telling:

// Note that since we don't recreate structures on world load, reloaded chunks can be "generated through" and won't be unloaded, but this should remain a small number

Is this what's happening to me? I don't quite understand the comment and i'm not particularly familiar with Scala, but it does seem a little coincidental :-)

delvr commented 8 years ago

Hi fluffle!

Thanks for letting me know about this, I will take a look at get back to you.

-delvr.

delvr commented 7 years ago

This should be fixed in the new 1.9.4-2.0 version; I will look into backporting the fix to 1.7.10 when I get the chance.

GunmetalGears commented 7 years ago

Hi there; I am having this exact same problem with TerraFirmaCraft and Streams; StructureGenerationChunkProvider causes my server to time out and stop working, preventing exploration.

I don't want to seem rude or needy, but has there been any progress on backporting a fix for this to 1.7.10? Thank you!

delvr commented 7 years ago

Sorry for the delay that one - backporting of this and other fixes in in progress. I'm seeing some incompatibilities with TFC which are being worked on.

GunmetalGears commented 7 years ago

That's great to hear; I'm real glad to hear that you haven't abandoned the backport or anything. Thanks again.

On Sun, Jan 22, 2017 at 4:23 PM, delvr notifications@github.com wrote:

Sorry for the delay that one - backporting of this and other fixes in in progress. I'm seeing some incompatibilities with TFC which are being worked on.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/delvr/Farseek/issues/8#issuecomment-274372638, or mute the thread https://github.com/notifications/unsubscribe-auth/AWVFurdPXxaYJdOsG1px1ezSGFkyURh0ks5rU_L3gaJpZM4HuRH4 .

delvr commented 7 years ago

I backported the fix in Farseek 1.1 for 1.7.10: https://minecraft.curseforge.com/projects/farseek/files/2377895 . Please give it a try and let me know if it improves things.

GunmetalGears commented 7 years ago

Really sorry it took me so long to get back to you! I forgot to check my email for a few days and didn't notice I'd gotten a reply.

This has fixed the issue, and Farseek is no longer causing problems! Thank you so much, I really can't express how much this helps. Please, stay awesome!

On Sat, Feb 4, 2017 at 3:37 PM, delvr notifications@github.com wrote:

I backported the fix in Farseek 1.1 for 1.7.10: https://minecraft.curseforge.com/projects/farseek/files/2377895 . Please give it a try and let me know if it improves things.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/delvr/Farseek/issues/8#issuecomment-277486189, or mute the thread https://github.com/notifications/unsubscribe-auth/AWVFuoKzL36QoxEtQ_sGm_yOEoPTFdLXks5rZQulgaJpZM4HuRH4 .

delvr commented 7 years ago

That's great to hear, thanks for letting me know!

-delvr.