United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: 7129715 MAC: SIGBUS in nsk stress test
7129715 : MAC: SIGBUS in nsk stress test

Details
Type:
Bug
Submit Date:
2012-01-13
Status:
Closed
Updated Date:
2013-05-29
Project Name:
JDK
Resolved Date:
2012-07-03
Component:
hotspot
OS:
os_x
Sub-Component:
compiler
CPU:
generic
Priority:
P2
Resolution:
Fixed
Affected Versions:
hs21,7u4
Fixed Versions:
hs24

Related Reports
Backport:
Backport:
Backport:
Backport:
Backport:
Duplicate:

Sub Tasks

Description
This bug shadows a JIRA bug created for the Mac OS X port at...

http://java.net/jira/browse/MACOSX_PORT-184

Here is the description from that bug:

Stress test crashes with

An irrecoverable stack overflow has occurred.
#

    A fatal error has been detected by the Java Runtime Environment:
    #
    SIGBUS (0xa) at pc=104ea8e20, pid=26246, tid=4453531648
    #
    JRE version: 7.0-b200
    Java VM: OpenJDK 64-Bit Server VM (21.0-b17 compiled mode bsd-amd64 compressed oops)
    Problematic frame:
    J nsk.share.gc.NonbranchyTree.createTree(II)Lnsk/share/gc/Node;
    #
    Core dump written. Default location: /net/vmsqe.russia/export/home/nh161220/bugs/macos-JumbleGC/core or core.26246
    #
    [thread 4455653376 also had an error]
    An error report file with more information is saved as:
    [thread 4455653376 also had an error]
    [thread 4454592512 also had an error]
    #
    If you would like to submit a bug report, please visit:
    http://bugreport.sun.com/bugreport/crash.jsp
    #
    run.sh: line 1: 26246 Abort trap (core dumped) java -server -Xcomp -cp test.jar gc.gctests.JumbleGC002.JumbleGC002

Build: b200
Keywords: test-fail-macos

                                    

Comments
EVALUATION

http://hg.openjdk.java.net/lambda/lambda/hotspot/rev/40782a131183
                                     
2012-06-29
EVALUATION

http://hg.openjdk.java.net/hsx/hsx23.2/hotspot/rev/b237d00f078c
                                     
2012-06-28
EVALUATION

http://hg.openjdk.java.net/hsx/hotspot-comp/hotspot/rev/40782a131183
                                     
2012-06-21
EVALUATION

The thread catches a SIGSEGV or SIGBUS because it's exhausting its stack space. The stub to return to is set:
stub = SharedRuntime::continuation_for_implicit_exception(thread, pc, SharedRuntime::STACK_OVERFLOW);
but it is overwritten in:
#if defined(__APPLE__)
      // 32-bit Darwin reports a SIGBUS for nearly all memory access exceptions. 
      // 64-bit Darwin may also use a SIGBUS (seen with compressed oops).
      // Catching SIGBUS here prevents the implicit SIGBUS NULL check below from
      // being called, so only do so if the implicit NULL check is not necessary.
      } else if (sig == SIGBUS && MacroAssembler::needs_explicit_null_check((intptr_t)info->si_addr)) {
#else
      } else if (sig == SIGBUS /* && info->si_code == BUS_OBJERR */) {
#endif
        // BugId 4454115: A read from a MappedByteBuffer can fault                                                                                    
        // here if the underlying file has been truncated.
        // Do not crash the VM in such a case.                                                                                    
        CodeBlob* cb = CodeCache::find_blob_unsafe(pc);
        nmethod* nm = cb->is_nmethod() ? (nmethod*)cb : NULL;
        if (nm != NULL && nm->has_unsafe_access()) {
          stub = StubRoutines::handler_for_unsafe_access();
        }

so the stack overflow exception is not thrown and the thread continues growing the stack leading to a fatal error.
                                     
2012-06-13



Hardware and Software, Engineered to Work Together