EnigmaticaModpacks / Enigmatica6

The official repository and issue-tracker for Enigmatica 6
https://www.curseforge.com/minecraft/modpacks/enigmatica6
240 stars 528 forks source link

Repeatable out of memory condition #4469

Open Old-Man-D opened 2 years ago

Old-Man-D commented 2 years ago

Modpack Version

Expert 1.0.0

Describe your issue.

I am having this reoccurring out of memory condition that keeps closing out my session, forcing me to restart the client to resolve. It occurs after a few hours of playing, usually about 2-3 hours. I have tried allocating between 8 and 14 GB of ram, I have 32 total. nothing seems to change in regards to this crash.

Crash Report

No response

Latest Log

https://gist.github.com/Old-Man-D/0ed6e20f6f07ada509c4176a6983371e

Have you modified the modpack?

Yes

User Modifications

I have added optifine and the mod "Item Zoom". The Item zoom mod is a recent addition, it was crashing before it was added. I am willing to dump optifine, but the last time I loaded up without it, the emoji mod crashed me within minutes.

Did the issue happen in singleplayer or on a server?

Server

NielsPilgaard commented 2 years ago

Thanks for the report.

A crash report would be helpful here :)

Old-Man-D commented 2 years ago

It's not producing a crash report. What it is doing is closing the connection to the server with the message that it was out of memory. This does not crash the client, it just brings you back to the main menu. But if you try and reconnect to the server, it errors out. I have had to restart the client to be able to reconnect to the server. The next time it happens, I will get screenshots of the specific messages. I am also going to disable optifine again and see if I can get more information that way too.

NielsPilgaard commented 2 years ago

Ah okay, thanks for clearing that up. Please try adding these Java Arguments and see if they help: https://wiki.enigmatica.net/main/help-desk/guides/performance-tweaks#jvm-arguments

You can add them in the Minecraft settings in the CurseForge App

Performance Tweaks
Old-Man-D commented 2 years ago

yeah, those are the jvm arguments I have.

User-12691296 commented 2 years ago

Does it work when you don't use shaders nor Optifine? Both of those, especially Optifine, are known to cause problems and crashes with this modpack

Old-Man-D commented 2 years ago

I am going to do more testing without optifine. However, it seems as though other people in the discord have similar problems without optifine. like there is a memory leak in a mod. My suspicion is Ars Nouveau based simply on other issue recorded here.

johnnylingster commented 2 years ago

I can confirm that the server myself and 3 friends are on have the same issue. kicks us out of the server after so long. I start at 7 gig for Enigmatica for memory, when it gets to 10 and a half, it kicks us.

johnnylingster commented 2 years ago

this is a screenshot of a log from our server if it'll help. Screenshot_20220322-183320

Old-Man-D commented 2 years ago

Ok, I just had the crash again, this time without any optifine. Screenshot 2022-03-23 021718

