selinux
Created by: baltzell
jdbc sqlite crashes if /tmp
is mounted with "noexec" (the new normal at JLab):
Failed to load native library:sqlite-3.40.0.0-ca7d426c-6efd-404b-a0a5-1d37f50d611d-libsqlitejdbc.so. osinfo: Linux/x86_64
java.lang.UnsatisfiedLinkError: /tmp/sqlite-3.40.0.0-ca7d426c-6efd-404b-a0a5-1d37f50d611d-libsqlitejdbc.so: /tmp/sqlite-3.40.0.0-ca7d426c-6efd-404b-a0a5-1d37f50d611d-libsqlitejdbc.so: failed to map segment from shared object
...
Exception in thread "main" java.lang.UnsatisfiedLinkError: 'void org.sqlite.core.NativeDB._open_utf8(byte[], int)'
This also seems to depend on the JRE version, e.g., the system default openjdk11 on el9 is unaffected, probably it has some selinux exemption. One solution is manually setting a suitable replacement directory, via -Djava.io.tmpdir
and/or -Dorg.sqlite.tmpdir
.
Note, apptainer also doesn't like it and similarly requires $APPTAINER_TMPDIR
. Also seen issues with openjdk installatations with shared objects without executable bit set, presumably also due to selinux changes on el9.