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

Building native images with quarkus-opentelemetry extension throw a Random/SplittableRandom initialized error at build time #17234

Closed
pjgg opened this issue May 14, 2021 · 1 comment · Fixed by #17663

Comments

@pjgg
Copy link
Contributor

pjgg commented May 14, 2021

Describe the bug

QuarkusVersion: Upstream
Extensions: quarkus-opentelemetry, quarkus-opentelemetry-exporter-jaeger
Reproducer: https://github.com/quarkus-qe/beefy-scenarios
Command: mvn clean verify -Dnative -pl 300-quarkus-vertx-webClient -Pnative -DskipTests

Error at native build time:

Caused by: com.oracle.graal.pointsto.constraints.UnsupportedFeatureException: Detected an instance of Random/SplittableRandom class in the image heap. Instances created during image generation have cached seed values and don't behave as expected.  To see how this object got instantiated use --trace-object-instantiation=java.util.Random. The object was probably created by a class initializer and is reachable from a static field. You can request class initialization at image runtime by using the option --initialize-at-run-time=<class-name>. Or you can write your own initialization methods and call them explicitly from your main entry point.
Detailed message:
Trace: Object was reached by 
        reading field io.grpc.internal.RetriableStream.random

Similar issue ref: #14904

If we remove open telemetry extension, then the native build works as expected.

@pjgg pjgg added the kind/bug Something isn't working label May 14, 2021
@quarkus-bot
Copy link

quarkus-bot bot commented May 14, 2021

/cc @kenfinnigan

@kenfinnigan kenfinnigan added this to Backlog in Observability roadmap [Deprecated] via automation May 14, 2021
@kenfinnigan kenfinnigan moved this from Backlog to Current Qtr in Observability roadmap [Deprecated] May 14, 2021
Sgitario added a commit to Sgitario/beefy-scenarios that referenced this issue Jun 3, 2021
Two failures:
- Build on Native fails using the vert.x jwt dependency: quarkusio/quarkus#17657
- Opentelemetry fails on Native too: quarkusio/quarkus#17234
gsmet added a commit to gsmet/quarkus that referenced this issue Jun 3, 2021
Observability roadmap [Deprecated] automation moved this from Current Qtr to Done Jun 3, 2021
@quarkus-bot quarkus-bot bot added this to the 2.1 - main milestone Jun 3, 2021
@gsmet gsmet modified the milestones: 2.1 - main, 2.0.0.CR3 Jun 3, 2021
gsmet added a commit to gsmet/quarkus that referenced this issue Jun 3, 2021
It contains a Random field.

Fixes quarkusio#17234

(cherry picked from commit 2ece816)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/tracing kind/bug Something isn't working
Development

Successfully merging a pull request may close this issue.

2 participants