Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Jul 2021 18:46:33 +0200
From:      Michael Osipov <1983-01-06@gmx.net>
To:        freebsd-java@freebsd.org
Subject:   Re: Fwd: Java core dump on freeBSD 12.2
Message-ID:  <a6b17525-18a2-6fad-4943-bca378fa1ffa@gmx.net>
In-Reply-To: <CAJJNRpOjShfuKjjCQ0OGR86hbHM61UHz2ohQsQBWBRSi%2BZogrQ@mail.gmail.com>
References:  <CAJJNRpNasQD==m7G_FB8cCcgCDJjPehj53NFz54zGsRWzwpTAw@mail.gmail.com> <261b4107-b2cb-8008-e092-8b05300ef337@gmx.net> <CAJJNRpObe3MEZTjCbsaJWC%2BBjKgYFQbVGXAFynPqrsBukN9ULg@mail.gmail.com> <CAJJNRpOjShfuKjjCQ0OGR86hbHM61UHz2ohQsQBWBRSi%2BZogrQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Am 2021-07-12 um 17:59 schrieb Simeo Reig:
> Hi again,
>
>    You are right. JDBC driver from xerial seems to have some issues in
> freebsd. Version 3.32.X versions works ok, but above it (right now last =
one
> is 3.36.01 <https://github.com/xerial/sqlite-jdbc/releases>) don't want =
to
> connect with DB: "DB corrupt" or "java.lang.UnsatisfiedLinkError: 'int
> org.sqlite.core.NativeDB.limit(int, int)'" it depends on version.  Db is=
n't
> corrupt, it has the same sha1 in the Linux machine and I have tested it
> with pragma integrity_check on freeBSD. I needed to have it online and I
> downgraded jdbc to last 3.32 version.

Although I don't have access to your deployment, the error is likely
very obvious.
I'd like to see these solved to avoid issues like yours:
* https://github.com/xerial/sqlite-jdbc/issues/542
* https://github.com/xerial/sqlite-jdbc/issues/495

Generally, I don't trust binaries precomplied for FreeBSD because I know
people screw up.

There is a mismatch between the compiled version and the version loaded
at runtime. It seems that the bundled (if this one is used) native
library misses these:
*
https://github.com/xerial/sqlite-jdbc/blame/master/src/main/java/org/sqlit=
e/core/NativeDB.java#L434-L436
*
https://github.com/xerial/sqlite-jdbc/blame/master/src/main/java/org/sqlit=
e/core/NativeDB.c#L1329-L1343

My recommendation:
* Remove all native libs from the JAR
* Install SQLite 3 through ports
* Compile the driver native shim and link /dynamically/ against the
libsqlte3.so from LOCALBASE.

I have modified the driver recently and upstreamed to load all libs from
loader's default path w/o the need to provide anything.

If you don't know how to do the above, let me know I can compile the
shim for you for amd64.

Michael



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?a6b17525-18a2-6fad-4943-bca378fa1ffa>