A248 / LibertyBans

The be-all, end-all of discipline.
https://ci.hahota.net:8443/job/LibertyBans/
GNU Affero General Public License v3.0
169 stars 41 forks source link

[Bug Report]: Latest LuckPerms breaks MariaDB driver #213

Closed darksaid98 closed 1 year ago

darksaid98 commented 1 year ago

LibertyBans Version

Libertybans 1.1.0-SNAPSHOT

I have confirmed that ...

Platform

Velocity

Description

Description: Using Luckperms and Libertybans both with MariaDB, Libertybans spits out a java.lang.NoClassDefFoundError on ProxyInitializeEvent.

Removing Luckperms resolves the issue (Although Liberybans throws the stack trace, hence why I reported this here).

Details:

Repro:

  1. Setup new Velocity proxy.
  2. Install specified plugins.
  3. Configure both plugins to connect using the MariaDB driver. (They also connect to the same DB in my specific case)

Notes: Removing Luckperms resolves the issue. Removing all Libertybans addons does not affect the issue.

Startup Log:

Booting up Velocity 3.2.0-SNAPSHOT (git-40b76c63-b256)...
Loading localizations...
Connections will use epoll channels, libdeflate (Linux x86_64) compression, OpenSSL 3.0.x (Linux x86_64) ciphers
Loading plugins...
Loaded plugin luckperms 5.4.79 by Luck
Loaded plugin libertybans 1.1.0-SNAPSHOT-2023-05-14T20:22:06Z by Contributors to LibertyBans
Loaded 2 plugins
        __    
  |    |__)   LuckPerms v5.4.79
  |___ |      Running on Velocity - Velocity

