
ServerThreadLookupException
Closed this issue ยท 2 comments
Server Implementation
Paper
Server Version
1.21.4
Describe the bug
Bug Report: ServerThreadLookupException (LuckPerms/Vault) with WorldGuard/FAWE
Issue Summary
FastAsyncWorldEdit (FAWE), specifically its integration with WorldGuard, appears to be making synchronous (blocking) Vault API calls to LuckPerms for offline player permission lookups. This causes ServerThreadLookupException errors in the console and can lead to significant server lag (TPS drops) as database operations are performed on the main server thread.
To Reproduce
Steps to Reproduce
Server Setup:
Run a Minecraft server using Paper (or a derivative like Purpur) version 1.21.4 (or similar recent version).
Install the following plugins:
LuckPerms (latest stable version, e.g., 5.4.x)
Vault (latest stable version)
WorldGuard (version 7.0.13)
FastAsyncWorldEdit (version 2.12.3)
Ensure LuckPerms is configured to use a database (e.g., MySQL, as is common for larger servers).
Ensure vault-unsafe-lookups is set to false in your LuckPerms config.yml (this is the default and recommended setting to detect such issues).
Expected behaviour
Player Activity:
Have players join and leave the server, or have periods of high player turnover.
The error seems to be triggered when WorldGuard performs checks (e.g., hasBypass, GameModeFlag.updateGameMode) for players who are currently offline but whose data needs to be accessed via Vault/LuckPerms. This often happens on player join events as WorldGuard initializes their session.
Expected Behavior
WorldGuard/FastAsyncWorldEdit should perform any necessary Vault API calls for offline player permission lookups asynchronously (off the main server thread) to prevent server lag. LuckPerms should be able to retrieve offline player data from its database without blocking the main server thread.
Actual Behavior
When WorldGuard, specifically through its integration with FastAsyncWorldEdit (FAWE), attempts to check permissions for an offline player via Vault and LuckPerms, a ServerThreadLookupException is thrown. This indicates that a database lookup is being performed synchronously on the main server thread, causing potential server stalls and lag.
Screenshots / Videos
No response
Error log (if applicable)
Fawe Debugpaste
https://athion.net/ISPaster/paste/view/d8e13a49dc944e80afbb3e1a5497fa14
Fawe Version
FastAsyncWorldEdit-Paper-2.12.3.jar
Checklist
- I have included a Fawe debugpaste.
- I am using the newest build from https://ci.athion.net/job/FastAsyncWorldEdit/ and the issue still persists.
Anything else?
No response