AuthMe Reloaded

AuthMe Reloaded

3M Downloads

Caused by: java.util.ConcurrentModificationException

Skjolberg opened this issue ยท 5 comments

commented

What behaviour is observed?

Whenever my server restarts daily I get these errors, it is a login for user password change.

https://www.toptal.com/developers/hastebin/ilazutoxin.sql

Expected behaviour

Whenever my server restarts daily I get these errors, it is a login for user password change.

To Reproduce

The error is reproduced when the server is started/restarted.

Plugin list

[05:26:54 INFO]: Plugins (8): WorldEdit, ViaVersion, ConditionalEvents, ProtocolLib, WorldGuard, AuthMe, CommandWhitelist, HolographicDisplays

Server Implementation

BungeeCord

Database Implementation

MySQL

AuthMe Version

[05:27:33 INFO]: Version: AuthMeReloaded v5.6.0-SNAPSHOT (build: 2512)

Error log (if applicable)

https://www.toptal.com/developers/hastebin/ilazutoxin.sql

Configuration

https://www.toptal.com/developers/hastebin/iteduhipaq.yaml

commented

Thanks

commented

Unfortunately the hastebins have expired (special thanks to @toptal for making the URLs really long and making it impossible to user the browser's back button when a hastebin isn't found) but I had a quick glance at the time and it was because of the purge task being run multiple times. It was really odd. Could you reupload the error log please?

commented

This

`[06:30:15] [Craft Scheduler Thread - 1/WARN]: Exception in thread "Craft Scheduler Thread - 1"
[06:30:15] [Craft Scheduler Thread - 1/WARN]: org.apache.commons.lang.UnhandledException: Plugin AuthMe v5.6.0-SNAPSHOT-b2512 generated an exception while executing task 8
at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.util.ConcurrentModificationException
at java.base/java.util.HashMap$HashIterator.nextNode(HashMap.java:1511)
at java.base/java.util.HashMap$KeyIterator.next(HashMap.java:1534)
at fr.xephi.authme.task.purge.PurgeTask.run(PurgeTask.java:93)
at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftTask.run(CraftTask.java:59)
at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:53)
... 3 more

[06:30:15] [Craft Scheduler Thread - 6/WARN]: Exception in thread "Craft Scheduler Thread - 6"
[06:30:15] [Craft Scheduler Thread - 6/WARN]: org.apache.commons.lang.UnhandledException: Plugin AuthMe v5.6.0-SNAPSHOT-b2512 generated an exception while executing task 8
at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.util.ConcurrentModificationException
at java.base/java.util.HashMap$HashIterator.nextNode(HashMap.java:1511)
at java.base/java.util.HashMap$KeyIterator.next(HashMap.java:1534)
at fr.xephi.authme.task.purge.PurgeTask.run(PurgeTask.java:93)
at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftTask.run(CraftTask.java:59)
at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:53)
... 3 more

[06:30:15] [Craft Scheduler Thread - 0/WARN]: Exception in thread "Craft Scheduler Thread - 0"
[06:30:15] [Craft Scheduler Thread - 0/WARN]: org.apache.commons.lang.UnhandledException: Plugin AuthMe v5.6.0-SNAPSHOT-b2512 generated an exception while executing task 8
at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.util.ConcurrentModificationException
at java.base/java.util.HashMap$HashIterator.nextNode(HashMap.java:1511)
at java.base/java.util.HashMap$KeyIterator.next(HashMap.java:1534)
at fr.xephi.authme.task.purge.PurgeTask.run(PurgeTask.java:93)
at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftTask.run(CraftTask.java:59)
at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:53)
... 3 more

[06:30:15] [Craft Scheduler Thread - 2/WARN]: Exception in thread "Craft Scheduler Thread - 2"
[06:30:15] [Craft Scheduler Thread - 2/WARN]: org.apache.commons.lang.UnhandledException: Plugin AuthMe v5.6.0-SNAPSHOT-b2512 generated an exception while executing task 8
at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.util.ConcurrentModificationException
at java.base/java.util.HashMap$HashIterator.nextNode(HashMap.java:1511)
at java.base/java.util.HashMap$KeyIterator.next(HashMap.java:1534)
at fr.xephi.authme.task.purge.PurgeTask.run(PurgeTask.java:93)
at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftTask.run(CraftTask.java:59)
at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:53)
... 3 more

[06:30:15] [Craft Scheduler Thread - 9/WARN]: Exception in thread "Craft Scheduler Thread - 9"
[06:30:15] [Craft Scheduler Thread - 9/WARN]: org.apache.commons.lang.UnhandledException: Plugin AuthMe v5.6.0-SNAPSHOT-b2512 generated an exception while executing task 8
at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.util.ConcurrentModificationException
at java.base/java.util.HashMap$HashIterator.nextNode(HashMap.java:1511)
at java.base/java.util.HashMap$KeyIterator.next(HashMap.java:1534)
at fr.xephi.authme.task.purge.PurgeTask.run(PurgeTask.java:93)
at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftTask.run(CraftTask.java:59)
at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:53)
... 3 more

[06:30:15] [Craft Scheduler Thread - 8/WARN]: Exception in thread "Craft Scheduler Thread - 8"
[06:30:15] [Craft Scheduler Thread - 8/WARN]: org.apache.commons.lang.UnhandledException: Plugin AuthMe v5.6.0-SNAPSHOT-b2512 generated an exception while executing task 8
at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.util.ConcurrentModificationException
at java.base/java.util.HashMap$HashIterator.nextNode(HashMap.java:1511)
at java.base/java.util.HashMap$KeyIterator.next(HashMap.java:1534)
at fr.xephi.authme.task.purge.PurgeTask.run(PurgeTask.java:93)
at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftTask.run(CraftTask.java:59)
at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:53)
... 3 more`

commented

Thanks.

Took me a while to figure out why the task was running multiple times but now I see that we schedule the purge task to run in separate steps, and it looks like the execution of an individual step takes too long on your server so it will already start the next step and this will cause the ConcurrentModificationException we see in your errors.

As a quick fix you could remove rows from your database manually in hopes that it will then be fast enough, or disable purging. For the long term we'll try to solve this, of course, and stop steps from being performed in parallel.

commented

Hi,

What is happening with this?