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

Native Image Build Fails after upgrading dd-trace-java from 1.40.0 to 1.43.0 #8054

Open
mimiyanwk opened this issue Dec 4, 2024 · 8 comments
Assignees
Labels
comp: native-image GraalVM native-image
Milestone

Comments

@mimiyanwk
Copy link

I am attempting to build a native image for my quarkus application as described on the website https://docs.datadoghq.com/tracing/trace_collection/compatibility/java/?tab=quarkusnative, but I am encountering initialization issues related to classes during the build time. These issues have arisen after upgrading Datadog's Java APM agent from version 1.40.0 to 1.43.0.

When building the native image, I receive the following error messages:

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=. Or you can write your own initialization methods and call them explicitly from your main entry point.

Object was reached by reading field datadog.trace.util.AgentTaskScheduler.worker of constant 
datadog.trace.util.AgentTaskScheduler@7fb566f7: datadog.trace.util.AgentTaskScheduler@7fb566f7
  scanning root datadog.trace.util.AgentTaskScheduler@7fb566f7: datadog.trace.util.AgentTaskScheduler@7fb566f7 embedded in
    datadog.trace.agent.common.metrics.OkHttpSink.accept(OkHttpSink.java:85)
  parsing method datadog.trace.agent.common.metrics.OkHttpSink.accept(OkHttpSink.java:74) reachable via the parsing context
    at datadog.trace.agent.core.datastreams.MsgPackDatastreamsPayloadWriter.writePayload(MsgPackDatastreamsPayloadWriter.java:116)
    at datadog.trace.agent.core.datastreams.DefaultDataStreamsMonitoring.flush(DefaultDataStreamsMonitoring.java:417)
    at datadog.trace.agent.core.datastreams.DefaultDataStreamsMonitoring.access$900(DefaultDataStreamsMonitoring.java:52)
    at datadog.trace.agent.core.datastreams.DefaultDataStreamsMonitoring$InboxProcessor.run(DefaultDataStreamsMonitoring.java:363)
    at java.util.OptionalInt.ifPresentOrElse(OptionalInt.java:185)
    at root method.(Unknown Source)
        at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.heap.ImageHeapScanner.onObjectReachable(ImageHeapScanner.java:591)
        at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.heap.SVMImageHeapScanner.onObjectReachable(SVMImageHeapScanner.java:125)
        at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.heap.ImageHeapScanner.lambda$markReachable$10(ImageHeapScanner.java:572)
        at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.util.CompletionExecutor.executeCommand(CompletionExecutor.java:166)
        at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.util.CompletionExecutor.lambda$executeService$0(CompletionExecutor.java:152)
        at java.base/java.util.concurrent.ForkJoinTask$RunnableExecuteAction.compute(ForkJoinTask.java:1726)
        at java.base/java.util.concurrent.ForkJoinTask$RunnableExecuteAction.compute(ForkJoinTask.java:1717)
        at java.base/java.util.concurrent.ForkJoinTask$InterruptibleTask.exec(ForkJoinTask.java:1641)
        at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:507)
        at java.base/java.util.concurrent.ForkJoinPool.externalHelpQuiesce(ForkJoinPool.java:2535)
        at java.base/java.util.concurrent.ForkJoinPool.helpQuiescePool(ForkJoinPool.java:2569)
        at java.base/java.util.concurrent.ForkJoinPool.awaitQuiescence(ForkJoinPool.java:3808)
        at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.util.CompletionExecutor.complete(CompletionExecutor.java:208)
        at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.heap.HeapSnapshotVerifier.checkHeapSnapshot(HeapSnapshotVerifier.java:105)
        at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.heap.SVMImageHeapVerifier.checkHeapSnapshot(SVMImageHeapVerifier.java:51)
        at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.AbstractAnalysisEngine.analysisModified(AbstractAnalysisEngine.java:217)
        at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.AbstractAnalysisEngine.runAnalysis(AbstractAnalysisEngine.java:190)
        at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.runPointsToAnalysis(NativeImageGenerator.java:832)
        at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:592)
        at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.run(NativeImageGenerator.java:554)
        at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.buildImage(NativeImageGeneratorRunner.java:528)
        at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.build(NativeImageGeneratorRunner.java:711)
        at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.start(NativeImageGeneratorRunner.java:139)
        at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.main(NativeImageGeneratorRunner.java:94)

Caused by: com.oracle.graal.pointsto.constraints.UnsupportedFeatureException: Detected a started Thread in the image heap. Thread name: dd-task-scheduler. Threads running in the image generator are no longer running at image runtime. If these objects should not be stored in the image heap, you can use

'--trace-object-instantiation=java.lang.Thread'

to find classes that instantiate these objects. Once you found such a class, you can mark it explicitly for run time initialization with

'--initialize-at-run-time=<culprit>'

to prevent the instantiation of the object.

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=. Or you can write your own initialization methods and call them explicitly from your main entry point.

    at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.image.DisallowedImageHeapObjectFeature.error(DisallowedImageHeapObjectFeature.java:186)
    at org.graalvm.nativeimage.builder/com.oracle.svm.core.image.DisallowedImageHeapObjects.onThreadReachable(DisallowedImageHeapObjects.java:124)
    at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.image.DisallowedImageHeapObjectFeature.lambda$duringSetup$4(DisallowedImageHeapObjectFeature.java:79)
    at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.meta.AnalysisType.lambda$notifyObjectReachable$12(AnalysisType.java:659)
    at java.base/java.util.concurrent.ConcurrentHashMap$KeySetView.forEach(ConcurrentHashMap.java:4714)
    at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.util.ConcurrentLightHashSet.forEach(ConcurrentLightHashSet.java:146)
    at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.meta.AnalysisType.notifyObjectReachable(AnalysisType.java:659)
    at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.heap.ImageHeapScanner.onObjectReachable(ImageHeapScanner.java:586)
    ... 23 more

I build the quarkus native using:
Quarkus Version: 3.15
Builder Image: quay.io/quarkus/ubi-quarkus-mandrel-builder-image:jdk-23

Command:

 ./mvnw package -Dnative -Dquarkus.native.additional-build-args='-J-javaagent:/datadog-lib/dd-java-agent.jar,-J-Ddd.profiling.enabled=true,--enable-monitoring=jfr'

Workaround
I must mark the classes explicitly for run time initialization with:

./mvnw package -Dnative -Dquarkus.native.additional-build-args='-J-javaagent:/datadog-lib/dd-java-agent.jar,-J-Ddd.profiling.enabled=true,--enable-monitoring=jfr,--initialize-at-run-time=datadog.trace.agent.core.scopemanager.ContinuableScopeManager\,datadog.trace.bootstrap.instrumentation.java.concurrent.QueueTimerHelper$RateLimiterHolder'
@mcculls
Copy link
Contributor

mcculls commented Dec 4, 2024

Hi @mimiyanwk - thanks for the additional details

Do you see the same error messages when using quay.io/quarkus/ubi-quarkus-mandrel-builder-image:jdk-21 ?

@mimiyanwk
Copy link
Author

Yes, I have seen the same error message.
The workaround works also for quay.io/quarkus/ubi-quarkus-mandrel-builder-image:jdk-21.
There is no error when using the version 1.40.0 and quay.io/quarkus/ubi-quarkus-mandrel-builder-image:jdk-21.

@PerfectSlayer PerfectSlayer added the comp: native-image GraalVM native-image label Dec 13, 2024
@luneo7
Copy link
Contributor

luneo7 commented Jan 29, 2025

We have been having one error here that looks almost the same:

