LuckPerms

LuckPerms

41.4k Downloads

Server deadlock

lucko opened this issue ยท 10 comments

commented

@lucko This commit is causing major issues for me. Server deadlocking as soon as someone logs in.
https://paste.ubuntu.com/p/8SnCpnVFsc/
https://paste.ubuntu.com/p/Fyr6N3kHjs/

Rolled back to dev 851 (LuckPerms-Bukkit-4.3.75), all is fine again.
Using Paper dev 500 (Spigot 1.13.2).

Originally posted by @mibby in 3c0d1ba#commitcomment-31942090

commented

@mibby The issue seems to be with CraftBook, not LuckPerms??

app//net.minecraft.server.v1_13_R2.UserCache.getProfile(UserCache.java:140)
app//org.bukkit.craftbukkit.v1_13_R2.CraftServer.getOfflinePlayer(CraftServer.java:1457)
com.sk89q.wepif.DinnerPermsResolver.hasPermission(DinnerPermsResolver.java:57)

Did you perhaps also update that at the same time as LP?

commented

@lucko I did not update CraftBook with LuckPerks anytime recently, no. Using CraftBook dev 4479 which came out over 2 weeks ago.

http://builds.enginehub.org/job/craftbook?branch=3.x

As well as WorldEdit dev 3997 and WorldGuard dev 1784 (which craftbook relies on for WorldEdit's DinnerPermsResolver).

It could be craftbook related but I don't understand why the server explodes with the cache changes in LuckPerms dev 851. Dev 850 runs perfectly fine. Never happened to me before with any version of CraftBook and LuckPerms over the years and is 100% consistent with dev 851 (instant server death on first login).

This is my wepif.yml settings in the root server directory - created by WorldEdit I believe.
http://wiki.sk89q.com/wiki/WEPIF

ignore-nijiperms-bridges: true
resolvers:
    enabled:
    - DinnerPermsResolver
    disabled:
    - PluginPermissionsResolver
    - PermissionsExResolver
    - bPermissionsResolver
    - GroupManagerResolver
    - NijiPermissionsResolver
    - FlatFilePermissionsResolver
    - VaultResolver
permissions:
    groups: {}
    users: {}
commented
[01:30:48] [Paper Watchdog Thread/ERROR]: Current Thread: Timer-1
[01:30:48] [Paper Watchdog Thread/ERROR]: 	PID: 74 | Suspended: false | Native: false | State: TIMED_WAITING
[01:30:48] [Paper Watchdog Thread/ERROR]: 	Thread is waiting on monitor(s):
[01:30:48] [Paper Watchdog Thread/ERROR]: 		Locked on:app//net.minecraft.server.v1_13_R2.UserCache.getProfile(UserCache.java:157)
[01:30:48] [Paper Watchdog Thread/ERROR]: 		Locked on:com.Ben12345rocks.VotingPlugin.TopVoter.TopVoterHandler.updateTopVoters(TopVoterHandler.java:576)
[01:30:48] [Paper Watchdog Thread/ERROR]: 		Locked on:com.Ben12345rocks.VotingPlugin.Main.update(Main.java:987)
[01:30:48] [Paper Watchdog Thread/ERROR]: 	Stack:
[01:30:48] [Paper Watchdog Thread/ERROR]: 		[email protected]/java.lang.Thread.sleep(Native Method)
[01:30:48] [Paper Watchdog Thread/ERROR]: 		app//com.mojang.authlib.yggdrasil.YggdrasilGameProfileRepository.findProfilesByNames(YggdrasilGameProfileRepository.java:92)
[01:30:48] [Paper Watchdog Thread/ERROR]: 		app//com.destroystokyo.paper.profile.PaperGameProfileRepository.findProfilesByNames(PaperGameProfileRepository.java:45)
[01:30:48] [Paper Watchdog Thread/ERROR]: 		app//net.minecraft.server.v1_13_R2.UserCache.a(UserCache.java:88)
[01:30:48] [Paper Watchdog Thread/ERROR]: 		app//net.minecraft.server.v1_13_R2.UserCache.getProfile(UserCache.java:157)
[01:30:48] [Paper Watchdog Thread/ERROR]: 		app//org.bukkit.craftbukkit.v1_13_R2.CraftProfileBanList.isBanned(CraftProfileBanList.java:84)
[01:30:48] [Paper Watchdog Thread/ERROR]: 		app//org.bukkit.craftbukkit.v1_13_R2.CraftOfflinePlayer.isBanned(CraftOfflinePlayer.java:98)
[01:30:48] [Paper Watchdog Thread/ERROR]: 		com.Ben12345rocks.VotingPlugin.AdvancedCore.UserManager.User.isBanned(User.java:538)
[01:30:48] [Paper Watchdog Thread/ERROR]: 		com.Ben12345rocks.VotingPlugin.TopVoter.TopVoterHandler.updateTopVoters(TopVoterHandler.java:576)
[01:30:48] [Paper Watchdog Thread/ERROR]: 		com.Ben12345rocks.VotingPlugin.Main.update(Main.java:987)
[01:30:48] [Paper Watchdog Thread/ERROR]: 		com.Ben12345rocks.VotingPlugin.Main$1$1.run(Main.java:346)
[01:30:48] [Paper Watchdog Thread/ERROR]: 		[email protected]/java.util.TimerThread.mainLoop(Timer.java:556)
[01:30:48] [Paper Watchdog Thread/ERROR]: 		[email protected]/java.util.TimerThread.run(Timer.java:506)

That plugin was blocking access to the user cache by looking up player information, you likely ended up hitting the request limit which means that the profile lookup will wait until it can request all of the data that the plugin as asking for, which is what meant that the server couldn't use the user cache

commented

So if the user cache request limit is reached and can't be used (LuckPerms requesting to use the cache in this case with dev 851), the server process decides to lock up and die? When I was testing, I also tried starting the server up and blocked all player connections for 3 minutes to let plugin initialization finish, but the server still locked up as soon as the first connected player joined. I presume downgrading in this case to 850 doesn't crash because LuckPerms isn't requesting access to this cache.

In which case if the cache is busy / blocked / rate limited, shouldn't LuckPerms fall back to the prior method of how it operated?

@Ben12345rocks

commented

@Ben12345rocks See above #1385 (comment). It's a possible issue with the server deadlocking due to VotingPlugin blocking access to the cache.

commented

There's nothing I can see in those crash logs that suggest LP might be the issue.

commented

LP isn't the issue here :)

commented
commented

@mibby

Is check name mojang enabled in the config? If so disable it.

commented

Paper dev 503 (Spigot 1.13.2)
LuckPerms dev 853
VotingPlugin dev 544

With this set false in VotingPlugin, I seem to be able to login fine now without the server deadlocking with the updated LuckPerms.

# Whether or not to disable checking names on mojang, disable if you hit the rate limit
# Shouldn't make a noticeable impact if set to false
CheckNameMojang: false

I believe this ticket is safe to be closed now.