What it did was cause the client to completely close, however it did not produce a crash report. (actually, maybe I hit "quit game", I can't quite remember).
latest.log

Old-Man-D commented 2 years ago

Here is the server console:

Screenshot 2022-03-23 022755

DiceGolem commented 2 years ago

Our experience is similar. We would play for a little over an hour before the client would leave the world unexpectedly, show a Saving World message, and then either the screen Old-Man-D posted or this one: Out of memory error 3-22-2022

In either case, it was the client closing down the world as our server continued. When one of us errored the others kept playing.

johnnylingster and I both ran a brand new single player world for hours with no issue. His ran overnight and I actively played, so it suggests it might be something in our multiplayer world that didn't like the update. We came from modpack version 0.5.25.

Schweigsam83 commented 2 years ago

With me and my wife it is the same. Running on a dedicated server. No extra mods. It's occuring both on a old World from 0.5.25 to 1.0 and a new from 1.0.The server itself is stable. But the clients run out of memory and need a restart to work properly again. Different jvm arguements and different Java/Adoptium versions. Same effects. In the log ar different unspecific null-pointer errors without to see from where. "[main/ERROR]: java.lang.NullPointerException"

Old-Man-D commented 2 years ago

In case it is relevant, our server and my instances of E6E are both on 1.0.0 and were started on this version, they were not upgraded from earlier versions.

NielsPilgaard commented 2 years ago

Hmm.. Could you please try removing the mod Starlight and see if the issue persists?

Old-Man-D commented 2 years ago

sure. is that a client side mod? or would I have to get the server owner to also remove it?

Schweigsam83 commented 2 years ago

loaded without starlight-mod still same error on my side. :( after about 2-2.5 hours in game

attached a shortened log Fehler.txt

edit: next crash after 2 hours next log-snippet with a more detailed out of memory error log2.txt

edit edit: last line in the snippet may be the re-enabling of the resourcepack

NielsPilgaard commented 2 years ago

sure. is that a client side mod? or would I have to get the server owner to also remove it?

It needs to be removed on both server and client.

Schweigsam83 commented 2 years ago

Hi again. the 2 runs from my earlier posts are: first clientside only off and second run both sides without starlight so no or just a marginal impact on this error from this mod :(

NielsPilgaard commented 2 years ago

I wonder if frequent loading of all advancements has anything to do with this, Loaded 9816 advancements is in the log a few times there.

Schweigsam83 commented 2 years ago

Hi again. topic advancements: this message comes up as a part of the FTB Utilities Backup on the server side. It has hiccups with my advancements only, but not with the ones of my wife. but she has this memory problem too. so i cant say if its connected with the memory error.

side note: the nullpointer errors seem to come up pretty independently of the backups, they can start from 1hour to 20 minutes before a crash occures.

edit: i had a look in the logs of my wife.. nothing suspicious in her log. no error no exception. just cache cleared, world id and uuid reseted and the discord mod closing down and end. edit edit: looked through some more logs at her computer. the last was just an excetpion. random nullpointer errors and the achievement synching in her logs. but only my achievements get noticed in the server-logs

Old-Man-D commented 2 years ago

Removing starlight didn’t change anything on my end. Also, this time when it kicked me out, I made sure to stay on the main menu and try and reload the server. It just says connecting, and never actually connects. I let it sit that way for like 10 minutes before giving up and restarting the client.

NielsPilgaard commented 2 years ago

Could you please update to 1.1.0 and try again?

johnnylingster commented 2 years ago

I checked our version, and we only go to 1.0. Is there somewhere we need to go to find 1.1?

NielsPilgaard commented 2 years ago

Just the usual place, CurseForge.

Darkere commented 2 years ago

You may need to set preferred release to alpha to see them in the curseforge alpha.

johnnylingster commented 2 years ago

I found it. the server is the one we need to use the FTP option to upgrade to 1.1 g-portal is our server provider and they have to do the update themselves apparently?

Old-Man-D commented 2 years ago

I will have to wait for my server to also update, as I am not the admin of said server. But I will pass this along to them.

Schweigsam83 commented 2 years ago

Hi again. Had a chance to update in the morning. But no improvement. I have to have a look in the logs after work. But there was definitely again this error.

Cyprex commented 2 years ago

I've ran into a memory leak in Singleplayer E6E as well. My recommendation is, if it is indeed a memory leak to go back to the main menu and then make a heapdump via external tools, I've used the CLI tools jmap to do so: (All commandline, make sure these tools are in your path, should be found in the same folder as your java binary) First run jps to find the Process ID of Minecraft Then jmap -dump:format=b,file=heapdump.bin <PID goes here> Note that these will be several gigabytes (your heap size plus some), so don't bother with this unless you can analyze them yourself(I recommend Eclipse MAT) or upload them somewhere. I'm happy to analyze heapdumps you upload.

Schweigsam83 commented 2 years ago

Hi again. tried the Heapdump-thingy. No helpful infos on first glance. (and not versed enough for deeper inspection). Uploading is not an option, 5gigs(minimum) upload would take away my internet for a full day. The Error is qiet consistently in time without change if the memory is 5, 7 or 10 gigs allocated. Java or Adoptium versions dont matter, tried different.

Updated to 1.1.1 the error still persists.

The error in the normal log:

A few Nullpointer Errors of Chisel, but Chisel is not the suspect. Made a run without it and it occured nonetheless. A few Tetra-Tools are logged to be inspected. Looks unsuspicious but i dont know. and finally

[31Mar2022 14:02:06.649] [main/FATAL] [net.minecraft.client.Minecraft/]: Out of memory io.netty.util.internal.OutOfDirectMemoryError: failed to allocate 3020 byte(s) of direct memory (used: 10737417708, max: 10737418240) at io.netty.util.internal.PlatformDependent.incrementMemoryCounter(PlatformDependent.java:640) ~[netty-all-4.1.25.Final.jar:4.1.25.Final] at io.netty.util.internal.PlatformDependent.allocateDirectNoCleaner(PlatformDependent.java:594) ~[netty-all-4.1.25.Final.jar:4.1.25.Final] at io.netty.buffer.UnpooledUnsafeNoCleanerDirectByteBuf.allocateDirect(UnpooledUnsafeNoCleanerDirectByteBuf.java:30) ~[netty-all-4.1.25.Final.jar:4.1.25.Final] at io.netty.buffer.UnpooledByteBufAllocator$InstrumentedUnpooledUnsafeNoCleanerDirectByteBuf.allocateDirect(UnpooledByteBufAllocator.java:186) ~[netty-all-4.1.25.Final.jar:4.1.25.Final] at io.netty.buffer.UnpooledUnsafeDirectByteBuf.<init>(UnpooledUnsafeDirectByteBuf.java:68) ~[netty-all-4.1.25.Final.jar:4.1.25.Final] at io.netty.buffer.UnpooledUnsafeNoCleanerDirectByteBuf.<init>(UnpooledUnsafeNoCleanerDirectByteBuf.java:25) ~[netty-all-4.1.25.Final.jar:4.1.25.Final] at io.netty.buffer.UnpooledByteBufAllocator$InstrumentedUnpooledUnsafeNoCleanerDirectByteBuf.<init>(UnpooledByteBufAllocator.java:181) ~[netty-all-4.1.25.Final.jar:4.1.25.Final] at io.netty.buffer.UnpooledByteBufAllocator.newDirectBuffer(UnpooledByteBufAllocator.java:91) ~[netty-all-4.1.25.Final.jar:4.1.25.Final] at io.netty.buffer.AbstractByteBufAllocator.directBuffer(AbstractByteBufAllocator.java:185) ~[netty-all-4.1.25.Final.jar:4.1.25.Final] at io.netty.buffer.UnsafeByteBufUtil.copy(UnsafeByteBufUtil.java:436) ~[netty-all-4.1.25.Final.jar:4.1.25.Final] at io.netty.buffer.UnpooledUnsafeDirectByteBuf.copy(UnpooledUnsafeDirectByteBuf.java:463) ~[netty-all-4.1.25.Final.jar:4.1.25.Final] at io.netty.buffer.AbstractByteBuf.copy(AbstractByteBuf.java:1170) ~[netty-all-4.1.25.Final.jar:4.1.25.Final] at net.minecraft.network.PacketBuffer.copy(PacketBuffer.java:1009) ~[?:?] at net.minecraft.network.play.server.SCustomPayloadPlayPacket.func_180735_b(SCustomPayloadPlayPacket.java:69) ~[?:?] at net.minecraft.client.network.play.ClientPlayNetHandler.func_147240_a(ClientPlayNetHandler.java:1692) ~[?:?] at net.minecraft.network.play.server.SCustomPayloadPlayPacket.func_148833_a(SCustomPayloadPlayPacket.java:59) ~[?:?] at net.minecraft.network.play.server.SCustomPayloadPlayPacket.func_148833_a(SCustomPayloadPlayPacket.java:11) ~[?:?] at net.minecraft.network.PacketThreadUtil.func_225383_a(SourceFile:21) ~[?:?] at net.minecraft.network.PacketThreadUtil$$Lambda$38572/1895663636.run(Unknown Source) ~[?:?] at net.minecraft.util.concurrent.ThreadTaskExecutor.func_213166_h(SourceFile:144) ~[?:?] at net.minecraft.util.concurrent.RecursiveEventLoop.func_213166_h(SourceFile:23) ~[?:?] at net.minecraft.util.concurrent.ThreadTaskExecutor.func_213168_p(SourceFile:118) ~[?:?] at net.minecraft.util.concurrent.ThreadTaskExecutor.func_213160_bf(SourceFile:103) ~[?:?] at net.minecraft.client.Minecraft.func_195542_b(Minecraft.java:948) ~[?:?] at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:607) [?:?] at net.minecraft.client.main.Main.main(Main.java:184) [?:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_51] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_51] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_51] at java.lang.reflect.Method.invoke(Method.java:497) ~[?:1.8.0_51] at net.minecraftforge.fml.loading.FMLClientLaunchProvider.lambda$launchService$0(FMLClientLaunchProvider.java:51) [forge-1.16.5-36.2.29.jar:36.2] at net.minecraftforge.fml.loading.FMLClientLaunchProvider$$Lambda$506/1429306467.call(Unknown Source) [forge-1.16.5-36.2.29.jar:36.2] at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-8.1.3.jar:?] at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) [modlauncher-8.1.3.jar:?] at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) [modlauncher-8.1.3.jar:?] at cpw.mods.modlauncher.Launcher.run(Launcher.java:82) [modlauncher-8.1.3.jar:?] at cpw.mods.modlauncher.Launcher.main(Launcher.java:66) [modlauncher-8.1.3.jar:?]