Error: Unsupported features in 5 methods
Detailed message:
Error: Detected a started Thread in the image heap. Thread name: dd-task-scheduler. Threads running in the image generator are no longer running at image runtime. Prevent threads from starting during image generation, or a started thread from being included in the image.
The culprit object has been instantiated by the 'datadog.trace.bootstrap.instrumentation.java.concurrent.QueueTimerHelper$RateLimiterHolder' class initializer with the following trace:
        at java.lang.Thread.<init>(Thread.java:1329)
        at datadog.trace.util.AgentThreadFactory.newAgentThread(AgentThreadFactory.java:108)
        at datadog.trace.util.AgentThreadFactory.newAgentThread(AgentThreadFactory.java:93)
        at datadog.trace.util.AgentTaskScheduler.scheduleTarget(AgentTaskScheduler.java:181)
        at datadog.trace.util.AgentTaskScheduler.weakScheduleAtFixedRate(AgentTaskScheduler.java:144)
        at datadog.trace.api.sampling.AdaptiveSampler.start(AdaptiveSampler.java:207)
        at datadog.trace.api.sampling.AdaptiveSampler.<init>(AdaptiveSampler.java:152)
        at datadog.trace.api.sampling.AdaptiveSampler.<init>(AdaptiveSampler.java:170)
        at datadog.trace.api.sampling.PerRecordingRateLimiter.<init>(PerRecordingRateLimiter.java:19)
        at datadog.trace.api.sampling.PerRecordingRateLimiter.<init>(PerRecordingRateLimiter.java:11)
        at datadog.trace.bootstrap.instrumentation.java.concurrent.QueueTimerHelper$RateLimiterHolder.<clinit>(QueueTimerHelper.java:25)
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.
Trace: Object was reached by
  reading field java.util.concurrent.DelayQueue.leader of constant 
    java.util.concurrent.DelayQueue@4a793129: [periodic task RollWindowTask with target datadog.trace.api.sampling.AdaptiveSam...
  reading field datadog.trace.util.AgentTaskScheduler.workQueue of constant 
    datadog.trace.util.AgentTaskScheduler@1054094a: datadog.trace.util.AgentTaskScheduler@1054094a
  reading field datadog.trace.api.sampling.AdaptiveSampler.taskScheduler of constant 
    datadog.trace.api.sampling.AdaptiveSampler@4b0f0cc5: datadog.trace.api.sampling.AdaptiveSampler@4b0f0cc5
  scanning root datadog.trace.api.sampling.AdaptiveSampler@4b0f0cc5: datadog.trace.api.sampling.AdaptiveSampler@4b0f0cc5 embedded in 
    com.datadog.profiling.controller.openjdk.OpenJdkController.<init>(OpenJdkController.java)
  parsing method com.datadog.profiling.controller.openjdk.OpenJdkController.<init>(OpenJdkController.java:84) reachable via the parsing context
    at com.datadog.profiling.controller.openjdk.OpenJdkController.instance(OpenJdkController.java:74)
    at com.datadog.profiling.agent.CompositeController.build(CompositeController.java:157)
    at com.datadog.profiling.agent.ProfilingAgent.run(ProfilingAgent.java:124)
    at datadog.trace.agent.tooling.ProfilerInstaller.installProfiler(ProfilerInstaller.java:10)
    at datadog.trace.agent.tooling.nativeimage.TracerActivation.activate(TracerActivation.java:17)
    at org.graalvm.nativeimage.VMRuntime.initialize(VMRuntime.java:65)
    at com.oracle.svm.core.JavaMainWrapper.runCore0(JavaMainWrapper.java:220)
    at com.oracle.svm.core.JavaMainWrapper.doRun(JavaMainWrapper.java:303)
    at com.oracle.svm.core.code.IsolateEnterStub.JavaMainWrapper_run_5087f5482cc9a6abc971913ece43acb471d2631b(generated:0)
    at static root method.(Unknown Source)

Error: Detected a started Thread in the image heap. Thread name: dd-task-scheduler. Threads running in the image generator are no longer running at image runtime. Prevent threads from starting during image generation, or a started thread from being included in the image.
The culprit object has been instantiated by the 'datadog.trace.bootstrap.instrumentation.java.concurrent.QueueTimerHelper$RateLimiterHolder' class initializer with the following trace:
        at java.lang.Thread.<init>(Thread.java:1329)
        at datadog.trace.util.AgentThreadFactory.newAgentThread(AgentThreadFactory.java:108)
        at datadog.trace.util.AgentThreadFactory.newAgentThread(AgentThreadFactory.java:93)
        at datadog.trace.util.AgentTaskScheduler.scheduleTarget(AgentTaskScheduler.java:181)
        at datadog.trace.util.AgentTaskScheduler.weakScheduleAtFixedRate(AgentTaskScheduler.java:144)
        at datadog.trace.api.sampling.AdaptiveSampler.start(AdaptiveSampler.java:207)
        at datadog.trace.api.sampling.AdaptiveSampler.<init>(AdaptiveSampler.java:152)
        at datadog.trace.api.sampling.AdaptiveSampler.<init>(AdaptiveSampler.java:170)
        at datadog.trace.api.sampling.PerRecordingRateLimiter.<init>(PerRecordingRateLimiter.java:19)
        at datadog.trace.api.sampling.PerRecordingRateLimiter.<init>(PerRecordingRateLimiter.java:11)
        at datadog.trace.bootstrap.instrumentation.java.concurrent.QueueTimerHelper$RateLimiterHolder.<clinit>(QueueTimerHelper.java:25)
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.
Trace: Object was reached by
  reading field java.util.concurrent.locks.AbstractQueuedSynchronizer$Node.waiter of constant 
    java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionNode@d6cfa74: java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionNode@d6cfa74
  reading field java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.firstWaiter of constant 
    java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject@2bc647da: java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject@2bc647da
  reading field java.util.concurrent.DelayQueue.available of constant 
    java.util.concurrent.DelayQueue@4a793129: [periodic task RollWindowTask with target datadog.trace.api.sampling.AdaptiveSam...
  reading field datadog.trace.util.AgentTaskScheduler.workQueue of constant 
    datadog.trace.util.AgentTaskScheduler@1054094a: datadog.trace.util.AgentTaskScheduler@1054094a
  reading field datadog.trace.api.sampling.AdaptiveSampler.taskScheduler of constant 
    datadog.trace.api.sampling.AdaptiveSampler@4b0f0cc5: datadog.trace.api.sampling.AdaptiveSampler@4b0f0cc5
  scanning root datadog.trace.api.sampling.AdaptiveSampler@4b0f0cc5: datadog.trace.api.sampling.AdaptiveSampler@4b0f0cc5 embedded in 
    com.datadog.profiling.controller.openjdk.OpenJdkController.<init>(OpenJdkController.java)
  parsing method com.datadog.profiling.controller.openjdk.OpenJdkController.<init>(OpenJdkController.java:84) reachable via the parsing context
    at com.datadog.profiling.controller.openjdk.OpenJdkController.instance(OpenJdkController.java:74)
    at com.datadog.profiling.agent.CompositeController.build(CompositeController.java:157)
    at com.datadog.profiling.agent.ProfilingAgent.run(ProfilingAgent.java:124)
    at datadog.trace.agent.tooling.ProfilerInstaller.installProfiler(ProfilerInstaller.java:10)
    at datadog.trace.agent.tooling.nativeimage.TracerActivation.activate(TracerActivation.java:17)
    at org.graalvm.nativeimage.VMRuntime.initialize(VMRuntime.java:65)
    at com.oracle.svm.core.JavaMainWrapper.runCore0(JavaMainWrapper.java:220)
    at com.oracle.svm.core.JavaMainWrapper.doRun(JavaMainWrapper.java:303)
    at com.oracle.svm.core.code.IsolateEnterStub.JavaMainWrapper_run_5087f5482cc9a6abc971913ece43acb471d2631b(generated:0)
    at static root method.(Unknown Source)

Error: Detected a started Thread in the image heap. Thread name: dd-task-scheduler. Threads running in the image generator are no longer running at image runtime. Prevent threads from starting during image generation, or a started thread from being included in the image.
The culprit object has been instantiated by the 'datadog.trace.bootstrap.instrumentation.java.concurrent.QueueTimerHelper$RateLimiterHolder' class initializer with the following trace:
        at java.lang.Thread.<init>(Thread.java:1329)
        at datadog.trace.util.AgentThreadFactory.newAgentThread(AgentThreadFactory.java:108)
        at datadog.trace.util.AgentThreadFactory.newAgentThread(AgentThreadFactory.java:93)
        at datadog.trace.util.AgentTaskScheduler.scheduleTarget(AgentTaskScheduler.java:181)
        at datadog.trace.util.AgentTaskScheduler.weakScheduleAtFixedRate(AgentTaskScheduler.java:144)
        at datadog.trace.api.sampling.AdaptiveSampler.start(AdaptiveSampler.java:207)
        at datadog.trace.api.sampling.AdaptiveSampler.<init>(AdaptiveSampler.java:152)
        at datadog.trace.api.sampling.AdaptiveSampler.<init>(AdaptiveSampler.java:170)
        at datadog.trace.api.sampling.PerRecordingRateLimiter.<init>(PerRecordingRateLimiter.java:19)
        at datadog.trace.api.sampling.PerRecordingRateLimiter.<init>(PerRecordingRateLimiter.java:11)
        at datadog.trace.bootstrap.instrumentation.java.concurrent.QueueTimerHelper$RateLimiterHolder.<clinit>(QueueTimerHelper.java:25)
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.
Trace: Object was reached by
  reading field datadog.trace.util.AgentTaskScheduler.worker of constant 
    datadog.trace.util.AgentTaskScheduler@1054094a: datadog.trace.util.AgentTaskScheduler@1054094a
  reading field datadog.trace.api.sampling.AdaptiveSampler.taskScheduler of constant 
    datadog.trace.api.sampling.AdaptiveSampler@4b0f0cc5: datadog.trace.api.sampling.AdaptiveSampler@4b0f0cc5
  scanning root datadog.trace.api.sampling.AdaptiveSampler@4b0f0cc5: datadog.trace.api.sampling.AdaptiveSampler@4b0f0cc5 embedded in 
    com.datadog.profiling.controller.openjdk.OpenJdkController.<init>(OpenJdkController.java)
  parsing method com.datadog.profiling.controller.openjdk.OpenJdkController.<init>(OpenJdkController.java:84) reachable via the parsing context
    at com.datadog.profiling.controller.openjdk.OpenJdkController.instance(OpenJdkController.java:74)
    at com.datadog.profiling.agent.CompositeController.build(CompositeController.java:157)
    at com.datadog.profiling.agent.ProfilingAgent.run(ProfilingAgent.java:124)
    at datadog.trace.agent.tooling.ProfilerInstaller.installProfiler(ProfilerInstaller.java:10)
    at datadog.trace.agent.tooling.nativeimage.TracerActivation.activate(TracerActivation.java:17)
    at org.graalvm.nativeimage.VMRuntime.initialize(VMRuntime.java:65)
    at com.oracle.svm.core.JavaMainWrapper.runCore0(JavaMainWrapper.java:220)
    at com.oracle.svm.core.JavaMainWrapper.doRun(JavaMainWrapper.java:303)
    at com.oracle.svm.core.code.IsolateEnterStub.JavaMainWrapper_run_5087f5482cc9a6abc971913ece43acb471d2631b(generated:0)
    at static root method.(Unknown Source)

Error: Detected a started Thread in the image heap. Thread name: dd-task-scheduler. Threads running in the image generator are no longer running at image runtime. Prevent threads from starting during image generation, or a started thread from being included in the image.
The culprit object has been instantiated by the 'datadog.trace.bootstrap.instrumentation.java.concurrent.QueueTimerHelper$RateLimiterHolder' class initializer with the following trace:
        at java.lang.Thread.<init>(Thread.java:1329)
        at datadog.trace.util.AgentThreadFactory.newAgentThread(AgentThreadFactory.java:108)
        at datadog.trace.util.AgentThreadFactory.newAgentThread(AgentThreadFactory.java:93)
        at datadog.trace.util.AgentTaskScheduler.scheduleTarget(AgentTaskScheduler.java:181)
        at datadog.trace.util.AgentTaskScheduler.weakScheduleAtFixedRate(AgentTaskScheduler.java:144)
        at datadog.trace.api.sampling.AdaptiveSampler.start(AdaptiveSampler.java:207)
        at datadog.trace.api.sampling.AdaptiveSampler.<init>(AdaptiveSampler.java:152)
        at datadog.trace.api.sampling.AdaptiveSampler.<init>(AdaptiveSampler.java:170)
        at datadog.trace.api.sampling.PerRecordingRateLimiter.<init>(PerRecordingRateLimiter.java:19)
        at datadog.trace.api.sampling.PerRecordingRateLimiter.<init>(PerRecordingRateLimiter.java:11)
        at datadog.trace.bootstrap.instrumentation.java.concurrent.QueueTimerHelper$RateLimiterHolder.<clinit>(QueueTimerHelper.java:25)
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.
Trace: Object was reached by
  reading field java.util.concurrent.locks.AbstractQueuedSynchronizer$Node.waiter of constant 
    java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionNode@26037e62: java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionNode@26037e62
  reading field java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.firstWaiter of constant 
    java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject@2bc647da: java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject@2bc647da
  reading field java.util.concurrent.DelayQueue.available of constant 
    java.util.concurrent.DelayQueue@4a793129: [periodic task RollWindowTask with target datadog.trace.api.sampling.AdaptiveSam...
  reading field datadog.trace.util.AgentTaskScheduler.workQueue of constant 
    datadog.trace.util.AgentTaskScheduler@1054094a: datadog.trace.util.AgentTaskScheduler@1054094a
  scanning root datadog.trace.util.AgentTaskScheduler@1054094a: datadog.trace.util.AgentTaskScheduler@1054094a embedded in 
    datadog.trace.agent.tooling.WeakMaps.newWeakMap(WeakMaps.java:17)
  parsing method datadog.trace.agent.tooling.WeakMaps.newWeakMap(WeakMaps.java:15) reachable via the parsing context
    at datadog.trace.agent.tooling.WeakMaps$1.get(WeakMaps.java:34)
    at datadog.trace.bootstrap.WeakMap$Supplier.newWeakMap(WeakMap.java:26)
    at datadog.trace.bootstrap.WeakMapContextStore.<init>(WeakMapContextStore.java:12)
    at datadog.trace.bootstrap.FieldBackedContextStore.weakStore(FieldBackedContextStore.java:105)
    at datadog.trace.bootstrap.FieldBackedContextStore.get(FieldBackedContextStore.java:19)
    at datadog.trace.bootstrap.instrumentation.java.concurrent.AdviceUtils.startTaskScope(AdviceUtils.java:21)
    at java.util.concurrent.RecursiveTask.exec(RecursiveTask.java:110)
    at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:387)
    at java.util.concurrent.ForkJoinTask.invoke(ForkJoinTask.java:667)
    at java.util.stream.Nodes.flatten(Nodes.java:470)
    at java.util.stream.Nodes.collect(Nodes.java:329)
    at java.util.stream.ReferencePipeline.evaluateToNode(ReferencePipeline.java:111)
    at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:570)
    at java.util.stream.AbstractPipeline.evaluateToArrayNode(AbstractPipeline.java:260)
    at java.util.stream.ReferencePipeline.toArray(ReferencePipeline.java:616)
    at sun.util.locale.provider.LocaleProviderAdapter.toLocaleArray(LocaleProviderAdapter.java:326)
    at sun.util.locale.provider.CalendarDataProviderImpl.getAvailableLocales(CalendarDataProviderImpl.java:63)
    at java.util.spi.LocaleServiceProvider.isSupportedLocale(LocaleServiceProvider.java:220)
    at sun.util.locale.provider.LocaleProviderAdapter.findAdapter(LocaleProviderAdapter.java:297)
    at sun.util.locale.provider.LocaleProviderAdapter.getAdapter(LocaleProviderAdapter.java:278)
    at java.text.DecimalFormatSymbols.initialize(DecimalFormatSymbols.java:813)
    at java.text.DecimalFormatSymbols.<init>(DecimalFormatSymbols.java:115)
    at sun.util.locale.provider.DecimalFormatSymbolsProviderImpl.getInstance(DecimalFormatSymbolsProviderImpl.java:85)
    at java.text.DecimalFormatSymbols.getInstance(DecimalFormatSymbols.java:186)
    at java.util.Formatter.getDecimalFormatSymbols(Formatter.java:2032)
    at java.util.Formatter$FormatSpecifier.localizedMagnitude(Formatter.java:4573)
    at java.util.Formatter$FormatSpecifier.localizedMagnitude(Formatter.java:4520)
    at java.util.Formatter$FormatSpecifier.print(Formatter.java:4334)
    at java.util.Formatter$FormatSpecifier.print(Formatter.java:4282)
    at java.util.Formatter$FormatSpecifier.printDateTime(Formatter.java:3105)
    at java.util.Formatter$FormatSpecifier.print(Formatter.java:3014)
    at java.util.Formatter.format(Formatter.java:2791)
    at java.util.Formatter.format(Formatter.java:2728)
    at java.lang.String.format(String.java:4390)
    at jdk.internal.util.Preconditions.outOfBoundsMessage(Preconditions.java:242)
    at jdk.internal.util.Preconditions$4.apply(Preconditions.java:213)
    at jdk.internal.util.Preconditions$4.apply(Preconditions.java:210)
    at jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:98)
    at jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:106)
    at jdk.internal.util.Preconditions.checkIndex(Preconditions.java:302)
    at java.lang.StringUTF16.checkIndex(StringUTF16.java:1613)
    at java.lang.StringUTF16.charAt(StringUTF16.java:1418)
    at java.lang.String.charAt(String.java:1557)
    at java.lang.Long.parseLong(Long.java:689)
    at java.lang.Long.valueOf(Long.java:1157)
    at static root method.(Unknown Source)