[luckperms]: Loading configuration...
[luckperms]: Loading storage provider... [MARIADB]
[me.lucko.luckperms.lib.hikari.HikariDataSource]: luckperms-hikari - Starting...
[me.lucko.luckperms.lib.hikari.HikariDataSource]: luckperms-hikari - Start completed.
[luckperms]: Loading messaging service... [PLUGINMSG]
[luckperms]: Loading internal permission managers...
[luckperms]: Performing initial data load...
[luckperms]: Successfully enabled. (took 640ms)
[libertybans]: Detected 8 addon(s)
[space.arim.libertybans.core.addon.AddonLoader]: Loaded and verified 8 addons
[space.arim.libertybans.core.AbstractBaseFoundation]: Conducting start phase...
[com.zaxxer.hikari.HikariDataSource]: LibertyBansPool-MariaDB - Starting...
Couldn't pass ProxyInitializeEvent to libertybans
java.lang.NoClassDefFoundError: me/lucko/luckperms/lib/mariadb/client/SocketHelper (wrong name: org/mariadb/jdbc/client/SocketHelper)
        at java.lang.ClassLoader.defineClass1(Native Method) ~[?:?]
        at java.lang.ClassLoader.defineClass(ClassLoader.java:1012) ~[?:?]
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150) ~[?:?]
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:524) ~[?:?]
        at java.net.URLClassLoader$1.run(URLClassLoader.java:427) ~[?:?]
        at java.net.URLClassLoader$1.run(URLClassLoader.java:421) ~[?:?]
        at java.security.AccessController.doPrivileged(AccessController.java:712) ~[?:?]
        at java.net.URLClassLoader.findClass(URLClassLoader.java:420) ~[?:?]
        at java.lang.ClassLoader.loadClass(ClassLoader.java:587) ~[?:?]
        at com.velocitypowered.proxy.plugin.PluginClassLoader.loadClass0(PluginClassLoader.java:70) ~[velocity-3.2.0-SNAPSHOT-256.jar:3.2.0-SNAPSHOT (git-40b76c63-b256)]
        at com.velocitypowered.proxy.plugin.PluginClassLoader.loadClass0(PluginClassLoader.java:79) ~[velocity-3.2.0-SNAPSHOT-256.jar:3.2.0-SNAPSHOT (git-40b76c63-b256)]
        at com.velocitypowered.proxy.plugin.PluginClassLoader.loadClass(PluginClassLoader.java:64) ~[velocity-3.2.0-SNAPSHOT-256.jar:3.2.0-SNAPSHOT (git-40b76c63-b256)]
        at java.lang.ClassLoader.loadClass(ClassLoader.java:574) ~[?:?]
        at java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[?:?]
        at org.mariadb.jdbc.client.impl.ConnectionHelper.connectSocket(ConnectionHelper.java:125) ~[?:?]
        at org.mariadb.jdbc.client.impl.StandardClient.<init>(StandardClient.java:99) ~[?:?]
        at org.mariadb.jdbc.Driver.connect(Driver.java:70) ~[?:?]
        at org.mariadb.jdbc.MariaDbDataSource.getConnection(MariaDbDataSource.java:100) ~[?:?]
        at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:359) ~[?:?]
        at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:201) ~[?:?]
        at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:470) ~[?:?]
        at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:561) ~[?:?]
        at com.zaxxer.hikari.pool.HikariPool.<init>(HikariPool.java:100) ~[?:?]
        at com.zaxxer.hikari.HikariDataSource.<init>(HikariDataSource.java:81) ~[?:?]
        at space.arim.libertybans.core.database.DatabaseSettings.createDataSource(DatabaseSettings.java:91) ~[?:?]
        at space.arim.libertybans.core.database.DatabaseSettings.create(DatabaseSettings.java:101) ~[?:?]
        at space.arim.libertybans.core.database.DatabaseSettings.create(DatabaseSettings.java:77) ~[?:?]
        at space.arim.libertybans.core.database.DatabaseManager.startup(DatabaseManager.java:86) ~[?:?]
        at space.arim.libertybans.core.LifecycleGodfather.startup0(LifecycleGodfather.java:77) ~[?:?]
        at space.arim.libertybans.core.AbstractBaseFoundation.timedEvent(AbstractBaseFoundation.java:126) ~[?:?]
        at space.arim.libertybans.core.AbstractBaseFoundation.startup(AbstractBaseFoundation.java:64) ~[?:?]
        at space.arim.libertybans.env.velocity.plugin.VelocityPlugin.initialize(VelocityPlugin.java:110) ~[?:?]
        at space.arim.libertybans.env.velocity.plugin.VelocityPlugin.onProxyInitialize(VelocityPlugin.java:72) ~[?:?]
        at space.arim.libertybans.env.velocity.plugin.Lmbda$3.execute(Unknown Source) ~[?:?]
        at com.velocitypowered.proxy.event.UntargetedEventHandler$VoidHandler.lambda$buildHandler$0(UntargetedEventHandler.java:56) ~[velocity-3.2.0-SNAPSHOT-256.jar:3.2.0-SNAPSHOT (git-40b76c63-b256)]
        at com.velocitypowered.proxy.event.VelocityEventManager.fire(VelocityEventManager.java:598) ~[velocity-3.2.0-SNAPSHOT-256.jar:3.2.0-SNAPSHOT (git-40b76c63-b256)]
        at com.velocitypowered.proxy.event.VelocityEventManager.lambda$fire$5(VelocityEventManager.java:479) ~[velocity-3.2.0-SNAPSHOT-256.jar:3.2.0-SNAPSHOT (git-40b76c63-b256)]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
        at java.lang.Thread.run(Thread.java:833) [?:?]
Listening on /[0:0:0:0:0:0:0:0%0]:25567
Listening for GS4 query on /[0:0:0:0:0:0:0:0%0]:25567
Done (2.39s)!

That's all the info I have, thanks for your support & continued maintenance of the plugin!

darksaid98 commented 1 year ago

Followup. LuckPerms v5.4.77 updated the MariaDB driver which messes up LibertyBans which relies on it.

Installing version LuckPerms v5.4.76 or lower resolves the issue as a temporary fix.

KoxSosen commented 1 year ago

Hello!

Thank you for reporting! This is an important issue, as maintaining compatibility with LuckPerms is important. I'll try to work this one out, and I will update this issue if I found a solution.

A248 commented 1 year ago

This is a problem with LuckPerms. They are writing an invalid class file. I've opened an issue with them, so please refer there. https://github.com/LuckPerms/LuckPerms/issues/3681