8216428: Remove IgnoreLibthreadGPFault
authorredestad
Thu, 10 Jan 2019 16:50:26 +0100
changeset 53238 38716f9d2239
parent 53237 443abf0dc2ed
child 53239 c024fcb88ede
8216428: Remove IgnoreLibthreadGPFault Reviewed-by: dholmes, eosterlund
src/hotspot/os_cpu/solaris_x86/os_solaris_x86.cpp
src/hotspot/share/runtime/globals.hpp
--- a/src/hotspot/os_cpu/solaris_x86/os_solaris_x86.cpp	Thu Jan 10 07:54:16 2019 -0800
+++ b/src/hotspot/os_cpu/solaris_x86/os_solaris_x86.cpp	Thu Jan 10 16:50:26 2019 +0100
@@ -686,54 +686,6 @@
     return true;
   }
 
-#ifndef AMD64
-  // Workaround (bug 4900493) for Solaris kernel bug 4966651.
-  // Handle an undefined selector caused by an attempt to assign
-  // fs in libthread getipriptr(). With the current libthread design every 512
-  // thread creations the LDT for a private thread data structure is extended
-  // and thre is a hazard that and another thread attempting a thread creation
-  // will use a stale LDTR that doesn't reflect the structure's growth,
-  // causing a GP fault.
-  // Enforce the probable limit of passes through here to guard against an
-  // infinite loop if some other move to fs caused the GP fault. Note that
-  // this loop counter is ultimately a heuristic as it is possible for
-  // more than one thread to generate this fault at a time in an MP system.
-  // In the case of the loop count being exceeded or if the poll fails
-  // just fall through to a fatal error.
-  // If there is some other source of T_GPFLT traps and the text at EIP is
-  // unreadable this code will loop infinitely until the stack is exausted.
-  // The key to diagnosis in this case is to look for the bottom signal handler
-  // frame.
-
-  if(! IgnoreLibthreadGPFault) {
-    if (sig == SIGSEGV && uc->uc_mcontext.gregs[TRAPNO] == T_GPFLT) {
-      const unsigned char *p =
-                        (unsigned const char *) uc->uc_mcontext.gregs[EIP];
-
-      // Expected instruction?
-
-      if(p[0] == movlfs[0] && p[1] == movlfs[1]) {
-
-        Atomic::inc(&ldtr_refresh);
-
-        // Infinite loop?
-
-        if(ldtr_refresh < ((2 << 16) / PAGESIZE)) {
-
-          // No, force scheduling to get a fresh view of the LDTR
-
-          if(poll(NULL, 0, 10) == 0) {
-
-            // Retry the move
-
-            return false;
-          }
-        }
-      }
-    }
-  }
-#endif // !AMD64
-
   if (!abort_if_unrecognized) {
     // caller wants another chance, so give it to him
     return false;
--- a/src/hotspot/share/runtime/globals.hpp	Thu Jan 10 07:54:16 2019 -0800
+++ b/src/hotspot/share/runtime/globals.hpp	Thu Jan 10 16:50:26 2019 +0100
@@ -1061,9 +1061,6 @@
   manageable(bool, PrintClassHistogram, false,                              \
           "Print a histogram of class instances")                           \
                                                                             \
-  develop(bool, IgnoreLibthreadGPFault, false,                              \
-          "Suppress workaround for libthread GP fault")                     \
-                                                                            \
   experimental(double, ObjectCountCutOffPercent, 0.5,                       \
           "The percentage of the used heap that the instances of a class "  \
           "must occupy for the class to generate a trace event")            \