Error: Detected a started Thread in the image heap. Thread name: dd-task-scheduler. Threads running in the image generator are no longer running at image runtime. Prevent threads from starting during image generation, or a started thread from being included in the image.
The culprit object has been instantiated by the 'datadog.trace.bootstrap.instrumentation.java.concurrent.QueueTimerHelper$RateLimiterHolder' class initializer with the following trace:
        at java.lang.Thread.<init>(Thread.java:1329)
        at datadog.trace.util.AgentThreadFactory.newAgentThread(AgentThreadFactory.java:108)
        at datadog.trace.util.AgentThreadFactory.newAgentThread(AgentThreadFactory.java:93)
        at datadog.trace.util.AgentTaskScheduler.scheduleTarget(AgentTaskScheduler.java:181)
        at datadog.trace.util.AgentTaskScheduler.weakScheduleAtFixedRate(AgentTaskScheduler.java:144)
        at datadog.trace.api.sampling.AdaptiveSampler.start(AdaptiveSampler.java:207)
        at datadog.trace.api.sampling.AdaptiveSampler.<init>(AdaptiveSampler.java:152)
        at datadog.trace.api.sampling.AdaptiveSampler.<init>(AdaptiveSampler.java:170)
        at datadog.trace.api.sampling.PerRecordingRateLimiter.<init>(PerRecordingRateLimiter.java:19)
        at datadog.trace.api.sampling.PerRecordingRateLimiter.<init>(PerRecordingRateLimiter.java:11)
        at datadog.trace.bootstrap.instrumentation.java.concurrent.QueueTimerHelper$RateLimiterHolder.<clinit>(QueueTimerHelper.java:25)
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.
Trace: Object was reached by
  reading field java.util.concurrent.locks.AbstractQueuedSynchronizer$Node.waiter of constant 
    java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionNode@31775cca: java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionNode@31775cca
  reading field java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.firstWaiter of constant 
    java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject@2bc647da: java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject@2bc647da
  reading field java.util.concurrent.DelayQueue.available of constant 
    java.util.concurrent.DelayQueue@4a793129: [periodic task RollWindowTask with target datadog.trace.api.sampling.AdaptiveSam...
  reading field datadog.trace.util.AgentTaskScheduler.workQueue of constant 
    datadog.trace.util.AgentTaskScheduler@1054094a: datadog.trace.util.AgentTaskScheduler@1054094a
  reading field datadog.trace.api.sampling.AdaptiveSampler.taskScheduler of constant 
    datadog.trace.api.sampling.AdaptiveSampler@4b0f0cc5: datadog.trace.api.sampling.AdaptiveSampler@4b0f0cc5
  scanning root datadog.trace.api.sampling.AdaptiveSampler@4b0f0cc5: datadog.trace.api.sampling.AdaptiveSampler@4b0f0cc5 embedded in 
    com.datadog.profiling.controller.openjdk.OpenJdkController.<init>(OpenJdkController.java)
  parsing method com.datadog.profiling.controller.openjdk.OpenJdkController.<init>(OpenJdkController.java:84) reachable via the parsing context
    at com.datadog.profiling.controller.openjdk.OpenJdkController.instance(OpenJdkController.java:74)
    at com.datadog.profiling.agent.CompositeController.build(CompositeController.java:157)
    at com.datadog.profiling.agent.ProfilingAgent.run(ProfilingAgent.java:124)
    at datadog.trace.agent.tooling.ProfilerInstaller.installProfiler(ProfilerInstaller.java:10)
    at datadog.trace.agent.tooling.nativeimage.TracerActivation.activate(TracerActivation.java:17)
    at org.graalvm.nativeimage.VMRuntime.initialize(VMRuntime.java:65)
    at com.oracle.svm.core.JavaMainWrapper.runCore0(JavaMainWrapper.java:220)
    at com.oracle.svm.core.JavaMainWrapper.doRun(JavaMainWrapper.java:303)
    at com.oracle.svm.core.code.IsolateEnterStub.JavaMainWrapper_run_5087f5482cc9a6abc971913ece43acb471d2631b(generated:0)
    at static root method.(Unknown Source)


com.oracle.svm.core.util.UserError$UserException: Unsupported features in 5 methods
Detailed message:
Error: Detected a started Thread in the image heap. Thread name: dd-task-scheduler. Threads running in the image generator are no longer running at image runtime. Prevent threads from starting during image generation, or a started thread from being included in the image.
The culprit object has been instantiated by the 'datadog.trace.bootstrap.instrumentation.java.concurrent.QueueTimerHelper$RateLimiterHolder' class initializer with the following trace:
        at java.lang.Thread.<init>(Thread.java:1329)
        at datadog.trace.util.AgentThreadFactory.newAgentThread(AgentThreadFactory.java:108)
        at datadog.trace.util.AgentThreadFactory.newAgentThread(AgentThreadFactory.java:93)
        at datadog.trace.util.AgentTaskScheduler.scheduleTarget(AgentTaskScheduler.java:181)
        at datadog.trace.util.AgentTaskScheduler.weakScheduleAtFixedRate(AgentTaskScheduler.java:144)
        at datadog.trace.api.sampling.AdaptiveSampler.start(AdaptiveSampler.java:207)
        at datadog.trace.api.sampling.AdaptiveSampler.<init>(AdaptiveSampler.java:152)
        at datadog.trace.api.sampling.AdaptiveSampler.<init>(AdaptiveSampler.java:170)
        at datadog.trace.api.sampling.PerRecordingRateLimiter.<init>(PerRecordingRateLimiter.java:19)
        at datadog.trace.api.sampling.PerRecordingRateLimiter.<init>(PerRecordingRateLimiter.java:11)
        at datadog.trace.bootstrap.instrumentation.java.concurrent.QueueTimerHelper$RateLimiterHolder.<clinit>(QueueTimerHelper.java:25)
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.
Trace: Object was reached by
  reading field java.util.concurrent.DelayQueue.leader of constant 
    java.util.concurrent.DelayQueue@4a793129: [periodic task RollWindowTask with target datadog.trace.api.sampling.AdaptiveSam...
  reading field datadog.trace.util.AgentTaskScheduler.workQueue of constant 
    datadog.trace.util.AgentTaskScheduler@1054094a: datadog.trace.util.AgentTaskScheduler@1054094a
  reading field datadog.trace.api.sampling.AdaptiveSampler.taskScheduler of constant 
    datadog.trace.api.sampling.AdaptiveSampler@4b0f0cc5: datadog.trace.api.sampling.AdaptiveSampler@4b0f0cc5
  scanning root datadog.trace.api.sampling.AdaptiveSampler@4b0f0cc5: datadog.trace.api.sampling.AdaptiveSampler@4b0f0cc5 embedded in 
    com.datadog.profiling.controller.openjdk.OpenJdkController.<init>(OpenJdkController.java)
  parsing method com.datadog.profiling.controller.openjdk.OpenJdkController.<init>(OpenJdkController.java:84) reachable via the parsing context
    at com.datadog.profiling.controller.openjdk.OpenJdkController.instance(OpenJdkController.java:74)
    at com.datadog.profiling.agent.CompositeController.build(CompositeController.java:157)
    at com.datadog.profiling.agent.ProfilingAgent.run(ProfilingAgent.java:124)
    at datadog.trace.agent.tooling.ProfilerInstaller.installProfiler(ProfilerInstaller.java:10)
    at datadog.trace.agent.tooling.nativeimage.TracerActivation.activate(TracerActivation.java:17)
    at org.graalvm.nativeimage.VMRuntime.initialize(VMRuntime.java:65)
    at com.oracle.svm.core.JavaMainWrapper.runCore0(JavaMainWrapper.java:220)
    at com.oracle.svm.core.JavaMainWrapper.doRun(JavaMainWrapper.java:303)
    at com.oracle.svm.core.code.IsolateEnterStub.JavaMainWrapper_run_5087f5482cc9a6abc971913ece43acb471d2631b(generated:0)
    at static root method.(Unknown Source)

Error: Detected a started Thread in the image heap. Thread name: dd-task-scheduler. Threads running in the image generator are no longer running at image runtime. Prevent threads from starting during image generation, or a started thread from being included in the image.
The culprit object has been instantiated by the 'datadog.trace.bootstrap.instrumentation.java.concurrent.QueueTimerHelper$RateLimiterHolder' class initializer with the following trace:
        at java.lang.Thread.<init>(Thread.java:1329)
        at datadog.trace.util.AgentThreadFactory.newAgentThread(AgentThreadFactory.java:108)
        at datadog.trace.util.AgentThreadFactory.newAgentThread(AgentThreadFactory.java:93)
        at datadog.trace.util.AgentTaskScheduler.scheduleTarget(AgentTaskScheduler.java:181)
        at datadog.trace.util.AgentTaskScheduler.weakScheduleAtFixedRate(AgentTaskScheduler.java:144)
        at datadog.trace.api.sampling.AdaptiveSampler.start(AdaptiveSampler.java:207)
        at datadog.trace.api.sampling.AdaptiveSampler.<init>(AdaptiveSampler.java:152)
        at datadog.trace.api.sampling.AdaptiveSampler.<init>(AdaptiveSampler.java:170)
        at datadog.trace.api.sampling.PerRecordingRateLimiter.<init>(PerRecordingRateLimiter.java:19)
        at datadog.trace.api.sampling.PerRecordingRateLimiter.<init>(PerRecordingRateLimiter.java:11)
        at datadog.trace.bootstrap.instrumentation.java.concurrent.QueueTimerHelper$RateLimiterHolder.<clinit>(QueueTimerHelper.java:25)
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.
Trace: Object was reached by
  reading field java.util.concurrent.locks.AbstractQueuedSynchronizer$Node.waiter of constant 
    java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionNode@d6cfa74: java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionNode@d6cfa74
  reading field java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.firstWaiter of constant 
    java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject@2bc647da: java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject@2bc647da
  reading field java.util.concurrent.DelayQueue.available of constant 
    java.util.concurrent.DelayQueue@4a793129: [periodic task RollWindowTask with target datadog.trace.api.sampling.AdaptiveSam...
  reading field datadog.trace.util.AgentTaskScheduler.workQueue of constant 
    datadog.trace.util.AgentTaskScheduler@1054094a: datadog.trace.util.AgentTaskScheduler@1054094a
  reading field datadog.trace.api.sampling.AdaptiveSampler.taskScheduler of constant 
    datadog.trace.api.sampling.AdaptiveSampler@4b0f0cc5: datadog.trace.api.sampling.AdaptiveSampler@4b0f0cc5
  scanning root datadog.trace.api.sampling.AdaptiveSampler@4b0f0cc5: datadog.trace.api.sampling.AdaptiveSampler@4b0f0cc5 embedded in 
    com.datadog.profiling.controller.openjdk.OpenJdkController.<init>(OpenJdkController.java)
  parsing method com.datadog.profiling.controller.openjdk.OpenJdkController.<init>(OpenJdkController.java:84) reachable via the parsing context
    at com.datadog.profiling.controller.openjdk.OpenJdkController.instance(OpenJdkController.java:74)
    at com.datadog.profiling.agent.CompositeController.build(CompositeController.java:157)
    at com.datadog.profiling.agent.ProfilingAgent.run(ProfilingAgent.java:124)
    at datadog.trace.agent.tooling.ProfilerInstaller.installProfiler(ProfilerInstaller.java:10)
    at datadog.trace.agent.tooling.nativeimage.TracerActivation.activate(TracerActivation.java:17)
    at org.graalvm.nativeimage.VMRuntime.initialize(VMRuntime.java:65)
    at com.oracle.svm.core.JavaMainWrapper.runCore0(JavaMainWrapper.java:220)
    at com.oracle.svm.core.JavaMainWrapper.doRun(JavaMainWrapper.java:303)
    at com.oracle.svm.core.code.IsolateEnterStub.JavaMainWrapper_run_5087f5482cc9a6abc971913ece43acb471d2631b(generated:0)
    at static root method.(Unknown Source)

Error: Detected a started Thread in the image heap. Thread name: dd-task-scheduler. Threads running in the image generator are no longer running at image runtime. Prevent threads from starting during image generation, or a started thread from being included in the image.
The culprit object has been instantiated by the 'datadog.trace.bootstrap.instrumentation.java.concurrent.QueueTimerHelper$RateLimiterHolder' class initializer with the following trace:
        at java.lang.Thread.<init>(Thread.java:1329)
        at datadog.trace.util.AgentThreadFactory.newAgentThread(AgentThreadFactory.java:108)
        at datadog.trace.util.AgentThreadFactory.newAgentThread(AgentThreadFactory.java:93)
        at datadog.trace.util.AgentTaskScheduler.scheduleTarget(AgentTaskScheduler.java:181)
        at datadog.trace.util.AgentTaskScheduler.weakScheduleAtFixedRate(AgentTaskScheduler.java:144)
        at datadog.trace.api.sampling.AdaptiveSampler.start(AdaptiveSampler.java:207)
        at datadog.trace.api.sampling.AdaptiveSampler.<init>(AdaptiveSampler.java:152)
        at datadog.trace.api.sampling.AdaptiveSampler.<init>(AdaptiveSampler.java:170)
        at datadog.trace.api.sampling.PerRecordingRateLimiter.<init>(PerRecordingRateLimiter.java:19)
        at datadog.trace.api.sampling.PerRecordingRateLimiter.<init>(PerRecordingRateLimiter.java:11)
        at datadog.trace.bootstrap.instrumentation.java.concurrent.QueueTimerHelper$RateLimiterHolder.<clinit>(QueueTimerHelper.java:25)
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.
Trace: Object was reached by
  reading field datadog.trace.util.AgentTaskScheduler.worker of constant 
    datadog.trace.util.AgentTaskScheduler@1054094a: datadog.trace.util.AgentTaskScheduler@1054094a
  reading field datadog.trace.api.sampling.AdaptiveSampler.taskScheduler of constant 
    datadog.trace.api.sampling.AdaptiveSampler@4b0f0cc5: datadog.trace.api.sampling.AdaptiveSampler@4b0f0cc5
  scanning root datadog.trace.api.sampling.AdaptiveSampler@4b0f0cc5: datadog.trace.api.sampling.AdaptiveSampler@4b0f0cc5 embedded in 
    com.datadog.profiling.controller.openjdk.OpenJdkController.<init>(OpenJdkController.java)
  parsing method com.datadog.profiling.controller.openjdk.OpenJdkController.<init>(OpenJdkController.java:84) reachable via the parsing context
    at com.datadog.profiling.controller.openjdk.OpenJdkController.instance(OpenJdkController.java:74)
    at com.datadog.profiling.agent.CompositeController.build(CompositeController.java:157)
    at com.datadog.profiling.agent.ProfilingAgent.run(ProfilingAgent.java:124)
    at datadog.trace.agent.tooling.ProfilerInstaller.installProfiler(ProfilerInstaller.java:10)
    at datadog.trace.agent.tooling.nativeimage.TracerActivation.activate(TracerActivation.java:17)
    at org.graalvm.nativeimage.VMRuntime.initialize(VMRuntime.java:65)
    at com.oracle.svm.core.JavaMainWrapper.runCore0(JavaMainWrapper.java:220)
    at com.oracle.svm.core.JavaMainWrapper.doRun(JavaMainWrapper.java:303)
    at com.oracle.svm.core.code.IsolateEnterStub.JavaMainWrapper_run_5087f5482cc9a6abc971913ece43acb471d2631b(generated:0)
    at static root method.(Unknown Source)

Error: Detected a started Thread in the image heap. Thread name: dd-task-scheduler. Threads running in the image ge------------------------------------------------------------------------------------------------------------------------
nerator are no longer running at image runtime. Prevent threads from starting during image generation, or a started thread from being included in the image.
The culprit object has been instantiated by the 'datadog.trace.bootstrap.instrumentation.java.concurrent.QueueTimerHelper$RateLimiterHolder' class initializer with the following trace:
        at java.lang.Thread.<init>(Thread.java:1329)
        at datadog.trace.util.AgentThreadFactory.newAgentThread(AgentThreadFactory.java:108)
        at datadog.trace.util.AgentThreadFactory.newAgentThread(AgentThreadFactory.java:93)
        at datadog.trace.util.AgentTaskScheduler.scheduleTarget(AgentTaskScheduler.java:181)
        at datadog.trace.util.AgentTaskScheduler.weakScheduleAtFixedRate(AgentTaskScheduler.java:144)
        at datadog.trace.api.sampling.AdaptiveSampler.start(AdaptiveSampler.java:207)
        at datadog.trace.api.sampling.AdaptiveSampler.<init>(AdaptiveSampler.java:152)
        at datadog.trace.api.sampling.AdaptiveSampler.<init>(AdaptiveSampler.java:170)
        at datadog.trace.api.sampling.PerRecordingRateLimiter.<init>(PerRecordingRateLimiter.java:19)
        at datadog.trace.api.sampling.PerRecordingRateLimiter.<init>(PerRecordingRateLimiter.java:11)
        at datadog.trace.bootstrap.instrumentation.java.concurrent.QueueTimerHelper$RateLimiterHolder.<clinit>(QueueTimerHelper.java:25)
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.
Trace: Object was reached by
  reading field java.util.concurrent.locks.AbstractQueuedSynchronizer$Node.waiter of constant 
    java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionNode@26037e62: java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionNode@26037e62
  reading field java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.firstWaiter of constant 
    java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject@2bc647da: java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject@2bc647da
  reading field java.util.concurrent.DelayQueue.available of constant 
    java.util.concurrent.DelayQueue@4a793129: [periodic task RollWindowTask with target datadog.trace.api.sampling.AdaptiveSam...
  reading field datadog.trace.util.AgentTaskScheduler.workQueue of constant 
    datadog.trace.util.AgentTaskScheduler@1054094a: datadog.trace.util.AgentTaskScheduler@1054094a
  scanning root datadog.trace.util.AgentTaskScheduler@1054094a: datadog.trace.util.AgentTaskScheduler@1054094a embedded in 
    datadog.trace.agent.tooling.WeakMaps.newWeakMap(WeakMaps.java:17)
  parsing method datadog.trace.agent.tooling.WeakMaps.newWeakMap(WeakMaps.java:15) reachable via the parsing context
    at datadog.trace.agent.tooling.WeakMaps$1.get(WeakMaps.java:34)
    at datadog.trace.bootstrap.WeakMap$Supplier.newWeakMap(WeakMap.java:26)
    at datadog.trace.bootstrap.WeakMapContextStore.<init>(WeakMapContextStore.java:12)
    at datadog.trace.bootstrap.FieldBackedContextStore.weakStore(FieldBackedContextStore.java:105)
    at datadog.trace.bootstrap.FieldBackedContextStore.get(FieldBackedContextStore.java:19)
    at datadog.trace.bootstrap.instrumentation.java.concurrent.AdviceUtils.startTaskScope(AdviceUtils.java:21)
    at java.util.concurrent.RecursiveTask.exec(RecursiveTask.java:110)
    at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:387)
    at java.util.concurrent.ForkJoinTask.invoke(ForkJoinTask.java:667)
    at java.util.stream.Nodes.flatten(Nodes.java:470)
    at java.util.stream.Nodes.collect(Nodes.java:329)
    at java.util.stream.ReferencePipeline.evaluateToNode(ReferencePipeline.java:111)
    at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:570)
    at java.util.stream.AbstractPipeline.evaluateToArrayNode(AbstractPipeline.java:260)
    at java.util.stream.ReferencePipeline.toArray(ReferencePipeline.java:616)
    at sun.util.locale.provider.LocaleProviderAdapter.toLocaleArray(LocaleProviderAdapter.java:326)
    at sun.util.locale.provider.CalendarDataProviderImpl.getAvailableLocales(CalendarDataProviderImpl.java:63)
    at java.util.spi.LocaleServiceProvider.isSupportedLocale(LocaleServiceProvider.java:220)
    at sun.util.locale.provider.LocaleProviderAdapter.findAdapter(LocaleProviderAdapter.java:297)
    at sun.util.locale.provider.LocaleProviderAdapter.getAdapter(LocaleProviderAdapter.java:278)
    at java.text.DecimalFormatSymbols.initialize(DecimalFormatSymbols.java:813)
    at java.text.DecimalFormatSymbols.<init>(DecimalFormatSymbols.java:115)
    at sun.util.locale.provider.DecimalFormatSymbolsProviderImpl.getInstance(DecimalFormatSymbolsProviderImpl.java:85)
    at java.text.DecimalFormatSymbols.getInstance(DecimalFormatSymbols.java:186)
    at java.util.Formatter.getDecimalFormatSymbols(Formatter.java:2032)
    at java.util.Formatter$FormatSpecifier.localizedMagnitude(Formatter.java:4573)
    at java.util.Formatter$FormatSpecifier.localizedMagnitude(Formatter.java:4520)
    at java.util.Formatter$FormatSpecifier.print(Formatter.java:4334)
    at java.util.Formatter$FormatSpecifier.print(Formatter.java:4282)
    at java.util.Formatter$FormatSpecifier.printDateTime(Formatter.java:3105)
    at java.util.Formatter$FormatSpecifier.print(Formatter.java:3014)
    at java.util.Formatter.format(Formatter.java:2791)
    at java.util.Formatter.format(Formatter.java:2728)
    at java.lang.String.format(String.java:4390)
    at jdk.internal.util.Preconditions.outOfBoundsMessage(Preconditions.java:242)
    at jdk.internal.util.Preconditions$4.apply(Preconditions.java:213)
    at jdk.internal.util.Preconditions$4.apply(Preconditions.java:210)
    at jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:98)
    at jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:106)
    at jdk.internal.util.Preconditions.checkIndex(Preconditions.java:302)
    at java.lang.StringUTF16.checkIndex(StringUTF16.java:1613)
    at java.lang.StringUTF16.charAt(StringUTF16.java:1418)
    at java.lang.String.charAt(String.java:1557)
    at java.lang.Long.parseLong(Long.java:689)
    at java.lang.Long.valueOf(Long.java:1157)
    at static root method.(Unknown Source)

