When generating terrain, the Worldgen worker threads crash with Out of memory errors. This is especially likely to happen while generating Jungle biomes.
The crashing of the worker threads is severe. When it happens, the game stops responding to attempts to save the game. Pressing Save and Exit causes the game to hang without doing anything and the game must be terminated externally (eg with Task Manager).
Some examples of crashes from the log:
Caught exception in thread Thread[WorldGen-Worker-93,5,main]
java.lang.OutOfMemoryError: unable to create new native thread
at java.lang.Thread.start0(Native Method)
at java.lang.Thread.start(Thread.java:714)
at java.util.concurrent.ForkJoinPool.tryAddWorker(ForkJoinPool.java:1338)
at java.util.concurrent.ForkJoinPool.deregisterWorker(ForkJoinPool.java:1460)
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:167)
Caught exception in thread Thread[WorldGen-Worker-46,5,main]
java.lang.OutOfMemoryError: unable to create new native thread
at java.lang.Thread.start0(Native Method)
at java.lang.Thread.start(Thread.java:714)
at java.util.concurrent.ForkJoinPool.tryAddWorker(ForkJoinPool.java:1338)
at java.util.concurrent.ForkJoinPool.deregisterWorker(ForkJoinPool.java:1460)
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:167)
Caught exception in thread Thread[WorldGen-Worker-29,5,main]
java.lang.OutOfMemoryError: unable to create new native thread
at java.lang.Thread.start0(Native Method)
at java.lang.Thread.start(Thread.java:714)
at java.util.concurrent.ForkJoinPool.tryAddWorker(ForkJoinPool.java:1338)
at java.util.concurrent.ForkJoinPool.deregisterWorker(ForkJoinPool.java:1460)
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:167)
Linked issues
relates to 2
Attachments
Comments 15
It has happened again in 18w15a with vanilla JVM settings (-Xmx1024M):
Caught exception in thread Thread[WorldGen-Worker-295,5,main]
java.lang.OutOfMemoryError: unable to create new native thread
at java.lang.Thread.start0(Native Method)
at java.lang.Thread.start(Thread.java:714)
at java.util.concurrent.ForkJoinPool.tryAddWorker(ForkJoinPool.java:1338)
at java.util.concurrent.ForkJoinPool.deregisterWorker(ForkJoinPool.java:1460)
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:167)
I have been unable to run 18w19b and 18w20a because it crashes on startup (MC-129374).
Still waiting for MC-129374 to be fixed before I can test this.
I concur with the "assume fixed" assessment. I tried really hard to crash it in 18w22a and I could not do so even though I flew over 25,000 blocks. In 18w20c I crashed it after 3,000 blocks. The save I generated in18w20c is linked in MC-130162.
Affects 1.13 pre-1.
Generating chunks by flying around with commands will occasionally cause the world generation to stop and saving to become impossible. Reproduced on Win10 using 64-bit Java. It is difficult to reproduce but not impossible.
attached after experiencing the issue.
I'm not sure if this is still the same issue or if it's something else.
This core issue is resolved. I am experiencing other issues, in particular MC-129492.
This seemed to happen because I was pushing the JVM rather hard with experimental options at the same time that I was stress testing the terrain generation by running it as fast as possible for up to an hour. This is likely the cause of the failure. I have yet to reproduce this with more sensible JVM options (-Xmx1024M and nothing else).
The JVM parameters: -Xms1024m -Xmx1024m -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=16M