Slimefun

Slimefun

3M Downloads

Slimefun "Block Storage" Memory Leak

Agaloth opened this issue · 4 comments

commented

❗ Checklist

  • I am using the official english version of Slimefun and did not modify the jar.
  • I am using an up to date "DEV" (not "RC") version of Slimefun.
  • I am aware that issues related to Slimefun addons need to be reported on their bug trackers and not here.
  • I searched for similar open issues and could not find an existing bug report on this.

📍 Description

private final Map<Location, Config> storage = new ConcurrentHashMap<>();

This object grows without bounds which causes a memory leak.

📑 Reproduction Steps

  1. Just run slimefun for 18+ hours

💡 Expected Behavior

Memory leak

📷 Screenshots / Videos

image
image

📜 Server Log

No response

📂 /error-reports/ folder

No response

💻 Server Software

Other (please specify in your description)

🎮 Minecraft Version

1.17.x

⭐ Slimefun version

Pufferfish git-Pufferfish-6 (MC: 1.17.1)
Slimefun DEV - 1014 (git f431aa6)
Metrics-Module #28
Java 16

Installed Addons: (7)
CMILib v1.1.1.1
ShopGUIPlus v1.74.0
DeluxeCombat v1.40.1
EcoPower vDEV - 5 (git 5c1ecd68)
ItemsAdder v3.1.2
ExoticGarden vDEV - 78 (git 7f9a5f63)
ChestTerminal vDEV - 44 (git 3115957d)

🧭 Other plugins

No response

commented

I wish people would stop opening like JProfiler (or the many likes) and jumping to memory leak on a "suspect"

The BlockStorage uses tons of memory (way more than it should) yes. That is caused by the way it's implemented (it sucks, we know). That does not mean it has a memory leak. Wouldn't surprise me if we did somewhere, however, we'd have actual reports if there was one here.

Apparently Paper also has a memory leak if you just read a suspect and say it's confirmed.

If you dig into the data and see memory being held which shouldn't be by all means reopen the report. I'd love to fix a memory leak if we have one however, there's no information here to indicate we actually do have one. You haven't even OOM'd. I'd love to see more data if you actually do suspect a memory leak but the few times people do claim there is one, it's literally just this same screenshot... that isn't real info. It's just a suggestion there could be a memory leak due to the excessive memory being taken by a single instance (which, in this case isn't actually true)

I'm not saying this to absolve Slimefun for its memory usage FYI, it's really bad. However, until I have time to really spend on creating BlockStorage v2, this is the way it is currently. It should use less but no one is actually having issues so it isn't super urgent to fix immediately.

commented

I mean, my server do OOM's daily, it's just that one time I could catch that before it OOM'ed

commented

Again, if you have more data feel free to provide it. I'd love to dig into it. However, just posting a screenshot which gives nothing isn't helpful.

Are you actually seeing characteristics of a memory leak? Can you actually tie it back to Slimefun? Do you not just need more memory? What data is being held that shouldn't be?

We really need more than "ah program said you maybe leak fix now pls"

provide the actual heap, provide plugin list, provide anything of substance. It's just very hard to do anything from no info at all. Even with the actual heap, I don't know what shouldn't be held anymore (since well, it isn't my server)

commented

For sure, can I provide the heap and plugin list via discord? I use 16gb ram which is more than enough for minecraft.