PaperMC / Paper

The most widely used, high performance Minecraft server that aims to fix gameplay and mechanics inconsistencies
https://papermc.io/
Other
9.69k stars 2.26k forks source link

PowerPC64le sqlite is broken #8745

Closed TMinusBlastedRocket closed 1 year ago

TMinusBlastedRocket commented 1 year ago

Expected behavior

sqlite enabled plugins working on a ppc64le system (because java should be universal)

Observed/Actual behavior

any plugin that uses SQL fails spectacularly

Steps/models to reproduce

acquire a very expensive IBM server (such as the S824 (the unit i have) or an,S924,S822,etc...) or use QEMU like a normal person who doesn't drunkenly buy supercomputers on eBay (be sure to set ppc64le and not ppc64 or ppc32)

run paper with a plugin that uses papers SQL functions (such as plotsquared) watch as it doesn't run

Plugin and Datapack List

plotsquared and many, many more

Paper version

This server is running Paper version git-Paper-387 (MC: 1.18.2) (Implementing API version 1.18.2-R0.1-SNAPSHOT) (Git: df630a2 on ver/1.18.2)

Other

No response

e-im commented 1 year ago

the sqlite jdbc driver is implemented as a native library.

Do you have logs of the failure? But regardless, very likely not something for paper to fix/do anything about.

TMinusBlastedRocket commented 1 year ago

java.sql.SQLException: Error opening connection at org.sqlite.SQLiteConnection.open(SQLiteConnection.java:244) ~[sqlite-jdbc-3.36.0.3.jar:?] at org.sqlite.SQLiteConnection.(SQLiteConnection.java:61) ~[sqlite-jdbc-3.36.0.3.jar:?] at org.sqlite.jdbc3.JDBC3Connection.(JDBC3Connection.java:28) ~[sqlite-jdbc-3.36.0.3.jar:?] at org.sqlite.jdbc4.JDBC4Connection.(JDBC4Connection.java:21) ~[sqlite-jdbc-3.36.0.3.jar:?] at org.sqlite.JDBC.createConnection(JDBC.java:115) ~[sqlite-jdbc-3.36.0.3.jar:?] at org.sqlite.JDBC.connect(JDBC.java:90) ~[sqlite-jdbc-3.36.0.3.jar:?] at java.sql.DriverManager.getConnection(DriverManager.java:681) ~[java.sql:?] at java.sql.DriverManager.getConnection(DriverManager.java:252) ~[java.sql:?] at de.czymm.serversigns.taskmanager.datastorage.SQLiteDataStorageAccessor.(SQLiteDataStorageAccessor.java:76) ~[ServerSigns.jar:?] at de.czymm.serversigns.taskmanager.datastorage.SQLiteDataStorageHandler.init(SQLiteDataStorageHandler.java:41) ~[ServerSigns.jar:?] at de.czymm.serversigns.taskmanager.TaskManager.init(TaskManager.java:78) ~[ServerSigns.jar:?] at de.czymm.serversigns.ServerSignsPlugin.onEnable(ServerSignsPlugin.java:97) ~[ServerSigns.jar:?] at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:264) ~[paper-api-1.18.2-R0.1-SNAPSHOT.jar:?] at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:370) ~[paper-api-1.18.2-R0.1-SNAPSHOT.jar:?] at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:541) ~[paper-api-1.18.2-R0.1-SNAPSHOT.jar:?] at org.bukkit.craftbukkit.v1_18_R2.CraftServer.enablePlugin(CraftServer.java:560) ~[paper-1.18.2.jar:git-Paper-387] at org.bukkit.craftbukkit.v1_18_R2.CraftServer.enablePlugins(CraftServer.java:474) ~[paper-1.18.2.jar:git-Paper-387] at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:665) ~[paper-1.18.2.jar:git-Paper-387] at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:432) ~[paper-1.18.2.jar:git-Paper-387] at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:316) ~[paper-1.18.2.jar:git-Paper-387] at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1164) ~[paper-1.18.2.jar:git-Paper-387] at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:316) ~[paper-1.18.2.jar:git-Paper-387] at java.lang.Thread.run(Thread.java:833) ~[?:?] Caused by: java.lang.Exception: No native library found for os.name=Linux, os.arch=ppc64le, paths=[/usr/java/packages/lib:/usr/lib/powerpc64le-linux-gnu/jni:/lib/powerpc64le-linux-gnu:/usr/lib/powerpc64le-linux-gnu:/usr/lib/jni:/lib:/usr/lib] at org.sqlite.SQLiteJDBCLoader.loadSQLiteNativeLibrary(SQLiteJDBCLoader.java:389) ~[sqlite-jdbc-3.36.0.3.jar:?] at org.sqlite.SQLiteJDBCLoader.initialize(SQLiteJDBCLoader.java:68) ~[sqlite-jdbc-3.36.0.3.jar:?] at org.sqlite.core.NativeDB.load(NativeDB.java:63) ~[sqlite-jdbc-3.36.0.3.jar:?] at org.sqlite.SQLiteConnection.open(SQLiteConnection.java:240) ~[sqlite-jdbc-3.36.0.3.jar:?] ... 22 more ``

