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

JVM Crash on Mac M4 with Mac OS 15.2 (sequoia) running as Docker Container (SVE Vector Length Issue SIGILL) #631

Open
2 tasks done
nichelia opened this issue Dec 14, 2024 · 1 comment

Comments

@nichelia
Copy link

nichelia commented Dec 14, 2024

The problem

On Mac M4 running macOS 15.2, I encountered a JVM crash when using Docker images with Java applications. This issue occurs with the following Docker tags:
• latest
• latest-dev
• The past three released versions.

Error Details

The JVM crashes with the following error:

A fatal error has been detected by the Java Runtime Environment:
SIGILL (0x4) at pc=0x0000ffff7ff3fc5c, pid=393, tid=404
...
Problematic frame:
j java.lang.System.registerNatives()V+0 [email protected]

After investigating, this crash is caused by the JVM’s attempt to determine the SVE (Scalable Vector Extensions) vector length using the prctl system call. On macOS 15.2, this call is forbidden by the sandboxing mechanism, causing the JVM to interpret an invalid vector length and crash.

Workaround

Adding the environment variable JAVA_TOOL_OPTIONS="-XX:UseSVE=0" resolves the issue by disabling SVE optimizations in the JVM.

Solution for Docker Compose

To fix this issue, add the following to the environment section of your Docker Compose file:

services:
  your-service-name:
    image: your-docker-image
    environment:
      - JAVA_TOOL_OPTIONS=-XX:UseSVE=0
     ...

This ensures the JVM starts with the -XX:UseSVE=0 option and prevents the crash.

Are you using the latest released version?

  • Yes

Have you read the troubleshooting page?

  • Yes

What type of installation are you running?

signal-cli-rest-api Docker Container

In which mode are you using the docker container?

Normal Mode

What's the architecture of your host system?

arm64

Additional information

No response

@nichelia
Copy link
Author

This is an ongoing issue and the above solution should only be temporary. I suspect this might be fixed soon by the underlying frameworks. However, I am posting for anyone that might have this exact issue in the coming days and prevent them wasting lots of time figuring this out.

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