komga icon indicating copy to clipboard operation
komga copied to clipboard

Sqlite failed to load native library on synology DSM7 dsplay216

Open mastervol opened this issue 2 years ago • 5 comments

Steps to reproduce

Start komga: java - jar komga-0.157.0.jar

Expected behavior

No crash when starting

Actual behavior

Komga start process crashes

Logs

2022-08-12 09:56:40.608  INFO 22390 --- [           main] com.zaxxer.hikari.HikariDataSource       : SqliteUdfPool - Starting...
Failed to load native library:sqlite-3.36.0.3-890166a1-0a50-49e5-b338-69badc79195b-libsqlitejdbc.so. osinfo: Linux/armv7java.lang.UnsatisfiedLinkError: /tmp/sqlite-3.36.0.3-890166a1-0a50-49e5-b338-69badc79195b-libsqlitejdbc.so: /tmp/sqlite-3.36.0.3-890166a1-0a50-49e5-b338-69badc79195b-libsqlitejdbc.so: failed to map segment from shared object
2022-08-12 09:56:42.675 ERROR 22390 --- [           main] com.zaxxer.hikari.pool.HikariPool        : SqliteUdfPool - Exception during pool initialization.

java.sql.SQLException: Error opening connection
        at org.sqlite.SQLiteConnection.open(SQLiteConnection.java:244) ~[sqlite-jdbc-3.36.0.3.jar!/:na]
        at org.sqlite.SQLiteConnection.<init>(SQLiteConnection.java:61) ~[sqlite-jdbc-3.36.0.3.jar!/:na]

Komga version

0.157.0

Operating system

Synology DSM 7.1-42661 Update 3

Other details

uname -m armv7l

cat /proc/cpuinfo

processor       : 0
model name      : ARMv7 Processor rev 0 (v7l)
BogoMIPS        : 2996.63
Features        : swp half thumb fastmult vfp edsp neon vfpv3 tls
CPU implementer : 0x41
CPU architecture: 7
CPU variant     : 0x3
CPU part        : 0xc09
CPU revision    : 0

processor       : 1
model name      : ARMv7 Processor rev 0 (v7l)
BogoMIPS        : 2989.26
Features        : swp half thumb fastmult vfp edsp neon vfpv3 tls
CPU implementer : 0x41
CPU architecture: 7
CPU variant     : 0x3
CPU part        : 0xc09
CPU revision    : 0

Hardware        : STi SoC with Flattened Device Tree
Revision        : 0000
Serial          : 0000000000000000

Acknowledgements

  • [X] I have searched the existing issues and this is a new ticket, NOT a duplicate or related to another open issue.
  • [X] I have written a short but informative title.
  • [X] I have checked the FAQ.
  • [X] I have updated the app to the latest version.
  • [X] I will fill out all of the requested information in this form.

mastervol avatar Aug 12 '22 08:08 mastervol

Can you provide the full log file ?

gotson avatar Aug 12 '22 09:08 gotson

Yes, see the following logging file logging.log

mastervol avatar Aug 12 '22 11:08 mastervol

I think there might an incompatibility between your arm flavor and the one for which sqlite-jsbc is compiled.

Could you try the following on your DS 216 Play:

  • download sqlite-jdbc-3.39.2.0.jar
  • copy from here the content of Sample.java into a file called Sample.java, and place it in the same folder as the sqlite-jdbc jar you downloaded
  • run the following commands:
javac Sample.java
java -classpath ".:sqlite-jdbc-3.39.2.0.jar" Sample

and see what result you get

gotson avatar Aug 15 '22 01:08 gotson

Ok thanks. Here is the output. I only had the runtime installed so I had to install Java 11 JDK.

root@stfuplay:/volume1/@appstore/komga/test# java --version
openjdk 17.0.2 2022-01-18
OpenJDK Runtime Environment Temurin-17.0.2+8 (build 17.0.2+8)
OpenJDK Server VM Temurin-17.0.2+8 (build 17.0.2+8, mixed mode, sharing)
root@stfuplay:/volume1/@appstore/komga/test# which java
/usr/local/bin/java
root@stfuplay:/volume1/@appstore/komga/test# java
java     javac    javadoc  javap
root@stfuplay:/volume1/@appstore/komga/test# javac Sample.java
root@stfuplay:/volume1/@appstore/komga/test# ls
Sample.class  Sample.java  sqlite-jdbc-3.39.2.0.jar
root@stfuplay:/volume1/@appstore/komga/test# java -classpath ".:sqlite-jdbc-3.39.2.0.jar" Sample
Failed to load native library:sqlite-3.39.2.0-4862e885-20d4-47f7-a1f8-ed7c54fd2855-libsqlitejdbc.so. osinfo: Linux/armv7
java.lang.UnsatisfiedLinkError: /tmp/sqlite-3.39.2.0-4862e885-20d4-47f7-a1f8-ed7c54fd2855-libsqlitejdbc.so: /tmp/sqlite-3.39.2.0-4862e885-20d4-47f7-a1f8-ed7c54fd2855-libsqlitejdbc.so: failed to map segment from shared object
Error opening connection

So it seems it cannot map the correct driver? Anything else I can test?

mastervol avatar Aug 15 '22 07:08 mastervol

luckily i'm also the maintainer of sqlite-jdbc these days :)

I've created https://github.com/xerial/sqlite-jdbc/issues/765

gotson avatar Aug 15 '22 08:08 gotson