United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-4861809 VM crash when HeapDump requested
JDK-4861809 : VM crash when HeapDump requested

Details
Type:
Bug
Submit Date:
2003-05-09
Status:
Resolved
Updated Date:
2003-10-25
Project Name:
JDK
Resolved Date:
2003-09-15
Component:
vm-legacy
OS:
solaris_8,solaris_7,generic
Sub-Component:
jvmpi
CPU:
x86,sparc
Priority:
P4
Resolution:
Fixed
Affected Versions:
1.4.0,1.4.1,1.4.2
Fixed Versions:
1.4.2_02 (02)

Related Reports
Backport:
Relates:
Relates:

Sub Tasks

Description

Name: nt126004			Date: 05/09/2003


--------
Mantis: build 1.4.2-rc-b22
Platform: SunOS 5.7
XrunLIB: hprof:heap=all
VM: -server
VM_ARG: [ -Xint | -Xmixed | -Xcomp ]
Appl: SwingSet2
--------

Requesting heapdumps (ctrl-\) while running the SwingSet2 demo with the -Xrunhprof:heap=all library; the VM will core dump.

Here is the command line that I entered: 

"java -jar -server -Xint -Xrunhprof:heap=all $JAVA_HOME/demo/jfc/SwingSet2/SwingSet2.jar" 

Then start taking heap dumps (ctrl+\) immediately. From my testing, the VM crash will usually happen during the startup of the SwingSet2 app (sometimes before the SwingSet Splash screen is displayed).

Alternatively, you can also try substituting the '-Xint' with '-Xcomp' as well.

The occurance of this issue can be somewhat sporatic, but consistant enough log this bug.

Below is the output from the VM crash.

--------
Unexpected Signal : 10 occurred at PC=0xFE45F020
Function=[Unknown. Nearest: JVM_RaiseSignal+0x3EC34]
Library=/workroom/jsdk/solaris_sparc/sun/1.4.2/prerelease/jdk1.4.2_b22/jre/lib/sparc/server/libjvm.so


Dynamic libraries:
0x10000 	java
0xff350000 	/usr/lib/libthread.so.1
0xff390000 	/usr/lib/libdl.so.1
0xff200000 	/usr/lib/libc.so.1
0xff330000 	/usr/platform/SUNW,Ultra-60/lib/libc_psr.so.1
0xfe000000 	/workroom/jsdk/solaris_sparc/sun/1.4.2/prerelease/jdk1.4.2_b22/jre/lib/sparc/server/libjvm.so
0xff2d0000 	/usr/lib/libCrun.so.1
0xff1e0000 	/usr/lib/libsocket.so.1
0xff100000 	/usr/lib/libnsl.so.1
0xff0d0000 	/usr/lib/libm.so.1
0xff0b0000 	/usr/lib/libsched.so.1
0xff300000 	/usr/lib/libw.so.1
0xff090000 	/usr/lib/libmp.so.2
0xff060000 	/workroom/jsdk/solaris_sparc/sun/1.4.2/prerelease/jdk1.4.2_b22/jre/lib/sparc/native_threads/libhpi.so
0xfe7d0000 	/workroom/jsdk/solaris_sparc/sun/1.4.2/prerelease/jdk1.4.2_b22/jre/lib/sparc/libverify.so
0xfe790000 	/workroom/jsdk/solaris_sparc/sun/1.4.2/prerelease/jdk1.4.2_b22/jre/lib/sparc/libjava.so
0xff020000 	/workroom/jsdk/solaris_sparc/sun/1.4.2/prerelease/jdk1.4.2_b22/jre/lib/sparc/libzip.so
0xfdfa0000 	/workroom/jsdk/solaris_sparc/sun/1.4.2/prerelease/jdk1.4.2_b22/jre/lib/sparc/libhprof.so
0xf0c80000 	/workroom/jsdk/solaris_sparc/sun/1.4.2/prerelease/jdk1.4.2_b22/jre/lib/sparc/libawt.so
0xfdd80000 	/workroom/jsdk/solaris_sparc/sun/1.4.2/prerelease/jdk1.4.2_b22/jre/lib/sparc/libmlib_image.so
0xfc190000 	/workroom/jsdk/solaris_sparc/sun/1.4.2/prerelease/jdk1.4.2_b22/jre/lib/sparc/motif21/libmawt.so
0xf0a00000 	/usr/dt/lib/libXm.so.4
0xfb890000 	/usr/openwin/lib/libXt.so.4
0xfc3d0000 	/usr/openwin/lib/libXext.so.0
0xfde90000 	/usr/openwin/lib/libXtst.so.1
0xf0900000 	/usr/openwin/lib/libX11.so.4
0xfc2a0000 	/usr/openwin/lib/libdps.so.5
0xfc3a0000 	/usr/openwin/lib/libSM.so.6
0xfbbd0000 	/usr/openwin/lib/libICE.so.6
0xfbba0000 	/usr/openwin/lib/libdga.so.1
0xf0800000 	/workroom/jsdk/solaris_sparc/sun/1.4.2/prerelease/jdk1.4.2_b22/jre/lib/sparc/libfontmanager.so
0xfbab0000 	/workroom/jsdk/solaris_sparc/sun/1.4.2/prerelease/jdk1.4.2_b22/jre/lib/sparc/libjpeg.so

