Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 6587066
Votes 0
Synopsis ~Thread() assert(last_handle_mark() == 0,"check we have reached the end")
Category hotspot:runtime_system
Reported Against
Release Fixed hs11(b06), 6u10(b09) (Bug ID:2172491) , 7(b20) (Bug ID:2177034)
State 10-Fix Delivered, bug
Priority: 4-Low
Related Bugs
Submit Date 30-JUL-2007
Description
Fastdebug VM throws the next assert when specified large page is not available
(memory is fragmented) and size of heap > 2g. 

% /java/re/jdk/7/latest/binaries/solaris-sparc/fastdebug/bin/java -XX:+UseLargePages -XX:LargePageSizeInBytes=256m -Xmx3g t
VM option '+UseLargePages'
VM option 'LargePageSizeInBytes=256m'
Error occurred during initialization of VM
Could not reserve enough space for  customer  heap
# To suppress the following error report, specify this argument
# after -XX: or in .hotspotrc:  SuppressErrorAt=/thread.cpp:209
#
# An unexpected error has been detected by Java Runtime Environment:
#
#  Internal Error (/BUILD_AREA/jdk7.0/hotspot/src/share/vm/runtime/thread.cpp:209), pid=157, tid=2
#  Error: assert(last_handle_mark() == 0,"check we have reached the end")
#
# Java VM: Java HotSpot(TM) Tiered VM (1.7.0-ea-fastdebug-b16-fastdebug mixed mode solaris-sparc)
# An error report file with more information is saved as:
# /export/home/kvn/refworkload/benchmarks/specjbb2005/hs_err_pid157.log
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
#

[error occurred during error reporting , id 0xe0000000]

% hs_err hs_err_pid157.log
# 
# An unexpected error has been detected by Java Runtime Environment: 
# 
#  Internal Error (/BUILD_AREA/jdk7.0/hotspot/src/share/vm/runtime/thread.cpp:209), pid=157, tid=2 
#  Error: assert(last_handle_mark() == 0,"check we have reached the end") 
# 
# Java VM: Java HotSpot(TM) Tiered VM (1.7.0-ea-fastdebug-b16-fastdebug mixed mode solaris-sparc) 
# If you would like to submit a bug report, please visit: 
#   http://java.sun.com/webapps/bugreport/crash.jsp 
# 
 
---------------  T H R E A D  --------------- 
 
Current thread (0x00047c00):  JavaThread "Unknown thread" [_thread_in_vm, id=2, stack(0xfcd00000,0xfcd80000)] 
 
Stack: [0xfcd00000,0xfcd80000],  sp=0xfcd7fa00,  free space=510k 
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) 
V  [libjvm.so+0x12668c4] void VMError::report_and_die() + 0x870
V  [libjvm.so+0x67114c] void report_assertion_failure(const char*,int,const char*) + 0x70
V  [libjvm.so+0x111610c] Thread::~Thread #Nvariant 1() + 0xb0
V  [libjvm.so+0x112d6a8] __SLIP.DELETER__A + 0xc
V  [libjvm.so+0x1127b64] int Threads::create_vm(JavaVMInitArgs*,bool*) + 0x358
V  [libjvm.so+0x94affc] JNI_CreateJavaVM + 0xe0
C  [java+0x3740] 
C  [java+0x1a28] 
 
 
---------------  P R O C E S S  --------------- 
 
Java Threads: ( => current thread ) 
 
Other Threads: 
 
=>0x00047c00 (exited) JavaThread "Unknown thread" [_thread_in_vm, id=2, stack(0xfcd00000,0xfcd80000)] 
 
VM state:not at safepoint (not fully initialized) 
 
VM Mutex/Monitor currently owned by a thread: None 
 
Dynamic libraries: 
0x00010000      /net/jre.sfbay/p/v12/jdk/7/ea/b16/binaries/solaris-sparc/fastdebug/bin/java 
0xff3ec000      /lib/libthread.so.1 
0xff380000      /net/jre.sfbay/p/v12/jdk/7/ea/b16/binaries/solaris-sparc/fastdebug/bin/../jre/lib/sparc/jli/libjli.so 
0xff350000      /lib/libdl.so.1 
0xff200000      /lib/libc.so.1 
0xff330000      /platform/SUNW,SPARC-Enterprise-T5120/lib/libc_psr.so.1 
0xfd000000      /net/jre.sfbay/p/v12/jdk/7/ea/b16/binaries/solaris-sparc/fastdebug/jre/lib/sparc/server/libjvm.so 
0xff1d0000      /lib/libsocket.so.1 
0xff320000      /usr/lib/libsched.so.1 
0xff1b0000      /lib/libm.so.1 
0xff180000      /usr/lib/libCrun.so.1 
0xff160000      /lib/libdoor.so.1 
0xfcf00000      /lib/libnsl.so.1 
0xfce00000      /lib/libm.so.2 
0xff130000      /lib/libscf.so.1 
0xff110000      /lib/libuutil.so.1 
0xff0e0000      /lib/libgen.so.1 
0xff0b0000      /lib/libmd.so.1 
0xfcfe0000      /platform/SUNW,SPARC-Enterprise-T5120/lib/libmd_psr.so.1 
0xfcfc0000      /lib/libmp.so.2 
0xfccd0000      /net/jre.sfbay/p/v12/jdk/7/ea/b16/binaries/solaris-sparc/fastdebug/jre/lib/sparc/native_threads/libhpi.so 
0xfcc90000      /net/jre.sfbay/p/v12/jdk/7/ea/b16/binaries/solaris-sparc/fastdebug/jre/lib/sparc/libverify.so 
0xfcc50000      /net/jre.sfbay/p/v12/jdk/7/ea/b16/binaries/solaris-sparc/fastdebug/jre/lib/sparc/libjava.so 
0xfcc20000      /net/jre.sfbay/p/v12/jdk/7/ea/b16/binaries/solaris-sparc/fastdebug/jre/lib/sparc/libzip.so 
 
