Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SIGILL Exception Running with Docker Desktop on Mac OSX Sequoia 15.2 #6

Open
codeconsole opened this issue Dec 31, 2024 · 1 comment

Comments

@codeconsole
Copy link

codeconsole commented Dec 31, 2024

If I just try to run docker exec -it spring-boot-crac-demo java, I get the same java error.

% ./checkpoint.sh
Using CRaC enabled JDK https://cdn.azul.com/zulu/bin/zulu21.36.19-ca-crac-jdk21.0.4-linux_aarch64.tar.gz
... (omitted)
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  0.734 s
[INFO] Finished at: 2024-12-30T21:19:58-08:00
[INFO] ------------------------------------------------------------------------
#0 building with "desktop-linux" instance using docker driver

#1 [internal] load build definition from Dockerfile
#1 transferring dockerfile: 551B done
#1 WARN: LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 5)
#1 WARN: LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 6)
#1 WARN: LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 7)
#1 WARN: JSONArgsRecommended: JSON arguments recommended for ENTRYPOINT to prevent unintended behavior related to OS signals (line 15)
#1 DONE 0.0s

#2 [internal] load metadata for docker.io/library/ubuntu:22.04
#2 DONE 0.0s

#3 [internal] load .dockerignore
#3 transferring context: 2B done
#3 DONE 0.0s

#4 [1/6] FROM docker.io/library/ubuntu:22.04@sha256:0e5e4a57c2499249aafc3b40fcd541e9a456aab7296681a3994d631587203f97
#4 resolve docker.io/library/ubuntu:22.04@sha256:0e5e4a57c2499249aafc3b40fcd541e9a456aab7296681a3994d631587203f97 0.0s done
#4 CACHED

#5 [internal] load build context
#5 transferring context: 22.59MB 0.1s done
#5 DONE 0.1s

#6 [2/6] ADD https://cdn.azul.com/zulu/bin/zulu21.36.19-ca-crac-jdk21.0.4-linux_aarch64.tar.gz /opt/jdk/openjdk.tar.gz
#6 DONE 7.9s

#6 [2/6] ADD https://cdn.azul.com/zulu/bin/zulu21.36.19-ca-crac-jdk21.0.4-linux_aarch64.tar.gz /opt/jdk/openjdk.tar.gz
#6 CACHED

#7 [2/6] ADD https://cdn.azul.com/zulu/bin/zulu21.36.19-ca-crac-jdk21.0.4-linux_aarch64.tar.gz /opt/jdk/openjdk.tar.gz
#7 DONE 0.2s

#8 [3/6] RUN tar --extract --file /opt/jdk/openjdk.tar.gz --directory "/opt/jdk" --strip-components 1; rm /opt/jdk/openjdk.tar.gz;
#8 DONE 1.9s

#9 [4/6] RUN mkdir -p /opt/app
#9 DONE 0.1s

#10 [5/6] COPY target/spring-boot-crac-demo-1.0.0-SNAPSHOT.jar /opt/app/spring-boot-crac-demo-1.0.0-SNAPSHOT.jar
#10 DONE 0.0s

#11 [6/6] COPY src/scripts/entrypoint.sh /opt/app/entrypoint.sh
#11 DONE 0.0s

#12 exporting to image
#12 exporting layers
#12 exporting layers 6.5s done
#12 exporting manifest sha256:33fa0a9fb8d708e101c9fcf554281132fe3e65937e9d5d18230b7785afd8a087
#12 exporting manifest sha256:33fa0a9fb8d708e101c9fcf554281132fe3e65937e9d5d18230b7785afd8a087 done
#12 exporting config sha256:cd06df903c22244669bff1baf4d7f9b506e466cafe930021ec96a10f67cb34f5 done
#12 exporting attestation manifest sha256:8a4c5ed1b0012bfba10aa6535054a7f13c854c663b06de6a100b2fe1f797fac2 0.0s done
#12 exporting manifest list sha256:a0296dbea7f81d8000b1dbfcc2e2534fbe5145df8be504d91e54d0c9a3910fa6 done
#12 naming to docker.io/sdeleuze/spring-boot-crac-demo:builder done
#12 unpacking to docker.io/sdeleuze/spring-boot-crac-demo:builder
#12 unpacking to docker.io/sdeleuze/spring-boot-crac-demo:builder 1.7s done
#12 DONE 8.2s

 4 warnings found (use docker --debug to expand):
 - LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 7)
 - JSONArgsRecommended: JSON arguments recommended for ENTRYPOINT to prevent unintended behavior related to OS signals (line 15)
 - LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 5)
 - LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 6)
