-
-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Memory leak Aequivaleo v0.1.132 #26
Comments
For a quick check view you can use |
Hello, I've just encountered this issue while testing Replication and after some investigation I believe I can share some insight as to the cause of the issue. With issues such as these, there tend not to be any good ways to demonstrate the problem outside of a live environment or a heap dump since there aren't any useful logs generated. Unfortunately, in this case, a heap dump illustrating the issue will be on the order of gigabytes (mine is ~11GB). Therefore I will instead provide the steps necessary to demonstrate/investigate the problem locally.
I obtained the following screenshot from the EMA dominator tree: As can be seen, the cycle reduction mechanism is holding reachable objects using 43.3% of allocated heap; these objects cannot be released to collection as they are still being used by the cycle detector. The process of reducing cycles in the recipe graph is rather memory-intensive, with memory utilization scaling significantly with the number of recipes (specifically, with recipe cycles) present in a modpack. Another important piece of evidence is the fact that an otherwise-identical modpack with no recipes (removed by datapack or KubeJS) will not experience this issue. Therefore, my conclusion is that the issue is the result of the combinatorial explosion of recipe cycles that naturally occur in modpacks of sufficient size, or in any modpack with significant loopback in the included recipes. I'm willing to conjecture that this issue doesn't seem to occur in Aequivaleo-only installations (or in small modpacks) since the cycle reduction mechanism simply does its work and then is disposed during collection; whereas with larger packs there is exponentially more resources required in unwinding the recipe graph, so the mechanism will simply keep using more and more memory - giving the appearance of a memory leak. I regard this as a rather serious issue as the "conventional wisdom" of doing a binary search (removing half of mods, reload, repeat) to find the culprit will not work in this situation as the problem arises from the interaction between many mods in a modpack and is not really the fault of any single one. Modpack makers, operating in good faith and using this strategy will inevitably misidentify the "culprit", which could cause reputational harm to the misidentified mod. In conclusion - if there is not a feasible way to reduce the overhead of this process, and it is not feasible to implement a "static" mode (such that modpack makers can precompute the recipe graph analysis data and save it somehow to be distributed with their modpack), then I must recommend posting a disclaimer as to the potentially very high resource usage of this mod. |
Hello, yes I am aware of this. That rebuild of the engine passed internal test hurdles today, so lets hope I can get it to work in production test cases. |
Thank you for your time, work, and attention! |
a couple of issues, one major, several minor surfaced yesterday. Once that is fixed I think I am pretty close to a release |
Just ended up here after a day and a half of troubleshooting a private pack of mine. Managed to narrow it down to this mod through a ridiculously tedious process of trial and error. When my main pack broke, I created a copy of it, deleted all the mods and then installed 10 at a time and tested, repeatedly, until it broke. For me, it broke on "Joining World..." and would hang there forever. I got it to load BARELY with 48GB of RAM allocated at one point just to see what would happen if I did that LOL. But with any sane amount of memory it would hang on joining world. When the test pack finally did break, I turned off the last 10 mods I added and it still remained broken, so I tried disabling the core mods for those 10 mods, which fixed it. After that, I re-enabled one of the three mods along with it's core mod to see which one was broken, and I found that Replication, which requires Aequivaleo, caused it to break. But it was not Replication, it was Aequivaleo. Long story short, it took a LOT of testing everything I could think of, but it brought me to this mod, and thus, this github page. Fortunately I am not the only one with this problem, as this thread details exactly the issue I discovered, and explains WHY the mod is causing the issue. I'm going to stick around here for an update to test, because I was really looking forward to testing Replication (which yknow, needs this mod lol) |
After a lot of testing, I found that it is Aequivaleo v0.1.132
sorry I don't have more information it was a bit tricky to debug
not sure if it's an incompatibility with another mod or not...
Note this shows up, especially on forge server (v47.2.31)
the server will run out of memory while idle after about an hour or so on 12gbs of memory
This is not the case when the mod is removed the server is currently still running after 12+ hours, with only 2-3bgs of memory usage while idle
The issue can be reproduced on this pack version v0.11 on both Windows and Ubuntu
https://legacy.curseforge.com/minecraft/modpacks/lessstress
The text was updated successfully, but these errors were encountered: