JDK-6976372 : # assert(_owner == Thread::current()) failed: invariant
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: hs19
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: solaris_9
  • CPU: sparc
  • Submitted: 2010-08-11
  • Updated: 2011-03-08
  • Resolved: 2011-03-08
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6 JDK 7 Other
6u21pFixed 7Fixed hs19Fixed
Related Reports
Relates :  
Description
It looks like an unnecessary unlock:

    // CodeCache is full, disable compilation                                                                                                         
    // Ought to log this but compile log is only per compile thread                                                                                   
    // and we're some non descript Java thread.                                                                                                       
    MutexUnlocker mu(AdapterHandlerLibrary_lock);
    CompileBroker::handle_full_code_cache();
  }

We're not actually holding the AdapterHandlerLibrary_lock at this point.  I think there's a problem in CompileBroker::handle_full_code_cache as well since it seems to assume it's only called from a compiler thread but create_native_wrapper is executed by whoever calls it.

tom

On Aug 11, 2010, at 10:05 AM, Vladimir Kozlov wrote:

nsk/stress/jck60/jck60021

http://sqeweb.sfbay.sun.com/nfs/results/vm/gtee/JDK7/NIGHTLY/VM/2010-08-10/Comp_Baseline/vm/solaris-sparc/client/comp/solaris-sparc_vm_client_comp_nsk.stress.testlist/ResultDir/jck60021/hs_err_pid2677.log

#  Internal Error (/tmp/jprt/P1/B/191642.never/source/src/share/vm/runtime/mutex.cpp:965), pid=2677, tid=399
#  assert(_owner == Thread::current()) failed: invariant
#

Comments
EVALUATION 6976372: # assert(_owner == Thread::current()) failed: invariant Reviewed-by: kvn, twisti The full code cache path in the native wrapper has an unnecessary call to MutexUnlocker which asserts when executed. The fix is simply to remove the call. Additionally handle_full_code_cache assumes it's called from the CompilerThread but this isn't true for native wrappers. The fix is to log to xtty if it exists, which also covers the LogCompilation case when called from a compiler thread. Tested by faking code cache full in the debugger. src/share/vm/runtime/sharedRuntime.cpp src/share/vm/compiler/compileBroker.cpp
2010-08-18

EVALUATION http://hg.openjdk.java.net/jdk7/hotspot-comp/hotspot/rev/a62d332029cf
2010-08-14