LuckPerms

LuckPerms

41.4k Downloads

Shutdown error after updating permissions via web editor

repeater64 opened this issue ยท 8 comments

commented

Description

If I update permissions via the web editor then shut down my server at any point after that, the server freezes for approximately 10 seconds after the "[LuckPerms] Starting Shutdown Process..." message. After about 10 seconds it prints a stacktrace.
The change I made does seem to have been saved, if I start my server again the change was saved, but taking so long to shut down and throwing an error obviously isn't ideal.

The error is included in the logs and configs section below. Notice how the "Closing Storage..." message appears halfway through the stack trace, so clearly the error is on a separate thread to some other parts of the shutdown process.

Reproduction Steps

Start server
Run /lp editor
Add a permission to a group or make some kind of change
Click apply button to auto apply
Shut down server.

Expected Behaviour

Shut down quickly and with no errors, like it normally shuts down when I haven't used the editor

Server Details

paper 1.18.1

LuckPerms Version

v5.4.5

Logs and Configs

The error:
https://gist.github.com/repeater64/5f69f221e42838a5253aeaaf94418a51

Extra Details

Only happens when I used the web editor in that server session.

commented

I can't confirm the statement above.
I tested this 4 times, the first time I thought this is it since there was nothing odd in the console. The following 3 tries this happened: https://pastes.dev/VdTw67n5Qr

What I noticed though is regardless of that popping up, shutdown is not slowed down as it was before anymore.

commented

Awesome, thanks for the feedback!

Another build for you to try ^^ :)

commented

This one did it.

Tested 5 times with different actions (add permissions, remove permissions, add group, remove group, add track, remove track, add context, remove context) and not once any issues :)

commented

Out of pure curiosity I also tested this and can confirm.
On my test server I have Pufferfish 1.18.2 running with LuckPerms 5.4.10. See: https://pastes.dev/VJPvX2j4nP

I tried this twice, once with the editor window still open and once where the editor window was closed 3 seconds prior to initiating the shutdown process - both turned out to behave the same way.

Aside from this adding roughly 10 seconds to the shutdown, there is no 'damage' though - all data is there and LP works just fine otherwise.

commented

Made some changes in the commit above - there's a good chance this may make things worse, but let me know :]

Hello, this works for me with the change you made.

Thanks very much.

commented

Made some changes in the commit above - there's a good chance this may make things worse, but let me know :]

commented

I also have exception during shutdown (not every time, probably after using web editor too).
If it's another issue I can create it, @lucko

Paper 1.18.1, LP 5.4.0
https://paste.gg/p/anonymous/ca0da6ccbc2a42aa9ec3964b9f3224ec

commented

Hello, I have the same problem with the latest devbuild.

Paper all versions, DevBuild: https://ci.lucko.me/job/LuckPerms/1417/