LuckPerms

LuckPerms

41.4k Downloads

LuckPerms server crash on permission look-up.

mibby opened this issue ยท 4 comments

commented

Paper dev 1500 (Spigot 1.12.2)
LuckPerms dev 708 (LuckPerms-Bukkit-4.2.51)

Had a server crash today. Caused by LuckPerms permission look-up?

[17:15:05] [Paper Watchdog Thread/ERROR]: Current Thread: Server thread
[17:15:05] [Paper Watchdog Thread/ERROR]: 	PID: 18 | Suspended: false | Native: false | State: RUNNABLE
[17:15:05] [Paper Watchdog Thread/ERROR]: 	Stack:
[17:15:05] [Paper Watchdog Thread/ERROR]: 		java.lang.Object.hashCode(Native Method)
[17:15:05] [Paper Watchdog Thread/ERROR]: 		com.google.common.collect.ImmutableSet.construct(ImmutableSet.java:175)
[17:15:05] [Paper Watchdog Thread/ERROR]: 		com.google.common.collect.ImmutableSet.access$000(ImmutableSet.java:50)
[17:15:05] [Paper Watchdog Thread/ERROR]: 		com.google.common.collect.ImmutableSet$Builder.build(ImmutableSet.java:551)
[17:15:05] [Paper Watchdog Thread/ERROR]: 		me.lucko.luckperms.common.utils.ImmutableCollectors$$Lambda$92/1356061576.apply(Unknown Source)
[17:15:05] [Paper Watchdog Thread/ERROR]: 		java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:503)
[17:15:05] [Paper Watchdog Thread/ERROR]: 		me.lucko.luckperms.bukkit.model.permissible.LPPermissible.getEffectivePermissions(LPPermissible.java:210)
[17:15:05] [Paper Watchdog Thread/ERROR]: 		org.bukkit.craftbukkit.v1_12_R1.entity.CraftHumanEntity.getEffectivePermissions(CraftHumanEntity.java:149)
[17:15:05] [Paper Watchdog Thread/ERROR]: 		me.blackvein.quests.Quests.checkQuester(Quests.java:3788)
[17:15:05] [Paper Watchdog Thread/ERROR]: 		me.blackvein.quests.PlayerListener.onPlayerMove(PlayerListener.java:718)
[17:15:05] [Paper Watchdog Thread/ERROR]: 		com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor1082.execute(Unknown Source)
[17:15:05] [Paper Watchdog Thread/ERROR]: 		org.bukkit.plugin.EventExecutor$2.execute(EventExecutor.java:70)
[17:15:05] [Paper Watchdog Thread/ERROR]: 		co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:78)
[17:15:05] [Paper Watchdog Thread/ERROR]: 		org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62)
[17:15:05] [Paper Watchdog Thread/ERROR]: 		org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:527)
[17:15:05] [Paper Watchdog Thread/ERROR]: 		org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:512)
[17:15:05] [Paper Watchdog Thread/ERROR]: 		net.minecraft.server.v1_12_R1.PlayerConnection.a(PlayerConnection.java:692)
[17:15:05] [Paper Watchdog Thread/ERROR]: 		net.minecraft.server.v1_12_R1.PacketPlayInFlying.a(SourceFile:126)
[17:15:05] [Paper Watchdog Thread/ERROR]: 		net.minecraft.server.v1_12_R1.PacketPlayInFlying$PacketPlayInPosition.a(SourceFile:57)
[17:15:05] [Paper Watchdog Thread/ERROR]: 		net.minecraft.server.v1_12_R1.PlayerConnectionUtils.lambda$ensureMainThread$0(PlayerConnectionUtils.java:14)
[17:15:05] [Paper Watchdog Thread/ERROR]: 		net.minecraft.server.v1_12_R1.PlayerConnectionUtils$$Lambda$692/1758947090.run(Unknown Source)
[17:15:05] [Paper Watchdog Thread/ERROR]: 		java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[17:15:05] [Paper Watchdog Thread/ERROR]: 		java.util.concurrent.FutureTask.run(FutureTask.java:266)
[17:15:05] [Paper Watchdog Thread/ERROR]: 		net.minecraft.server.v1_12_R1.SystemUtils.a(SourceFile:46)
[17:15:05] [Paper Watchdog Thread/ERROR]: 		net.minecraft.server.v1_12_R1.MinecraftServer.D(MinecraftServer.java:849)
[17:15:05] [Paper Watchdog Thread/ERROR]: 		net.minecraft.server.v1_12_R1.DedicatedServer.D(DedicatedServer.java:427)
[17:15:05] [Paper Watchdog Thread/ERROR]: 		net.minecraft.server.v1_12_R1.MinecraftServer.C(MinecraftServer.java:773)
[17:15:05] [Paper Watchdog Thread/ERROR]: 		net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:665)
[17:15:05] [Paper Watchdog Thread/ERROR]: 		java.lang.Thread.run(Thread.java:748)

Full crash dump.
https://paste.ubuntu.com/p/MRR7v9VkbZ/

commented

I'll do some profiling tomorrow hopefully before 1.13's release to check. Perhaps @FlyingPikachu could weigh in?

commented

Output of that report looks like your system was horrifically overloaded, either the clock started jumping or the JVM was locking up for some reason (GC? attach a profiler)

commented

Despite what electronicboy has said above, it seems that me.blackvein.quests.Quests is calling Permissible#getEffectivePermissions on (potentilally every?) move event.

This is probably quite bad for performance, but profiling would show it.

commented

This is an issue with Quests. This code...

PikaMug/Quests@84b2906#diff-27ffc03d9ebc7f11788beb54e7da6838L3788

...is being called onPlayerMove for both Citizens NPCs and real players. Apparently, this wasn't an issue when this code was using Vault instead, but it's clearly bad. Fortunately for me, it was the previous author of Quests that wrote the event handler ;P

Pushing a commit that should optimize things enough not to crash servers. Thanks for pointing this out!