Error: Detected a started Thread in the image heap. Thread name: dd-task-scheduler. Threads running in the image generator are no longer running at image runtime. Prevent threads from starting during image generation, or a started thread from being included in the image.
The culprit object has been instantiated by the 'datadog.trace.bootstrap.instrumentation.java.concurrent.QueueTimerHelper$RateLimiterHolder' class initializer with the following trace:
        at java.lang.Thread.<init>(Thread.java:1329)
        at datadog.trace.util.AgentThreadFactory.newAgentThread(AgentThreadFactory.java:108)
        at datadog.trace.util.AgentThreadFactory.newAgentThread(AgentThreadFactory.java:93)
        at datadog.trace.util.AgentTaskScheduler.scheduleTarget(AgentTaskScheduler.java:181)
        at datadog.trace.util.AgentTaskScheduler.weakScheduleAtFixedRate(AgentTaskScheduler.java:144)
        at datadog.trace.api.sampling.AdaptiveSampler.start(AdaptiveSampler.java:207)
        at datadog.trace.api.sampling.AdaptiveSampler.<init>(AdaptiveSampler.java:152)
        at datadog.trace.api.sampling.AdaptiveSampler.<init>(AdaptiveSampler.java:170)
        at datadog.trace.api.sampling.PerRecordingRateLimiter.<init>(PerRecordingRateLimiter.java:19)
        at datadog.trace.api.sampling.PerRecordingRateLimiter.<init>(PerRecordingRateLimiter.java:11)
        at datadog.trace.bootstrap.instrumentation.java.concurrent.QueueTimerHelper$RateLimiterHolder.<clinit>(QueueTimerHelper.java:25)
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.
Trace: Object was reached by
  reading field java.util.concurrent.locks.AbstractQueuedSynchronizer$Node.waiter of constant 
    java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionNode@31775cca: java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionNode@31775cca
  reading field java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.firstWaiter of constant 
    java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject@2bc647da: java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject@2bc647da
  reading field java.util.concurrent.DelayQueue.available of constant 
    java.util.concurrent.DelayQueue@4a793129: [periodic task RollWindowTask with target datadog.trace.api.sampling.AdaptiveSam...
  reading field datadog.trace.util.AgentTaskScheduler.workQueue of constant 
    datadog.trace.util.AgentTaskScheduler@1054094a: datadog.trace.util.AgentTaskScheduler@1054094a
  reading field datadog.trace.api.sampling.AdaptiveSampler.taskScheduler of constant 
    datadog.trace.api.sampling.AdaptiveSampler@4b0f0cc5: datadog.trace.api.sampling.AdaptiveSampler@4b0f0cc5
  scanning root datadog.trace.api.sampling.AdaptiveSampler@4b0f0cc5: datadog.trace.api.sampling.AdaptiveSampler@4b0f0cc5 embedded in 
    com.datadog.profiling.controller.openjdk.OpenJdkController.<init>(OpenJdkController.java)
  parsing method com.datadog.profiling.controller.openjdk.OpenJdkController.<init>(OpenJdkController.java:84) reachable via the parsing context
    at com.datadog.profiling.controller.openjdk.OpenJdkController.instance(OpenJdkController.java:74)
    at com.datadog.profiling.agent.CompositeController.build(CompositeController.java:157)
    at com.datadog.profiling.agent.ProfilingAgent.run(ProfilingAgent.java:124)
    at datadog.trace.agent.tooling.ProfilerInstaller.installProfiler(ProfilerInstaller.java:10)
    at datadog.trace.agent.tooling.nativeimage.TracerActivation.activate(TracerActivation.java:17)
    at org.graalvm.nativeimage.VMRuntime.initialize(VMRuntime.java:65)
    at com.oracle.svm.core.JavaMainWrapper.runCore0(JavaMainWrapper.java:220)
    at com.oracle.svm.core.JavaMainWrapper.doRun(JavaMainWrapper.java:303)
    at com.oracle.svm.core.code.IsolateEnterStub.JavaMainWrapper_run_5087f5482cc9a6abc971913ece43acb471d2631b(generated:0)
    at static root method.(Unknown Source)


        at org.graalvm.nativeimage.builder/com.oracle.svm.core.util.UserError.abort(UserError.java:85)
        at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.FallbackFeature.reportAsFallback(FallbackFeature.java:248)
        at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.runPointsToAnalysis(NativeImageGenerator.java:814)
        at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:592)
        at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.run(NativeImageGenerator.java:550)
        at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.buildImage(NativeImageGeneratorRunner.java:539)
        at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.build(NativeImageGeneratorRunner.java:721)
        at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.start(NativeImageGeneratorRunner.java:143)
        at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.main(NativeImageGeneratorRunner.java:98)