in the debug log (curseforge option) shortly after overflow: [31Mar2022 14:01:53.872] [main/DEBUG] [net.minecraftforge.registries.ObjectHolderRef/]: Unable to lookup atum:jeweled_fish for public static net.minecraft.item.Item com.teammetallurgy.atum.init.AtumItems.JEWELED_FISH. This means the object wasn't registered. It's likely just mod options. of a few dozen Items

i hope it's helpful. sincerly

Cyprex commented 2 years ago

There's /spark heapsummary, post the results of that here when a bunch of memory has been leaked. Ideally post two, one right after starting the game, and one after a bunch of memory has been leaked, standing in roughly the same position. Roughly how long does the game run before you run out of memory(Please specify how much memory you're giving it as well)

Schweigsam83 commented 2 years ago

Hi again, Java 1.8.0 51 Built-in(cursforge version-choice is bugged) 10GB allocated Spark: fresh after login and a homeport: https://spark.lucko.me/AoJo9V3euM after 1. hour same spot after some exploring: https://spark.lucko.me/gkKd3KM2Xj after 90 min same spot after some inventory sorting https://spark.lucko.me/Dhg30KwHQB after relativ exact 2 hours no spark but a full crash.. a new one xD had the F3 screen on to have look on the memory(normal GC between 70-80%) and wanted to do the summary but a crash came earlier. crash-2022-04-01_15.07.51-client.txt

