InventivetalentDev / NickNamer

Spigot Name & Skin changer plugin
https://www.spigotmc.org/resources/5341
MIT License
104 stars 28 forks source link

Leaking threads #3

Closed tlaundal closed 8 years ago

tlaundal commented 8 years ago

Hi there,

I was looking into your plugin for a rather big one-world server, however I ran into problems with only 60 people on.

My server ran fine before i installed and after i uninstalled NickNamer and PacketListenerAPI. However, while they where installed my server crashed about every 50 minutes. I did not use the plugin at all during this time.

I have attached three crash logs, which are all about 8MB in size. Here is the error in itself, though:

#!java
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.ThreadPoolExecutor.addWorker(ThreadPoolExecutor.java:950)
        at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1368)
        at org.bukkit.craftbukkit.v1_9_R2.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:371)
        at net.minecraft.server.v1_9_R2.MinecraftServer.D(MinecraftServer.java:795)
        at net.minecraft.server.v1_9_R2.DedicatedServer.D(DedicatedServer.java:403)
        at net.minecraft.server.v1_9_R2.MinecraftServer.C(MinecraftServer.java:723)
        at net.minecraft.server.v1_9_R2.MinecraftServer.run(MinecraftServer.java:622)
        at java.lang.Thread.run(Thread.java:745)

As I am sure you notice, the plugin is not mentioned in the stack trace, but I believe the reason the server reaches it max limit of threads (unable to create new native thread). A look at the stack trace reveals that your PacketListenerAPI and NickNicknamer plugins are responsible for most of the thousands of threads.

A quick look at your plugin's presence in the error reports:

# grep -o inventivetalent crash-2016-06-08_13.27.33-server.txt | wc -l
19648

The config is also attached. I hope all the necessary information is here, if not, I'm glad to provide more.

config.yml.txt crash-2016-06-08_15.08.13-server.txt crash-2016-06-08_14.20.33-server.txt crash-2016-06-08_13.27.33-server.txt

MineTheCube commented 8 years ago

Same here:

[22:05:47] [Server thread/ERROR]: Encountered an unexpected exception
java.lang.OutOfMemoryError: unable to create new native thread
    at java.lang.Thread.start0(Native Method) ~[?:1.8.0_72]
    at java.lang.Thread.start(Thread.java:714) ~[?:1.8.0_72]
    at java.util.concurrent.ThreadPoolExecutor.addWorker(ThreadPoolExecutor.java:950) ~[?:1.8.0_72]
    at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1368) ~[?:1.8.0_72]
    at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:364) ~[spigot.jar:git-Spigot-e4d4710-e1ebe52]
    at net.minecraft.server.v1_8_R3.MinecraftServer.B(MinecraftServer.java:723) ~[spigot.jar:git-Spigot-e4d4710-e1ebe52]
    at net.minecraft.server.v1_8_R3.DedicatedServer.B(DedicatedServer.java:374) ~[spigot.jar:git-Spigot-e4d4710-e1ebe52]
    at net.minecraft.server.v1_8_R3.MinecraftServer.A(MinecraftServer.java:654) ~[spigot.jar:git-Spigot-e4d4710-e1ebe52]
    at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:557) [spigot.jar:git-Spigot-e4d4710-e1ebe52]
    at java.lang.Thread.run(Thread.java:745) [?:1.8.0_72]
[22:05:55] [Server thread/ERROR]: This crash report has been saved to: /var/directory_serv/minecraft_11731/./crash-reports/crash-2016-06-15_22.05.52-server.txt
[22:05:55] [Server thread/INFO]: Stopping server

My config.yml And the crash report is over 56mb, so I can't upload it, but:

# grep -o inventivetalent crash-2016-06-15_22.05.52-server.txt | wc -l
143946

Also it has never happened before I installed NickNamer/PacketListenerAPI.. :/

thedejavunl commented 8 years ago

I have exactly the same issue on 1.8.8.

InventivetalentDev commented 8 years ago

Please try the latest version (3.12.0). I updated the storage part, so it should (in theory) stop creating unnecessary threads. (#16)