src/hotspot/share/runtime/safepoint.cpp
changeset 54031 feea57b38a1c
parent 54009 13acb4339895
child 54323 846bc643f4ef
equal deleted inserted replaced
54030:889dae20c4c4 54031:feea57b38a1c
   900   }
   900   }
   901 
   901 
   902   // To debug the long safepoint, specify both AbortVMOnSafepointTimeout &
   902   // To debug the long safepoint, specify both AbortVMOnSafepointTimeout &
   903   // ShowMessageBoxOnError.
   903   // ShowMessageBoxOnError.
   904   if (AbortVMOnSafepointTimeout) {
   904   if (AbortVMOnSafepointTimeout) {
       
   905     // Send the blocking thread a signal to terminate and write an error file.
       
   906     for (JavaThreadIteratorWithHandle jtiwh; JavaThread *cur_thread = jtiwh.next(); ) {
       
   907       if (cur_thread->safepoint_state()->is_running()) {
       
   908         if (!os::signal_thread(cur_thread, SIGILL, "blocking a safepoint")) {
       
   909           break; // Could not send signal. Report fatal error.
       
   910         }
       
   911         // Give cur_thread a chance to report the error and terminate the VM.
       
   912         os::sleep(Thread::current(), 3000, false);
       
   913       }
       
   914     }
   905     fatal("Safepoint sync time longer than " INTX_FORMAT "ms detected when executing %s.",
   915     fatal("Safepoint sync time longer than " INTX_FORMAT "ms detected when executing %s.",
   906           SafepointTimeoutDelay, VMThread::vm_operation()->name());
   916           SafepointTimeoutDelay, VMThread::vm_operation()->name());
   907   }
   917   }
   908 }
   918 }
   909 
   919