9dae69bc29c623cad15b05f744e407e40f9aab4362d823eee00bc22bace2ab7e
Please wait during creating the checkpoint...
sha256:e7b4b8584a998553069d8da78765f385a7ed22457f6859663a2cacfc5bc79fbe
9dae69bc29c6

% docker logs -f spring-boot-crac-demo

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGILL (0x4) at pc=0x0000ffffa7c67c5c, pid=129, tid=131
#
# JRE version:  (21.0.4+7) (build )
# Java VM: OpenJDK 64-Bit Server VM (21.0.4+7-LTS, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-aarch64)
# Problematic frame:
# j  java.lang.System.registerNatives()V+0 [email protected]
#
# No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# //hs_err_pid129.log
[0.012s][warning][os] Loading hsdis library failed
#
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
/opt/app/entrypoint.sh: line 20:   129 Aborted                 java -Dmanagement.endpoint.health.probes.add-additional-paths="true" -Dmanagement.health.probes.enabled="true" -XX:CRaCCheckpointTo=$CRAC_FILES_DIR -jar /opt/app/spring-boot-crac-demo-1.0.0-SNAPSHOT.jar
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGILL (0x4) at pc=0x0000ffff77c67c5c, pid=139, tid=140
#
# JRE version:  (21.0.4+7) (build )
# Java VM: OpenJDK 64-Bit Server VM (21.0.4+7-LTS, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-aarch64)
# Problematic frame:
# j  java.lang.System.registerNatives()V+0 java.base
#
# No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# //hs_err_pid139.log
[0.023s][warning][os] Loading hsdis library failed
#
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
/opt/app/entrypoint.sh: line 20:   139 Aborted                 jcmd /opt/app/spring-boot-crac-demo-1.0.0-SNAPSHOT.jar JDK.checkpoint
./mvnw --version
Apache Maven 3.8.7 (b89d5959fcde851dcb1c8946a785a163f14e1e29)
Maven home: /~/.m2/wrapper/dists/apache-maven-3.8.7-bin/678cc9d4/apache-maven-3.8.7
Java version: 21.0.5, vendor: Azul Systems, Inc., runtime: /~/.sdkman/candidates/java/21.0.5-zulu/zulu-21.jdk/Contents/Home
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "15.2", arch: "aarch64", family: "Mac"
% docker --version
Docker version 27.3.1, build ce12230

I am running a MacBook Pro with a M4 Max chipset.

I am able to get it running if I use Orb Stack instead of Docker Desktop.

@codeconsole codeconsole changed the title Java stopped working in container - A fatal error has been detected by the Java Runtime Environment Running on Mac OSX Dec 31, 2024
@codeconsole codeconsole changed the title Running on Mac OSX Running with Docker Desktop on Mac OSX Sequoia 15.2 Dec 31, 2024
@codeconsole codeconsole changed the title Running with Docker Desktop on Mac OSX Sequoia 15.2 SIGILL Exception Running with Docker Desktop on Mac OSX Sequoia 15.2 Dec 31, 2024
@codeconsole
Copy link
Author

Work Around

use -XX:UseSVE=0

docker run -d --privileged --rm --name=spring-boot-crac-demo --ulimit nofile=1024 -p 8080:8080 -v $(pwd)/target:/opt/mnt -e JAVA_TOOL_OPTIONS="-XX:UseSVE=0" -e FLAG=$1 sdeleuze/spring-boot-crac-demo:builder

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant