Closed jskov-jyskebank-dk closed 3 years ago
Just as a guess, could you update containers-common and execute restorecon -R -v $HOME/.lib/share/containers
Yes!
Well, restorecon did not help (restorecon -R -v $HOME/.local/share/containers
)
I also tried with sudo (on the realpath).
But your guess means you suspect bad local data. So I deleted $HOME/.local/share/containers. And that did the trick.
I had feared it was due to some selinux configuration that would eventually filter through to coreos on our OpenShift instances. And that would be pretty bleak.
So thanks a lot!
Description
Graalvm java/keytool fails to run in ubi8.4 base image due to selinux.
Steps to reproduce the issue:
ENV GRAALVM_VERSION='21.1.0' \ GRAALVM_SHA256SUM=39252954d2cb16dbc8ce4269f8b93a326a0efffdce04625615e827fe5b5e4ab7 \ JAVA_HOME=/opt/graalvm
RUN curl -L https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-\${GRAALVM_VERSION}/graalvm-ce-java11-linux-amd64-\${GRAALVM_VERSION}.tar.gz -o /tmp/java.tgz \ && echo "\$GRAALVM_SHA256SUM /tmp/java.tgz" | sha256sum -c - \ && mkdir -p \$JAVA_HOME \ && tar -x --strip-components=1 -f /tmp/java.tgz -C \$JAVA_HOME \ && rm -rf /tmp/java.tgz
ENV PATH="\$PATH:\$JAVA_HOME/bin"
RUN java -version RUN keytool -list EOF
STEP 1: FROM registry.access.redhat.com/ubi8:8.4-206.1626828523 STEP 2: ENV GRAALVM_VERSION='21.1.0' GRAALVM_SHA256SUM=39252954d2cb16dbc8ce4269f8b93a326a0efffdce04625615e827fe5b5e4ab7 JAVA_HOME=/opt/graalvm --> fafda048fc6 STEP 3: RUN curl -L https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-${GRAALVM_VERSION}/graalvm-ce-java11-linux-amd64-${GRAALVM_VERSION}.tar.gz -o /tmp/java.tgz && echo "$GRAALVM_SHA256SUM /tmp/java.tgz" | sha256sum -c - && mkdir -p $JAVA_HOME && tar -x --strip-components=1 -f /tmp/java.tgz -C $JAVA_HOME && rm -rf /tmp/java.tgz % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 651 100 651 0 0 2079 0 --:--:-- --:--:-- --:--:-- 2079 100 388M 100 388M 0 0 16.2M 0 0:00:23 0:00:23 --:--:-- 14.8M /tmp/java.tgz: OK --> ed015cd7020 STEP 4: ENV PATH="$PATH:$JAVA_HOME/bin" --> 0e262db31bc STEP 5: RUN java -version openjdk version "11.0.11" 2021-04-20 OpenJDK Runtime Environment GraalVM CE 21.1.0 (build 11.0.11+8-jvmci-21.1-b05) OpenJDK 64-Bit Server VM GraalVM CE 21.1.0 (build 11.0.11+8-jvmci-21.1-b05, mixed mode, sharing) --> 3f1d844feb9 STEP 6: RUN keytool -list #
A fatal error has been detected by the Java Runtime Environment:
#
Internal Error (jvmci.cpp:82), pid=1, tid=13
fatal error: Unable to load JVMCI shared library from /opt/graalvm/lib/libjvmcicompiler.so: /opt/graalvm/lib/libjvmcicompiler.so: cannot restore segment prot after reloc: Permission denied
#
JRE version: OpenJDK Runtime Environment GraalVM CE 21.1.0 (11.0.11+8) (build 11.0.11+8-jvmci-21.1-b05)
Java VM: OpenJDK 64-Bit Server VM GraalVM CE 21.1.0 (11.0.11+8-jvmci-21.1-b05, mixed mode, sharing, tiered, jvmci, jvmci compiler, compressed oops, g1 gc, linux-amd64)
Core dump will be written. Default location: Core dumps may be processed with "/usr/lib/systemd/systemd-coredump %P %u %g %s %t %c %h" (or dumping to //core.1)
#
An error report file with more information is saved as:
//hs_err_pid1.log
#
If you would like to submit a bug report, please visit:
https://github.com/oracle/graal/issues
#
[error occurred during error reporting (), id 0xb, SIGSEGV (0xb) at pc=0x00007f255b111e91]
Error: error building at STEP "RUN keytool -list": error while running runtime: exit status 127
Using Fedora:34 as base image also seems to work, so I am unsure if this is a problem of the base image or my Fedora 33 development box.
The se log shows:
Output of
rpm -q buildah
orapt list buildah
:Output of
buildah version
:Output of
podman version
if reporting apodman build
issue:*Output of `cat /etc/release`:**
Output of
uname -a
:Output of
cat /etc/containers/storage.conf
: