JDK-4765780 : server java_g assert(obj->is_oop(), "sanity check")
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 1.4.2
  • Priority: P2
  • Status: Closed
  • Resolution: Won't Fix
  • OS: generic
  • CPU: generic
  • Submitted: 2002-10-21
  • Updated: 2003-09-24
  • Resolved: 2003-09-24
Related Reports
Relates :  
Relates :  
Description

Name: elR10090			Date: 10/21/2002


-------------------------------------------------
Test            : nsk/coverage/runtime/runtime002
TestBase        : testbase_nsk
Command         : java_g
VM              : server
Mode            : -Xmixed
OS              : generic
JDK             : 1.4.2-b03
-------------------------------------------------

This test causes Mantis-server-java_g-mixed to crash with 
an error message like the following: 

    # HotSpot Virtual Machine Error, assertion failure
    # Please report this error at
    # http://java.sun.com/cgi-bin/bugreport.cgi
    #
    # Java VM: Java HotSpot(TM) Server VM (1.4.2-beta-b03-debug mixed mode)
    #
    # assert(obj->is_oop(), "sanity check")
    #
    # Error happened during: deoptimize frame
    #
    # Error ID: /BUILD_AREA/jdk1.4.2/hotspot/src/share/vm/runtime/handles.cpp, 16
    #
    # Thread requesting VM operation: prio=5 tid=0x0807bde0 nid=0x1 waiting on condition 
    #
    Dumping core....

Such crashes are observed only against server java_g VM running 
with -Xmixed mode. Crashes are not observed otherwise: 

                     int_g  mix_g  comp_g  int   mixed  comp
    --------------------------------------------------------
    sparcv9-server:  pass   FAIL   pass    pass  pass   pass
    sparc-server:    pass   FAIL   pass    pass  pass   pass
    solx86-server:   pass   FAIL   pass    pass  pass   pass
    linux-server:    pass   FAIL   pass    pass  pass   pass
    win-server:      pass   FAIL   pass    pass  pass   pass
    --------------------------------------------------------
    sparc-client:    pass   pass   pass    pass  pass   pass
    solx86-client:   pass   pass   pass    pass  pass   pass
    linux-client:    pass   pass   pass    pass  pass   pass
    win-client:      pass   pass   pass    pass  pass   pass
    --------------------------------------------------------

This looks like a regression of the Hopper bug:
    4651825 64 bit VM crash: assert(obj->is_oop(), "sanity check")

To reproduce the failure, just run the test like the following, 
e.g.:
    $JAVA_HOME/bin/javac runtime002.java
    $JAVA_HOME/bin/java_g -server runtime002

You may find sources for the runtime002 test at the testbase_nsk 
testsuite:
    /net/sqesvr.sfbay/export/vsn/VM/testbase/testbase_nsk
subdirectory:
    src/nsk/coverage/runtime/runtime002

======================================================================

Comments
EVALUATION In the method "fun4" in the test program, the oop returned by the 4 dimension array allocation is not marked by the server compiler as an oop. The oop is held in a register across iterations of the inner loop, and, if a GC occurs inside the loop (such as during the 3 dimension array allocation), the oop may be moved. The subsequent iteration will dereference the bad oop, and in this case, causes a inadvertant deopt which coincidentally triggers the assert about the same bad oop. ###@###.### 2002-10-24
24-10-2002