P.S. wife had a error about an hour in with 7gigs allocated in creative mode to build. In normal gameplay it takes about 2 hours before it crashes

spark
spark is a performance profiler for Minecraft clients, servers and proxies.
spark
spark is a performance profiler for Minecraft clients, servers and proxies.
spark
spark is a performance profiler for Minecraft clients, servers and proxies.
NielsPilgaard commented 2 years ago

Heh, unrelated crash 😄 I reported it.

Schweigsam83 commented 2 years ago

Hi again next run: Modpack ver 1.1.2; Java 1.8.0 51; 10GB allocated Sparkc after login Homeport: https://spark.lucko.me/L9XjR2R6zz first hour same spot: https://spark.lucko.me/op2u63Krlo 90 mins same spot: https://spark.lucko.me/JOeTZdc7mL minute 100 afking for the last 10 mins and error came. Reconnecting is not possible. Client stays in status connecting to server. but no info on the server-side. even the server-pinging is broken.

log between spark an shutdown: [02Apr2022 04:12:34.290] [main/INFO] [journeymap/]: TileDrawStep.updateRegionTexture hit max count, 1000000 [02Apr2022 04:13:03.319] [main/INFO] [journeymap/]: TileDrawStep.draw(low) hit max count, 1000000

same Memory Error as 2 Posts prior

tried to start a singleplayer world. but it locked up at 100% in the preperation. tips are cycling through but no reaction. canceled after 5 mins without change in the logs.

My wifes Pack is dying in an hour. at the moment heavy building in creative mode.

edit: p.s. i googled journeymap with this error. i try to do a run with chunk-caching off. Seemed a problem earlier. Maybe the author couldn't fix it completely.

spark
spark is a performance profiler for Minecraft clients, servers and proxies.
theboo commented 2 years ago

Heap dump immediately after OOM kick... almost 7GB analyzed with MAT and nothing looks too crazy but there is 1.6GB in unreachable objects so no clue... hopefully someone smarter can look at it https://drive.google.com/drive/folders/1_rFY7gwFA5ju-3Cd8lUbaX0vGR2ZRHff?usp=sharing

HeapDump - Google Drive
NielsPilgaard commented 2 years ago

I still haven't found any smoking gun in any of the logs :<

I asked about the Journeymap log on their Discord though: https://discord.com/channels/239040424214396929/325390896524951553/959676538431868928 Edit: It's not Journeymap causing this ._.

Discord
Discord - A New Way to Chat with Friends & Communities
Discord is the easiest way to communicate over voice, video, and text. Chat, hang out, and stay close with your friends and communities.
Schweigsam83 commented 2 years ago

