atlarge-research / yardstick

21 stars 11 forks source link

OOM exception when running Experiment-4 with more than 50 bots #7

Open javierron opened 3 years ago

javierron commented 3 years ago

Running on a DAS-5 node, the following exception is raised when Experiment-4 has finished and all the bots are being disconnected.

Exception in thread "experiment-4" java.lang.OutOfMemoryError: unable to create new native thread
    at java.lang.Thread.start0(Native Method)
    at java.lang.Thread.start(Thread.java:717)
    at io.netty.util.concurrent.ThreadPerTaskExecutor.execute(ThreadPerTaskExecutor.java:33)
    at io.netty.util.concurrent.SingleThreadEventExecutor.doStartThread(SingleThreadEventExecutor.java:875)
    at io.netty.util.concurrent.SingleThreadEventExecutor.shutdownGracefully(SingleThreadEventExecutor.java:587)
    at io.netty.util.concurrent.MultithreadEventExecutorGroup.shutdownGracefully(MultithreadEventExecutorGroup.java:163)
    at io.netty.util.concurrent.AbstractEventExecutorGroup.shutdownGracefully(AbstractEventExecutorGroup.java:70)
    at science.atlarge.opencraft.packetlib.tcp.TcpClientSession.disconnect(TcpClientSession.java:123)
    at science.atlarge.opencraft.packetlib.tcp.TcpSession.disconnect(TcpSession.java:245)
    at science.atlarge.opencraft.packetlib.tcp.TcpSession.disconnect(TcpSession.java:240)
    at nl.tudelft.opencraft.yardstick.bot.Bot.disconnect(Bot.java:158)
    at nl.tudelft.opencraft.yardstick.experiment.Experiment4MultiWalkAround.after(Experiment4MultiWalkAround.java:130)
    at nl.tudelft.opencraft.yardstick.experiment.Experiment.run(Experiment.java:95)
    at java.lang.Thread.run(Thread.java:748)
jdonkervliet commented 2 years ago

Do you have the commit hash of the build that caused this exception?

javierron commented 2 years ago

This is the commit: https://github.com/atlarge-research/yardstick/tree/59531c6edb65c4e288bc6fc0f8a11a5c102acf88 @jdonkervliet

jdonkervliet commented 2 years ago

OK, I'll try to reproduce the issue. There should be a memory leak somewhere, because storing the world, even 50 times, should not exceed 64 GiB memory.