United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6976372 # assert(_owner == Thread::current()) failed: invariant
JDK-6976372 : # assert(_owner == Thread::current()) failed: invariant

Details
Type:
Bug
Submit Date:
2010-08-11
Status:
Closed
Updated Date:
2011-03-08
Project Name:
JDK
Resolved Date:
2011-03-08
Component:
hotspot
OS:
solaris_9
Sub-Component:
compiler
CPU:
sparc
Priority:
P4
Resolution:
Fixed
Affected Versions:
hs19
Fixed Versions:
hs19 (b06)

Related Reports
Backport:
Backport:
Backport:
Backport:
Relates:

Sub Tasks

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

http://hg.openjdk.java.net/jdk7/hotspot-comp/hotspot/rev/a62d332029cf
                                     
2010-08-14
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



Hardware and Software, Engineered to Work Together