Heap at VM Abort:
Heap
 def new generation   total 2112K, used 2112K [0xf1400000, 0xf1620000, 0xf2950000)
  eden space 2048K, 100% used [0xf1400000, 0xf1600000, 0xf1600000)
  from space 64K, 100% used [0xf1600000, 0xf1610000, 0xf1610000)
  to   space 64K,   0% used [0xf1610000, 0xf1610000, 0xf1620000)
 tenured generation   total 1408K, used 1359K [0xf2950000, 0xf2ab0000, 0xf5400000)
   the space 1408K,  96% used [0xf2950000, 0xf2aa3fd0, 0xf2aa4000, 0xf2ab0000)
 compacting perm gen  total 16384K, used 3823K [0xf5400000, 0xf6400000, 0xf9400000)
   the space 16384K,  23% used [0xf5400000, 0xf57bbe08, 0xf57bc000, 0xf6400000)

Local Time = Thu May  8 13:02:15 2003
Elapsed Time = 32
#
# HotSpot Virtual Machine Error : 10
# Error ID : 4F530E43505002EF 01
# Please report this error at
# http://java.sun.com/cgi-bin/bugreport.cgi
#
# Java VM: Java HotSpot(TM) Server VM (1.4.2-rc-b22 interpreted mode)
#
(Review ID: 185452) 
======================================================================

                                    

Comments
EVALUATION

commit this bug to 1.4.2_02

###@###.### 2003-06-06

this problem seems to be in RootElementForFrame::add_root
allocate _roots array in resource area (although the
data of the array in c heap). this add_root is called
by some oops_do so i guess the sometimes the memory is freed after
the call is returned. i havent figured out which oops_do
actually free it but i think the safe way is to allocate
it on heap. 
 
###@###.### 2003-07-11
                                     
2003-07-11
SUGGESTED FIX

------- jvmpi.cpp -------
*** /tmp/sccs.yyaWXy    Fri Jul 11 12:24:55 2003
--- jvmpi.cpp   Fri Jul 11 12:13:19 2003
***************
*** 1909,1915 ****
    ~RootElementForFrame() {
      if (_roots != NULL) {
        _roots->clear_and_deallocate();
!       delete _roots;
      }
      if (_jni_local_roots != NULL) {
        _jni_local_roots->clear_and_deallocate();
--- 1909,1915 ----
    ~RootElementForFrame() {
      if (_roots != NULL) {
        _roots->clear_and_deallocate();
!       FreeHeap(_roots);
      }
      if (_jni_local_roots != NULL) {
        _jni_local_roots->clear_and_deallocate();
***************
*** 1937,1943 ****
    }
    void add_root(oop obj) {
      if (_roots == NULL) {
!       _roots = new GrowableArray<oop>(INIT_ROOTS_ARRAY_SIZE, true);
      }
      _roots->append(obj); 
    }
--- 1937,1943 ----
    }
    void add_root(oop obj) {
      if (_roots == NULL) {
!       _roots = new (ResourceObj::C_HEAP) GrowableArray<oop>(INIT_ROOTS_ARRAY_SIZE, true);
      }
      _roots->append(obj); 
    }

###@###.### 2003-07-11
                                     
2003-07-11
PUBLIC COMMENTS

.
                                     
2004-06-10
CONVERTED DATA

BugTraq+ Release Management Values

COMMIT TO FIX:
1.4.2_02
tiger-beta

FIXED IN:
1.4.2_02
tiger-beta

INTEGRATED IN:
1.4.2_02
tiger-b28
tiger-beta


                                     
2004-06-14



Hardware and Software, Engineered to Work Together