e-im commented 1 year ago

xerial/sqlite-jdbc/pull/691

Paper bundles 3.36.0.3, this change was released in 3.39.2.0

electronicboy commented 1 year ago

Java is write once, debug everywhere; native libraries however, are not

It looks like newer versions of the SQLite connector have this resolved, 3.39.2.0 resolves this, spigot is using 3.36.0.3

The nature of the SQLite driver and, well, jdbc stuff in general generally makes just bumping this stuff somewhat of a pain, but, trivial to do if you can build your own jar

On Fri, 30 Dec 2022, 23:15 TMinusBlastedRocket, @.***> wrote:

Expected behavior

sqlite enabled plugins working on a ppc64le system (because java should be universal) Observed/Actual behavior

any plugin that uses SQL fails spectacularly Steps/models to reproduce

acquire a very expensive IBM server (such as the S824 (the unit i have) or an,S924,S822,etc...) or use QEMU like a normal person who doesn't drunkenly buy supercomputers on eBay (be sure to set ppc64le and not ppc64 or ppc32)

run paper with a plugin that uses papers SQL functions (such as plotsquared) watch as it doesn't run Plugin and Datapack List

plotsquared and many, many more Paper version

This server is running Paper version git-Paper-387 (MC: 1.18.2) (Implementing API version 1.18.2-R0.1-SNAPSHOT) (Git: df630a2 https://github.com/PaperMC/Paper/commit/df630a27cc2d0b3731bf5dd311c4119c9c5b43f6 on ver/1.18.2) Other

No response

— Reply to this email directly, view it on GitHub https://github.com/PaperMC/Paper/issues/8745, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJMAZBAJIPYCMZC56TUL3DWP5UHTANCNFSM6AAAAAATNGZLVE . You are receiving this because you are subscribed to this thread.Message ID: @.***>

TMinusBlastedRocket commented 1 year ago

After some testing, the problem is not with sqllite but with how paper interprets architectures, the "ppc64" tag is used for "ppc64le" systems in the sqllite jar, but paper is looking for ppc64le , papers arch checker code needs a check to use the ppc64 folder binary when ppc64le is in use

TMinusBlastedRocket commented 1 year ago

After some testing, the problem is not with sqllite but with how paper interprets architectures, the "ppc64" tag is used for "ppc64le" systems in the sqllite jar, but paper is looking for ppc64le , papers arch checker code needs a check to use the ppc64 folder binary when ppc64le is in use

This is in addition to needing to merge the 64le fix sqllite has recently added

electronicboy commented 1 year ago

the logic for that exists within the sqlite library, not paper; the 64le fix that we pointed to of sqlite is basically where they fixed that platform mapping

TMinusBlastedRocket commented 1 year ago

Ah, nevermind.... hope that a merge will be possible as paper seems to be the only MC server that actually performs well on power systems. good multithreading is a necessity on POWER as it's single threading is flaming garbage, that being said its MT is incredible

But I understand if a merge won't be possible soon, as it is a complex project

(Note after a year: POWER has great ST, but i was using SMT8 so i didn't know that, if your running MC, PLEASE use SMT1-4)

Warriorrrr commented 1 year ago

This issue can be closed considering https://github.com/PaperMC/Paper/pull/8778#issuecomment-1551521397