File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
dd-java-agent/agent-bootstrap/src/main/java/datadog/trace/bootstrap Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change 6363import java .net .MalformedURLException ;
6464import java .net .URISyntaxException ;
6565import java .net .URL ;
66+ import java .nio .ByteBuffer ;
6667import java .security .CodeSource ;
6768import java .util .EnumSet ;
6869import java .util .concurrent .TimeUnit ;
@@ -795,6 +796,11 @@ private static void startCrashTracking() {
795796 if (forceEarlyStart ) {
796797 initializeCrashTrackingDefault ();
797798 } 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+ ByteBuffer buffer = ByteBuffer .allocate (1 );
803+
798804 AgentTaskScheduler .get ().execute (Agent ::initializeCrashTrackingDefault );
799805 }
800806 } else {
You can’t perform that action at this time.
0 commit comments