Hi again. Journeymap-caching isn't it either. Wife is still out in an hour :( edit made a run without Journeymap and jmi. they're no suspects anymore. :s and the search goes on :(

mysticdrew commented 2 years ago

edit: p.s. i googled journeymap with this error. i try to do a run with chunk-caching off. Seemed a problem earlier. Maybe the author couldn't fix it completely.

I was able to fix it completely after much research and rewriting the logic. I am glad to hear that you have ruled out JM. If you need anything from me to help you find the issue, please feel free to reach out.

Spark is okayish for finding memory issues, it is better and more user friendly for finding other slowdowns. I usually use VisualVM so you can see the heap in real time as the memory use increases. It is fairly simple and free to download and setup, just attach it to your minecraft instance and do memory profiling.

Schweigsam83 commented 2 years ago

Hi again. so in the meantime i tried to add optifine if there are some differences. I can say: nope no differences.

A side note: the server is stable no sign of any issue on that part. That and the nullpointer issues of chisel lead me believe there is maybe a graphical issue(thats why i tried optifine). But just a guess.

And spark seems no help because it looks like there’s more likely an event that fills the memory in short time than a steady slow growth. And when the memory is flooded the network-part of java is broken as well. So no chance to run spark after the event.

I will try this visualvm if its running with clients as well. Maybe there is more to find so ’til next time

Surnyy commented 2 years ago

I've been running into this as well. Playing on a localhost server, consistently get booted after about 2 hours due to OOM. Similar story in singleplayer, except instead the game just lags until it's unplayable. 8 GB assigned, latest pack version (1.1.2).

Made a head dump using VisualVM, in case it's helpful whatsoever: https://drive.google.com/file/d/1PWPXYPWUL4htGm47RSRYhqhuAqXJRAmm/view?usp=sharing

Google Docs
heapdump-1649170628998.hprof
Targren commented 2 years ago

I ran into the same problem when I first installed the 1.0.0 release on ATLauncher - like the above user, almost exactly at the 2 hour mark. When I switched it over to an instance on MultiMC, it went away, and I played for a couple of weeks without seeing it. Then two days ago, I installed the 1.1.2 update, on MultiMC this time, and the problem was back.

Poking and prodding at it for a couple of hours (would have been less, but dat load time) and I nailed down what was difference.

The Important bit: Is anyone seeing these OOM errors on Java 16? The new 1.1.2 instance set itself up to use Temurin Java 8. I switched it to Oracle Java 16, and I played for 5 hours with no OOM.

Surnyy commented 2 years ago

I ran into the same problem when I first installed the 1.0.0 release on ATLauncher - like the above user, almost exactly at the 2 hour mark. When I switched it over to an instance on MultiMC, it went away, and I played for a couple of weeks without seeing it. Then two days ago, I installed the 1.1.2 update, on MultiMC this time, and the problem was back.

Poking and prodding at it for a couple of hours (would have been less, but dat load time) and I nailed down what was difference.

The Important bit: Is anyone seeing these OOM errors on Java 16? The new 1.1.2 instance set itself up to use Temurin Java 8. I switched it to Oracle Java 16, and I played for 5 hours with no OOM.

Holy crap I think you've found the smoking gun (for me at least). Forced my instance to use Java 16 and it's been running smooth for 5+ hours now.

Old-Man-D commented 2 years ago

I will try java 16. is there any changes to the jvm arguments that I need?

Targren commented 2 years ago

I will try java 16. is there any changes to the jvm arguments that I need?

Probably a few to optimize the experience, but I haven't done any yet

Schweigsam83 commented 2 years ago

Hi again. MultiMC and Java16 are looking like a valid workaround. A solution with the curseforge launcher would nice. Or even better finding the primary source of this problem. But beggars can't be choosers xD

Thanks for this possibility =D

Old-Man-D commented 2 years ago

I ran with java 16 through the GD launcher. My session still ended in a crash, but I do not think it was this issue. On a side note, I had been recommended to use ZGC in the discord support channel. Using this GC I had significant lag spikes every couple of seconds as GC ran. In game it would vary between about 90% up to 100%. Using G1GC it did not have this, it would vary between about 40% up to 75%, at which point GC would fire off. This is with 8G allocated. If java 16 is the correct solution, and if we are supposed to use ZGC, are we supposed to allocate more, to give ZGC more overhead to work with?

Darkere commented 2 years ago

Yes. The newer java gc like zgc and shenandoa handle larger amounts of ram better but seem to be quite a bit worse if you are near the limits of your PC and can't increase the amount of ram you are using.

johnnylingster commented 2 years ago

I can confirm that using JDK 16.0.2 and MultiMC works without issue. No memory leak failure! My friends using a server tried this and I had no issues after 4 hours. I myself also gave it 10 gig ram to use as I did even with the memory leak.

Klowes commented 2 years ago

Any way we can get the bundled java version changed at the pack level? My gf and I have ran into this 4 times today combined.

Targren commented 2 years ago

Any way we can get the bundled java version changed at the pack level? My gf and I have ran into this 4 times today combined.

Pretty sure that's determined by your launcher, not the pack.