Second (and later) boots with WorldGuard crashes papermc: failing to initialize SQLite profile cache
dettner opened this issue ยท 2 comments
Versions
WorldEdit version:
FastAsyncWorldEdit-Bukkit-1.16-657
WorldGuard version:
worldguard-bukkit-7.0.4.
Platform version:
git-Paper-603
Java version:
openjdk 11.0.10 2021-01-19
OpenJDK Runtime Environment (build 11.0.10+9-1)
OpenJDK 64-Bit Server VM (build 11.0.10+9-1, mixed mode)
OS:
FreeBSD mineos 12.2-RELEASE-p6
Describe the bug
First boot with worldguard-bukkit-7.0.4.jar in the plugins folder succeeds:
- a plugins/WorldGuard/ directory is created.
- The plugin works in game.
When restarting however, the whole server crashes during initialization of WorldGuard.
The log file reports:
//first, a whole lot of log lines
[Server thread/INFO]: [WorldGuard] Enabling WorldGuard v7.0.4+f7ff984
//after previous line: nothing.... The server has crashed. (This line is of course not a part of the log)
A java crash dump is created. Here is an extract:
# SIGBUS (0xa) at pc=0x000000080281f0ea, pid=92081, tid=102107
Command Line: -Xmx10240M -Xms10240M -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20 -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 -XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1 -Dusing.aikars.flags=https://mcflags.emc.gs -Daikars.new.flags=true paperclip.jar nogui
Current thread (0x0000000837819800): JavaThread "Server thread" [_thread_in_vm, id=102107, stack(0x00007fffdd3d4000,0x00007fffdd4d4000)]
Stack: [0x00007fffdd3d4000,0x00007fffdd4d4000], sp=0x00007fffdd4d2620, free space=1017k
Native frames: (J=compiled Java code, A=aot compiled Java code, j=interpreted, Vv=VM code, C=native code)
V [libjvm.so+0xc1f0ea] JVM_RaiseSignal+0x105ada
V [libjvm.so+0xc2024a] JVM_RaiseSignal+0x106c3a
V [libjvm.so+0xa57e37] AsyncGetCallTrace+0xe4a47
V [libjvm.so+0xa586d8] AsyncGetCallTrace+0xe52e8
j sun.nio.cs.UTF_8$Decoder.decodeBufferLoop(Ljava/nio/ByteBuffer;Ljava/nio/CharBuffer;)Ljava/nio/charset/CoderResult;+18 [email protected]
j sun.nio.cs.UTF_8$Decoder.decodeLoop(Ljava/nio/ByteBuffer;Ljava/nio/CharBuffer;)Ljava/nio/charset/CoderResult;+24 [email protected]
j java.nio.charset.CharsetDecoder.decode(Ljava/nio/ByteBuffer;Ljava/nio/CharBuffer;Z)Ljava/nio/charset/CoderResult;+57 [email protected]
j java.nio.charset.CharsetDecoder.decode(Ljava/nio/ByteBuffer;)Ljava/nio/CharBuffer;+46 [email protected]
j java.nio.charset.Charset.decode(Ljava/nio/ByteBuffer;)Ljava/nio/CharBuffer;+17 [email protected]
j org.sqlite.core.NativeDB.utf8ByteBufferToString(Ljava/nio/ByteBuffer;)Ljava/lang/String;+12
j org.sqlite.core.NativeDB.errmsg()Ljava/lang/String;+4
j org.sqlite.core.DB.newSQLException(I)Lorg/sqlite/SQLiteException;+2
j org.sqlite.core.DB.throwex(I)V+2
v ~StubRoutines::call_stub
V [libjvm.so+0xa5e9bd] AsyncGetCallTrace+0xeb5cd
V [libjvm.so+0xaa6bd4] AsyncGetCallTrace+0x1337e4
V [libjvm.so+0xaabf46] AsyncGetCallTrace+0x138b56
C [sqlite-3.34.0-6b5b285c-2bf5-4a48-8f03-ac7c9040729e-libsqlitejdbc.so+0xc2a5] Java_org_sqlite_core_NativeDB__1exec_1utf8+0x145
j org.sqlite.core.NativeDB._exec_utf8([B)I+0
j org.sqlite.core.NativeDB._exec(Ljava/lang/String;)I+5
j org.sqlite.jdbc3.JDBC3Statement.executeUpdate(Ljava/lang/String;)I+48
j com.sk89q.worldguard.util.profile.cache.SQLiteCache.createTable()V+24
j com.sk89q.worldguard.util.profile.cache.SQLiteCache.<init>(Ljava/io/File;)V+71
j com.sk89q.worldguard.WorldGuard.setup()V+60
j com.sk89q.worldguard.bukkit.WorldGuardPlugin.onEnable()V+36
j org.bukkit.plugin.java.JavaPlugin.setEnabled(Z)V+21
...
So there perhaps (?) seems to be a problem with an SQLite profile cache when enabling WorldGuard if the cache "file" already exists..?
Important info
If I remove worldguard-bukkit-7.0.4.jar from the plugins folder and start once again, the server does not crash. upon booting. However WorldGuard does not seem to be installed at all (even though the plugins/WorldGuard directory remains untouched by me). Putting the jar back once more makes the server crash when booting again. Removing the plugins/WorldGuard directory and restarting works as in step 1+2 below.
To Reproduce
- Install by putting jar in plugins folder
- Start server. It works. WorldGuard creates directory and works in-game.
- Stop server.
- Start server again. The server crashes when trying to initialize WorldGuard
Expected behavior
On step 4 I expect the server to recognize that WorldGuard is installed and that the server does not crash.
not a WG issue, something between sqlite (provided by the server) and whatever jank-ass jdk freebsd ships.