JDK-6649401 : guarantee(Thread::current() == (Thread*)thread, "only current thread can flush its registers")
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: hs13,6u5,6u6,7
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: solaris,solaris_10
  • CPU: generic,sparc
  • Submitted: 2008-01-11
  • Updated: 2012-02-01
  • Resolved: 2009-02-06
Related Reports
Duplicate :  
Duplicate :  
Description
Here is an entry from my nightly analysis report:

New JDI_REGRESSION failures (from 2007.06.12)
    com/sun/jdi/ExceptionEvents.java
        This test failed the following assertion:

            Internal Error (src/cpu/sparc/vm/frame_sparc.cpp:505)
            Error: guarantee(Thread::current() == (Thread*)thread,
                "only current thread can flush its registers")

        on Solaris SPARC Client VM (machine vm-ultra80-02).

        There is another instance of this assertion failing in the
        RedefineCrossEvent.java entry below.

        Last failure on 2007.09.07 with Solaris SPARC Server VM.
        Previous failure on 2007.06.12 with Solaris SPARC Client VM.

This particular assertion crops up when there's a race in
stack walking or suspend/resume.
Here is another entry:

New JDI_REGRESSION failures (from 2007.01.22)
    com/sun/jdi/RedefineCrossEvent.java
        This test failed the following assertion:

            Internal Error (src/cpu/sparc/vm/frame_sparc.cpp:505)
            Error: guarantee(Thread::current() == (Thread*)thread,
                "only current thread can flush its registers")

        on Solaris SPARC Server VM (machine vm-ultra80-01).

        Last failure on 2007.12.04 with Solaris SPARC Server VM.
        Previous failure on 2007.01.22 with Solaris SPARC Server VM.
Another occurrence in the 2008.01.12 nightly:

http://sqeweb.sfbay/nfs/tools/gtee/results/JDK7/NIGHTLY/VM/2008-01-12/Serv_Baseline/vm/solaris-sparc/server/comp/vm-solaris-sparc_server_comp_JDI_REGRESSION2008-01-12-19-43-32/com/sun/jdi/ExceptionEvents.jtr
Another occurrence in the 2008.01.23 nightly:

http://sqeweb.sfbay/nfs/tools/gtee/results/JDK7/NIGHTLY/VM/2008-01-23/Serv_Baseline/vm/solaris-sparc/server/comp/vm-solaris-sparc_server_comp_JDI_REGRESSION2008-01-23-20-07-36/com/sun/jdi/ExceptionEvents.jtr

Comments
EVALUATION I compared the crash stack mentioned in the comments section and the one in CR 6676175 and they are almost exactly same, so I believe this bug is a duplicate of bug 6676175.
05-02-2009

WORK AROUND No more crashes since -XX:-UseBiasedLocking was used.
02-12-2008