diff --git a/docker-compose.minimal.yml b/docker-compose.minimal.yml index 2066c6b2ac..9d2da324fb 100644 --- a/docker-compose.minimal.yml +++ b/docker-compose.minimal.yml @@ -44,6 +44,8 @@ services: - OTEL_RESOURCE_ATTRIBUTES - OTEL_LOGS_EXPORTER=otlp - OTEL_SERVICE_NAME=ad + # Workaround on OSX for https://bugs.openjdk.org/browse/JDK-8345296 + - _JAVA_OPTIONS=-XX:UseSVE=0 depends_on: otel-collector: condition: service_started @@ -654,6 +656,8 @@ services: - OPENSEARCH_JAVA_OPTS=-Xms300m -Xmx300m - DISABLE_INSTALL_DEMO_CONFIG=true - DISABLE_SECURITY_PLUGIN=true + # Workaround on OSX for https://bugs.openjdk.org/browse/JDK-8345296 + - _JAVA_OPTIONS=-XX:UseSVE=0 ulimits: memlock: soft: -1 diff --git a/docker-compose.yml b/docker-compose.yml index 22ee8e86ac..b4f0d0a304 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -71,6 +71,8 @@ services: - OTEL_RESOURCE_ATTRIBUTES - OTEL_LOGS_EXPORTER=otlp - OTEL_SERVICE_NAME=ad + # Workaround on OSX for https://bugs.openjdk.org/browse/JDK-8345296 + - _JAVA_OPTIONS=-XX:UseSVE=0 depends_on: otel-collector: condition: service_started @@ -245,6 +247,8 @@ services: - OTEL_INSTRUMENTATION_MESSAGING_EXPERIMENTAL_RECEIVE_TELEMETRY_ENABLED=true - OTEL_RESOURCE_ATTRIBUTES - OTEL_SERVICE_NAME=fraud-detection + # Workaround on OSX for https://bugs.openjdk.org/browse/JDK-8345296 + - _JAVA_OPTIONS=-XX:UseSVE=0 depends_on: otel-collector: condition: service_started @@ -658,6 +662,8 @@ services: - OTEL_RESOURCE_ATTRIBUTES - OTEL_SERVICE_NAME=kafka - KAFKA_HEAP_OPTS=-Xmx400m -Xms400m + # Workaround on OSX for https://bugs.openjdk.org/browse/JDK-8345296 + - _JAVA_OPTIONS=-XX:UseSVE=0 healthcheck: test: nc -z kafka 9092 start_period: 10s @@ -798,6 +804,8 @@ services: - OPENSEARCH_JAVA_OPTS=-Xms300m -Xmx300m - DISABLE_INSTALL_DEMO_CONFIG=true - DISABLE_SECURITY_PLUGIN=true + # Workaround on OSX for https://bugs.openjdk.org/browse/JDK-8345296 + - _JAVA_OPTIONS=-XX:UseSVE=0 ulimits: memlock: soft: -1 diff --git a/src/ad/Dockerfile b/src/ad/Dockerfile index 1e8cd71d7a..66733bfe50 100644 --- a/src/ad/Dockerfile +++ b/src/ad/Dockerfile @@ -3,7 +3,7 @@ FROM --platform=${BUILDPLATFORM} eclipse-temurin:21-jdk AS builder - +ENV _JAVA_OPTIONS=-XX:UseSVE=0 WORKDIR /usr/src/app/ COPY ./src/ad/gradlew* ./src/ad/settings.gradle* ./src/ad/build.gradle ./ @@ -27,6 +27,7 @@ WORKDIR /usr/src/app/ COPY --from=builder /usr/src/app/ ./ ADD --chmod=644 https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/download/v$OTEL_JAVA_AGENT_VERSION/opentelemetry-javaagent.jar /usr/src/app/opentelemetry-javaagent.jar +ENV _JAVA_OPTIONS="-XX:UseSVE=0" ENV JAVA_TOOL_OPTIONS=-javaagent:/usr/src/app/opentelemetry-javaagent.jar EXPOSE ${AD_PORT}