VM Arguments: 
jvm_args: -XX:+UseLargePages -XX:LargePageSizeInBytes=256m -Xmx3g  
java_command: t 
Launcher Type: SUN_STANDARD 
 
Environment Variables: 
JAVA_HOME=/export/home/kvn/jdk7_b14 
PATH=./:/home/kvn/bin:/bin:/usr/j2se/bin:/usr/dt/bin:/usr/ccs/bin:/usr/ccs/lib:/usr/bin:/usr/lib:/usr/sbin:/usr/ucb:/usr/ucb/bin:/sbin:/etc:/usr/openwin/bin:/opt/SUNWspro/bin:/set/misc/local/bin:. 
LD_LIBRARY_PATH=/net/jre.sfbay/p/v12/jdk/7/ea/b16/binaries/solaris-sparc/fastdebug/jre/lib/sparc/server:/net/jre.sfbay/p/v12/jdk/7/ea/b16/binaries/solaris-sparc/fastdebug/jre/lib/sparc:/net/jre.sfbay/p/v12/jdk/7/ea/b16/binaries/solaris-sparc/fastdebug/jre/../lib/sparc:. 
SHELL=/bin/csh 
DISPLAY=jaberwocky:0 
 
Signal Handlers: 
SIGSEGV: [libjvm.so+0x1267ca8], sa_mask[0]=0xffbffeff, sa_flags=0x0000000c 
SIGBUS: [libjvm.so+0x1267ca8], sa_mask[0]=0xffbffeff, sa_flags=0x0000000c 
SIGFPE: [libjvm.so+0xeda154], sa_mask[0]=0xffbffeff, sa_flags=0x0000000c 
SIGPIPE: [libjvm.so+0xeda154], sa_mask[0]=0xffbffeff, sa_flags=0x0000000c 
SIGXFSZ: [libjvm.so+0xeda154], sa_mask[0]=0xffbffeff, sa_flags=0x0000000c 
SIGILL: [libjvm.so+0xeda154], sa_mask[0]=0xffbffeff, sa_flags=0x0000000c 
SIGUSR1: SIG_DFL, sa_mask[0]=0x00000000, sa_flags=0x00000000 
SIGUSR2: SIG_DFL, sa_mask[0]=0x00000000, sa_flags=0x00000000 
SIGQUIT: SIG_DFL, sa_mask[0]=0x00000000, sa_flags=0x00000000 
SIGHUP: SIG_DFL, sa_mask[0]=0x00000000, sa_flags=0x00000000 
SIGINT: SIG_DFL, sa_mask[0]=0x00000000, sa_flags=0x00000000 
SIGTERM: SIG_DFL, sa_mask[0]=0x00000000, sa_flags=0x00000000 
SIG39: [libjvm.so+0xeda174], sa_mask[0]=0x00000000, sa_flags=0x00000008 
SIG40: [libjvm.so+0xeda154], sa_mask[0]=0xffbffeff, sa_flags=0x0000000c 
 
 
---------------  S Y S T E M  --------------- 
 
OS:                       Solaris 10 7/07 s10s_u4wos_05a SPARC 
           Copyright 2007 Sun Microsystems, Inc.  All Rights Reserved. 
                        Use is subject to license terms. 
                             Assembled 18 April 2007 
 
uname:SunOS 5.10 Generic_Patch sun4v  (T2 libthread) 
rlimit: STACK 8192k, CORE 0k, NOFILE 65536, AS infinity 
load average:0.40 0.25 0.97 
 
CPU:total 64 has_v8, has_v9, has_vis1, is_sun4v, is_niagara1 
 
Memory: 8k page, physical 16769024k(14786256k free) 
 
vm_info: Java HotSpot(TM) Tiered VM (1.7.0-ea-fastdebug-b16-fastdebug) for solaris-sparc, built on Jul 20 2007 04:00:12 by "" with unknown Workshop:0x580 
 
time: Mon Jul 30 15:33:26 2007 
elapsed time: 0 seconds
Posted Date : 2007-07-30 22:43:53.0
Work Around
N/A
Evaluation
The root cause of this bug is the HandleMark allocated for this thread hasn't been deleted before the destructor of this thread is called. "init_globals" could fail and immediately after its failure, we delete the main thread which triggers the HandleMark check. 

The fix is to move the use of HandleMark to the right place which is inside the "init_globals" method so the destructor of HandleMark must be called when the method returns no matter whether it fails or not.
Posted Date : 2007-09-04 17:51:46.0
Comments
  
  Include a link with my name & email   


PLEASE NOTE: JDK6 is formerly known as Project Mustang