File tree Expand file tree Collapse file tree
dd-java-agent/agent-bootstrap/src/main/java/datadog/trace/bootstrap Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -291,6 +291,12 @@ public static void start(
291291 startCwsAgent ();
292292 }
293293
294+ // To workaround JDK-8345810, we want to trigger loading/initializing of pthread library on
295+ // main thread (Linux only)
296+ if (OperatingSystem .isLinux ()) {
297+ FileSystems .getDefault ();
298+ }
299+
294300 /*
295301 * Force the task scheduler init early. The exception profiling instrumentation may get in way of the initialization
296302 * when it will happen after the class transformers were added.
@@ -796,10 +802,6 @@ private static void startCrashTracking() {
796802 if (forceEarlyStart ) {
797803 initializeCrashTrackingDefault ();
798804 } else {
799- // To workaround JDK-8345810, we want to initialize nio early,
800- // which has dependence on libpthread. Creating a small nio ByteBuffer
801- // to force nio initialization.
802- FileSystems .getDefault ();
803805 AgentTaskScheduler .get ().execute (Agent ::initializeCrashTrackingDefault );
804806 }
805807 } else {
You can’t perform that action at this time.
0 commit comments