Caused by: com.oracle.graal.pointsto.constraints.UnsupportedFeatureException: Unsupported features in 5 methods
Detailed message:
Error: Detected a started Thread in the image heap. Thread name: dd-task-scheduler. Threads running in the image generator are no longer running at image runtime. Prevent threads from starting during image generation, or a started thread from being included in the image.
The culprit object has been instantiated by the 'datadog.trace.bootstrap.instrumentation.java.concurrent.QueueTimerHelper$RateLimiterHolder' class initializer with the following trace:
        at java.lang.Thread.<init>(Thread.java:1329)
        at datadog.trace.util.AgentThreadFactory.newAgentThread(AgentThreadFactory.java:108)
        at datadog.trace.util.AgentThreadFactory.newAgentThread(AgentThreadFactory.java:93)
        at datadog.trace.util.AgentTaskScheduler.scheduleTarget(AgentTaskScheduler.java:181)
        at datadog.trace.util.AgentTaskScheduler.weakScheduleAtFixedRate(AgentTaskScheduler.java:144)
        at datadog.trace.api.sampling.AdaptiveSampler.start(AdaptiveSampler.java:207)
        at datadog.trace.api.sampling.AdaptiveSampler.<init>(AdaptiveSampler.java:152)
        at datadog.trace.api.sampling.AdaptiveSampler.<init>(AdaptiveSampler.java:170)
        at datadog.trace.api.sampling.PerRecordingRateLimiter.<init>(PerRecordingRateLimiter.java:19)
        at datadog.trace.api.sampling.PerRecordingRateLimiter.<init>(PerRecordingRateLimiter.java:11)
        at datadog.trace.bootstrap.instrumentation.java.concurrent.QueueTimerHelper$RateLimiterHolder.<clinit>(QueueTimerHelper.java:25)
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.
Trace: Object was reached by
  reading field java.util.concurrent.DelayQueue.leader of constant 
    java.util.concurrent.DelayQueue@4a793129: [periodic task RollWindowTask with target datadog.trace.api.sampling.AdaptiveSam...
  reading field datadog.trace.util.AgentTaskScheduler.workQueue of constant 
    datadog.trace.util.AgentTaskScheduler@1054094a: datadog.trace.util.AgentTaskScheduler@1054094a
  reading field datadog.trace.api.sampling.AdaptiveSampler.taskScheduler of constant 
    datadog.trace.api.sampling.AdaptiveSampler@4b0f0cc5: datadog.trace.api.sampling.AdaptiveSampler@4b0f0cc5
  scanning root datadog.trace.api.sampling.AdaptiveSampler@4b0f0cc5: datadog.trace.api.sampling.AdaptiveSampler@4b0f0cc5 embedded in 
    com.datadog.profiling.controller.openjdk.OpenJdkController.<init>(OpenJdkController.java)
  parsing method com.datadog.profiling.controller.openjdk.OpenJdkController.<init>(OpenJdkController.java:84) reachable via the parsing context
    at com.datadog.profiling.controller.openjdk.OpenJdkController.instance(OpenJdkController.java:74)
    at com.datadog.profiling.agent.CompositeController.build(CompositeController.java:157)
    at com.datadog.profiling.agent.ProfilingAgent.run(ProfilingAgent.java:124)
    at datadog.trace.agent.tooling.ProfilerInstaller.installProfiler(ProfilerInstaller.java:10)
    at datadog.trace.agent.tooling.nativeimage.TracerActivation.activate(TracerActivation.java:17)
    at org.graalvm.nativeimage.VMRuntime.initialize(VMRuntime.java:65)
    at com.oracle.svm.core.JavaMainWrapper.runCore0(JavaMainWrapper.java:220)
    at com.oracle.svm.core.JavaMainWrapper.doRun(JavaMainWrapper.java:303)
    at com.oracle.svm.core.code.IsolateEnterStub.JavaMainWrapper_run_5087f5482cc9a6abc971913ece43acb471d2631b(generated:0)
    at static root method.(Unknown Source)

Error: Detected a started Thread in the image heap. Thread name: dd-task-scheduler. Threads running in the image generator are no longer running at image runtime. Prevent threads from starting during image generation, or a started thread from being included in the image.
The culprit object has been instantiated by the 'datadog.trace.bootstrap.instrumentation.java.concurrent.QueueTimerHelper$RateLimiterHolder' class initializer with the following trace:
        at java.lang.Thread.<init>(Thread.java:1329)
        at datadog.trace.util.AgentThreadFactory.newAgentThread(AgentThreadFactory.java:108)
        at datadog.trace.util.AgentThreadFactory.newAgentThread(AgentThreadFactory.java:93)
        at datadog.trace.util.AgentTaskScheduler.scheduleTarget(AgentTaskScheduler.java:181)
        at datadog.trace.util.AgentTaskScheduler.weakScheduleAtFixedRate(AgentTaskScheduler.java:144)
        at datadog.trace.api.sampling.AdaptiveSampler.start(AdaptiveSampler.java:207)
        at datadog.trace.api.sampling.AdaptiveSampler.<init>(AdaptiveSampler.java:152)
        at datadog.trace.api.sampling.AdaptiveSampler.<init>(AdaptiveSampler.java:170)
        at datadog.trace.api.sampling.PerRecordingRateLimiter.<init>(PerRecordingRateLimiter.java:19)
        at datadog.trace.api.sampling.PerRecordingRateLimiter.<init>(PerRecordingRateLimiter.java:11)
        at datadog.trace.bootstrap.instrumentation.java.concurrent.QueueTimerHelper$RateLimiterHolder.<clinit>(QueueTimerHelper.java:25)
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.
Trace: Object was reached by
  reading field java.util.concurrent.locks.AbstractQueuedSynchronizer$Node.waiter of constant 
    java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionNode@d6cfa74: java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionNode@d6cfa74
  reading field java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.firstWaiter of constant 
    java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject@2bc647da: java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject@2bc647da
  reading field java.util.concurrent.DelayQueue.available of constant 
    java.util.concurrent.DelayQueue@4a793129: [periodic task RollWindowTask with target datadog.trace.api.sampling.AdaptiveSam...
  reading field datadog.trace.util.AgentTaskScheduler.workQueue of constant 
    datadog.trace.util.AgentTaskScheduler@1054094a: datadog.trace.util.AgentTaskScheduler@1054094a
  reading field datadog.trace.api.sampling.AdaptiveSampler.taskScheduler of constant 
    datadog.trace.api.sampling.AdaptiveSampler@4b0f0cc5: datadog.trace.api.sampling.AdaptiveSampler@4b0f0cc5
  scanning root datadog.trace.api.sampling.AdaptiveSampler@4b0f0cc5: datadog.trace.api.sampling.AdaptiveSampler@4b0f0cc5 embedded in 
    com.datadog.profiling.controller.openjdk.OpenJdkController.<init>(OpenJdkController.java)
  parsing method com.datadog.profiling.controller.openjdk.OpenJdkController.<init>(OpenJdkController.java:84) reachable via the parsing context
    at com.datadog.profiling.controller.openjdk.OpenJdkController.instance(OpenJdkController.java:74)
    at com.datadog.profiling.agent.CompositeController.build(CompositeController.java:157)
    at com.datadog.profiling.agent.ProfilingAgent.run(ProfilingAgent.java:124)
    at datadog.trace.agent.tooling.ProfilerInstaller.installProfiler(ProfilerInstaller.java:10)
    at datadog.trace.agent.tooling.nativeimage.TracerActivation.activate(TracerActivation.java:17)
    at org.graalvm.nativeimage.VMRuntime.initialize(VMRuntime.java:65)
    at com.oracle.svm.core.JavaMainWrapper.runCore0(JavaMainWrapper.java:220)
    at com.oracle.svm.core.JavaMainWrapper.doRun(JavaMainWrapper.java:303)
    at com.oracle.svm.core.code.IsolateEnterStub.JavaMainWrapper_run_5087f5482cc9a6abc971913ece43acb471d2631b(generated:0)
    at static root method.(Unknown Source)

Error: Detected a started Thread in the image heap. Thread name: dd-task-scheduler. Threads running in the image generator are no longer running at image runtime. Prevent threads from starting during image generation, or a started thread from being included in the image.
The culprit object has been instantiated by the 'datadog.trace.bootstrap.instrumentation.java.concurrent.QueueTimerHelper$RateLimiterHolder' class initializer with the following trace:
        at java.lang.Thread.<init>(Thread.java:1329)
        at datadog.trace.util.AgentThreadFactory.newAgentThread(AgentThreadFactory.java:108)
        at datadog.trace.util.AgentThreadFactory.newAgentThread(AgentThreadFactory.java:93)
        at datadog.trace.util.AgentTaskScheduler.scheduleTarget(AgentTaskScheduler.java:181)
        at datadog.trace.util.AgentTaskScheduler.weakScheduleAtFixedRate(AgentTaskScheduler.java:144)
        at datadog.trace.api.sampling.AdaptiveSampler.start(AdaptiveSampler.java:207)
        at datadog.trace.api.sampling.AdaptiveSampler.<init>(AdaptiveSampler.java:152)
        at datadog.trace.api.sampling.AdaptiveSampler.<init>(AdaptiveSampler.java:170)
        at datadog.trace.api.sampling.PerRecordingRateLimiter.<init>(PerRecordingRateLimiter.java:19)
        at datadog.trace.api.sampling.PerRecordingRateLimiter.<init>(PerRecordingRateLimiter.java:11)
        at datadog.trace.bootstrap.instrumentation.java.concurrent.QueueTimerHelper$RateLimiterHolder.<clinit>(QueueTimerHelper.java:25)
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.
Trace: Object was reached by
  reading field datadog.trace.util.AgentTaskScheduler.worker of constant 
    datadog.trace.util.AgentTaskScheduler@1054094a: datadog.trace.util.AgentTaskScheduler@1054094a
  reading field datadog.trace.api.sampling.AdaptiveSampler.taskScheduler of constant 
    datadog.trace.api.sampling.AdaptiveSampler@4b0f0cc5: datadog.trace.api.sampling.AdaptiveSampler@4b0f0cc5
  scanning root datadog.trace.api.sampling.AdaptiveSampler@4b0f0cc5: datadog.trace.api.sampling.AdaptiveSampler@4b0f0cc5 embedded in 
    com.datadog.profiling.controller.openjdk.OpenJdkController.<init>(OpenJdkController.java)
  parsing method com.datadog.profiling.controller.openjdk.OpenJdkController.<init>(OpenJdkController.java:84) reachable via the parsing context
    at com.datadog.profiling.controller.openjdk.OpenJdkController.instance(OpenJdkController.java:74)
    at com.datadog.profiling.agent.CompositeController.build(CompositeController.java:157)
    at com.datadog.profiling.agent.ProfilingAgent.run(ProfilingAgent.java:124)
    at datadog.trace.agent.tooling.ProfilerInstaller.installProfiler(ProfilerInstaller.java:10)
    at datadog.trace.agent.tooling.nativeimage.TracerActivation.activate(TracerActivation.java:17)
    at org.graalvm.nativeimage.VMRuntime.initialize(VMRuntime.java:65)
    at com.oracle.svm.core.JavaMainWrapper.runCore0(JavaMainWrapper.java:220)
    at com.oracle.svm.core.JavaMainWrapper.doRun(JavaMainWrapper.java:303)
    at com.oracle.svm.core.code.IsolateEnterStub.JavaMainWrapper_run_5087f5482cc9a6abc971913ece43acb471d2631b(generated:0)
    at static root method.(Unknown Source)

Error: Detected a started Thread in the image heap. Thread name: dd-task-scheduler. Threads running in the image generator are no longer running at image runtime. Prevent threads from starting during image generation, or a started thread from being included in the image.
The culprit object has been instantiated by the 'datadog.trace.bootstrap.instrumentation.java.concurrent.QueueTimerHelper$RateLimiterHolder' class initializer with the following trace:
        at java.lang.Thread.<init>(Thread.java:1329)
        at datadog.trace.util.AgentThreadFactory.newAgentThread(AgentThreadFactory.java:108)
        at datadog.trace.util.AgentThreadFactory.newAgentThread(AgentThreadFactory.java:93)
        at datadog.trace.util.AgentTaskScheduler.scheduleTarget(AgentTaskScheduler.java:181)
        at datadog.trace.util.AgentTaskScheduler.weakScheduleAtFixedRate(AgentTaskScheduler.java:144)
        at datadog.trace.api.sampling.AdaptiveSampler.start(AdaptiveSampler.java:207)
        at datadog.trace.api.sampling.AdaptiveSampler.<init>(AdaptiveSampler.java:152)
        at datadog.trace.api.sampling.AdaptiveSampler.<init>(AdaptiveSampler.java:170)
        at datadog.trace.api.sampling.PerRecordingRateLimiter.<init>(PerRecordingRateLimiter.java:19)
        at datadog.trace.api.sampling.PerRecordingRateLimiter.<init>(PerRecordingRateLimiter.java:11)
        at datadog.trace.bootstrap.instrumentation.java.concurrent.QueueTimerHelper$RateLimiterHolder.<clinit>(QueueTimerHelper.java:25)
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.
Trace: Object was reached by
  reading field java.util.concurrent.locks.AbstractQueuedSynchronizer$Node.waiter of constant 
    java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionNode@26037e62: java.util.concurrent.locks.Abst                       2.8s (11.2% of total time) in 382 GCs | Peak RSS: 2.62GB | CPU load: 4.84
========================================================================================================================
ractQueuedSynchronizer$ConditionNode@26037e62
  reading field java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.firstWaiter of constant 
    java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject@2bc647da: java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject@2bc647da
  reading field java.util.concurrent.DelayQueue.available of constant 
    java.util.concurrent.DelayQueue@4a793129: [periodic task RollWindowTask with target datadog.trace.api.sampling.AdaptiveSam...
  reading field datadog.trace.util.AgentTaskScheduler.workQueue of constant 
    datadog.trace.util.AgentTaskScheduler@1054094a: datadog.trace.util.AgentTaskScheduler@1054094a
  scanning root datadog.trace.util.AgentTaskScheduler@1054094a: datadog.trace.util.AgentTaskScheduler@1054094a embedded in 
    datadog.trace.agent.tooling.WeakMaps.newWeakMap(WeakMaps.java:17)
  parsing method datadog.trace.agent.tooling.WeakMaps.newWeakMap(WeakMaps.java:15) reachable via the parsing context
    at datadog.trace.agent.tooling.WeakMaps$1.get(WeakMaps.java:34)
    at datadog.trace.bootstrap.WeakMap$Supplier.newWeakMap(WeakMap.java:26)
    at datadog.trace.bootstrap.WeakMapContextStore.<init>(WeakMapContextStore.java:12)
    at datadog.trace.bootstrap.FieldBackedContextStore.weakStore(FieldBackedContextStore.java:105)
    at datadog.trace.bootstrap.FieldBackedContextStore.get(FieldBackedContextStore.java:19)
    at datadog.trace.bootstrap.instrumentation.java.concurrent.AdviceUtils.startTaskScope(AdviceUtils.java:21)
    at java.util.concurrent.RecursiveTask.exec(RecursiveTask.java:110)
    at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:387)
    at java.util.concurrent.ForkJoinTask.invoke(ForkJoinTask.java:667)
    at java.util.stream.Nodes.flatten(Nodes.java:470)
    at java.util.stream.Nodes.collect(Nodes.java:329)
    at java.util.stream.ReferencePipeline.evaluateToNode(ReferencePipeline.java:111)
    at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:570)
    at java.util.stream.AbstractPipeline.evaluateToArrayNode(AbstractPipeline.java:260)
    at java.util.stream.ReferencePipeline.toArray(ReferencePipeline.java:616)
    at sun.util.locale.provider.LocaleProviderAdapter.toLocaleArray(LocaleProviderAdapter.java:326)
    at sun.util.locale.provider.CalendarDataProviderImpl.getAvailableLocales(CalendarDataProviderImpl.java:63)
    at java.util.spi.LocaleServiceProvider.isSupportedLocale(LocaleServiceProvider.java:220)
    at sun.util.locale.provider.LocaleProviderAdapter.findAdapter(LocaleProviderAdapter.java:297)
    at sun.util.locale.provider.LocaleProviderAdapter.getAdapter(LocaleProviderAdapter.java:278)
    at java.text.DecimalFormatSymbols.initialize(DecimalFormatSymbols.java:813)
    at java.text.DecimalFormatSymbols.<init>(DecimalFormatSymbols.java:115)
    at sun.util.locale.provider.DecimalFormatSymbolsProviderImpl.getInstance(DecimalFormatSymbolsProviderImpl.java:85)
    at java.text.DecimalFormatSymbols.getInstance(DecimalFormatSymbols.java:186)
    at java.util.Formatter.getDecimalFormatSymbols(Formatter.java:2032)
    at java.util.Formatter$FormatSpecifier.localizedMagnitude(Formatter.java:4573)
    at java.util.Formatter$FormatSpecifier.localizedMagnitude(Formatter.java:4520)
    at java.util.Formatter$FormatSpecifier.print(Formatter.java:4334)
    at java.util.Formatter$FormatSpecifier.print(Formatter.java:4282)
    at java.util.Formatter$FormatSpecifier.printDateTime(Formatter.java:3105)
    at java.util.Formatter$FormatSpecifier.print(Formatter.java:3014)
    at java.util.Formatter.format(Formatter.java:2791)
    at java.util.Formatter.format(Formatter.java:2728)
    at java.lang.String.format(String.java:4390)
    at jdk.internal.util.Preconditions.outOfBoundsMessage(Preconditions.java:242)
    at jdk.internal.util.Preconditions$4.apply(Preconditions.java:213)
    at jdk.internal.util.Preconditions$4.apply(Preconditions.java:210)
    at jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:98)
    at jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:106)
    at jdk.internal.util.Preconditions.checkIndex(Preconditions.java:302)
    at java.lang.StringUTF16.checkIndex(StringUTF16.java:1613)
    at java.lang.StringUTF16.charAt(StringUTF16.java:1418)
    at java.lang.String.charAt(String.java:1557)
    at java.lang.Long.parseLong(Long.java:689)
    at java.lang.Long.valueOf(Long.java:1157)
    at static root method.(Unknown Source)

Error: Detected a started Thread in the image heap. Thread name: dd-task-scheduler. Threads running in the image generator are no longer running at image runtime. Prevent threads from starting during image generation, or a started thread from being included in the image.
The culprit object has been instantiated by the 'datadog.trace.bootstrap.instrumentation.java.concurrent.QueueTimerHelper$RateLimiterHolder' class initializer with the following trace:
        at java.lang.Thread.<init>(Thread.java:1329)
        at datadog.trace.util.AgentThreadFactory.newAgentThread(AgentThreadFactory.java:108)
        at datadog.trace.util.AgentThreadFactory.newAgentThread(AgentThreadFactory.java:93)
        at datadog.trace.util.AgentTaskScheduler.scheduleTarget(AgentTaskScheduler.java:181)
        at datadog.trace.util.AgentTaskScheduler.weakScheduleAtFixedRate(AgentTaskScheduler.java:144)
        at datadog.trace.api.sampling.AdaptiveSampler.start(AdaptiveSampler.java:207)
        at datadog.trace.api.sampling.AdaptiveSampler.<init>(AdaptiveSampler.java:152)
        at datadog.trace.api.sampling.AdaptiveSampler.<init>(AdaptiveSampler.java:170)
        at datadog.trace.api.sampling.PerRecordingRateLimiter.<init>(PerRecordingRateLimiter.java:19)
        at datadog.trace.api.sampling.PerRecordingRateLimiter.<init>(PerRecordingRateLimiter.java:11)
        at datadog.trace.bootstrap.instrumentation.java.concurrent.QueueTimerHelper$RateLimiterHolder.<clinit>(QueueTimerHelper.java:25)
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.
Trace: Object was reached by
  reading field java.util.concurrent.locks.AbstractQueuedSynchronizer$Node.waiter of constant 
    java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionNode@31775cca: java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionNode@31775cca
  reading field java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.firstWaiter of constant 
    java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject@2bc647da: java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject@2bc647da
  reading field java.util.concurrent.DelayQueue.available of constant 
    java.util.concurrent.DelayQueue@4a793129: [periodic task RollWindowTask with target datadog.trace.api.sampling.AdaptiveSam...
  reading field datadog.trace.util.AgentTaskScheduler.workQueue of constant 
    datadog.trace.util.AgentTaskScheduler@1054094a: datadog.trace.util.AgentTaskScheduler@1054094a
  reading field datadog.trace.api.sampling.AdaptiveSampler.taskScheduler of constant 
    datadog.trace.api.sampling.AdaptiveSampler@4b0f0cc5: datadog.trace.api.sampling.AdaptiveSampler@4b0f0cc5
  scanning root datadog.trace.api.sampling.AdaptiveSampler@4b0f0cc5: datadog.trace.api.sampling.AdaptiveSampler@4b0f0cc5 embedded in 
    com.datadog.profiling.controller.openjdk.OpenJdkController.<init>(OpenJdkController.java)
  parsing method com.datadog.profiling.controller.openjdk.OpenJdkController.<init>(OpenJdkController.java:84) reachable via the parsing context
    at com.datadog.profiling.controller.openjdk.OpenJdkController.instance(OpenJdkController.java:74)
    at com.datadog.profiling.agent.CompositeController.build(CompositeController.java:157)
    at com.datadog.profiling.agent.ProfilingAgent.run(ProfilingAgent.java:124)
    at datadog.trace.agent.tooling.ProfilerInstaller.installProfiler(ProfilerInstaller.java:10)
    at datadog.trace.agent.tooling.nativeimage.TracerActivation.activate(TracerActivation.java:17)
    at Finished generating 'kafka-with-quarkus-1.0.0-SNAPSHOT-runner' in 24.1s.
org.graalvm.nativeimage.VMRuntime.initialize(VMRuntime.java:65)
    at com.oracle.svm.core.JavaMainWrapper.runCore0(JavaMainWrapper.java:220)
    at com.oracle.svm.core.JavaMainWrapper.doRun(JavaMainWrapper.java:303)
    at com.oracle.svm.core.code.IsolateEnterStub.JavaMainWrapper_run_5087f5482cc9a6abc971913ece43acb471d2631b(generated:0)
    at static root method.(Unknown Source)


        at org.graalvm.nativeimage.pointsto/com.oracle.graal.pointsto.constraints.UnsupportedFeatures.report(UnsupportedFeatures.java:129)
        at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.runPointsToAnalysis(NativeImageGenerator.java:809)
        ... 6 more

I've made a reproducer https://github.com/luneo7/kafka-with-quarkus , just clone it update src/main/resources/application.properties -> quarkus.native.container-runtime-options so the volume there points to the actual dd-java-agent-1.45.2.jar path, and later run ./mvnw package -Dnative -Dquarkus.native.container-build=true it will use docker to build the native image, and it will fail because there will be threads created in the image heap.

@luneo7
Copy link
Contributor

luneo7 commented Jan 29, 2025

Funny thing, is that it seems related to profiling, but profiling in our case is not enabled

@luneo7
Copy link
Contributor

luneo7 commented Jan 29, 2025

With the latest version we need to add --initialize-at-run-time=com.datadog.profiling.ddprof.JavaProfilerLoader,datadog.trace.bootstrap.instrumentation.java.concurrent.QueueTimerHelper$RateLimiterHolder,com.datadog.profiling.controller.TempLocationManager$SingletonHolder ...

@luneo7
Copy link
Contributor

luneo7 commented Jan 30, 2025

@mcculls created this PR #8315 which adds the "missing" classes to be rerun... with that everything works correctly in our internal tests... dunno if you guys want to add that to be rerun, or will want to refactor, as with refactoring we can also prevent those threads to be created during build time...

@mcculls
Copy link
Contributor

mcculls commented Jan 30, 2025

Hi @luneo7 - thanks for the contribution, looks like we'll need to do a bit of refactoring anyway as the change as-is causes an older native-image smoke test to fail. I'll attempt to fix that tomorrow.

@mcculls mcculls self-assigned this Jan 30, 2025
@mcculls mcculls added this to the 1.47.0 milestone Jan 30, 2025
@mcculls
Copy link
Contributor

mcculls commented Jan 30, 2025

Thanks @luneo7 - I've applied your fix and it will be in the 1.47.0 release in a few weeks time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp: native-image GraalVM native-image
Projects
None yet
Development

No branches or pull requests

4 participants