JDK-6341237 : JVM 1.4.2_08 crashes on RHL AS 3.0
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 1.4.2_08,7
  • Priority: P2
  • Status: Closed
  • Resolution: Won't Fix
  • OS: linux_redhat_3.0
  • CPU: x86
  • Submitted: 2005-10-25
  • Updated: 2014-02-27
  • Resolved: 2008-12-22
Related Reports
Duplicate :  
Relates :  
Relates :  
Description
VM Version: JVM1.4.2_08
OS: RedHat Linux 3.0 UR5

Customer is encountering VM core dump with the following stack trace:
#28 0xb71fccf4 in JavaCalls::call_helper () from
/usr/java/j2sdk1.4.2_08/jre/lib/i386/client/libjvm.so
#29 0xb72b273d in os::os_exception_wrapper () from
/usr/java/j2sdk1.4.2_08/jre/lib/i386/client/libjvm.so
#30 0xb71fcf46 in JavaCalls::call () from
/usr/java/j2sdk1.4.2_08/jre/lib/i386/client/libjvm.so
#31 0xb71fc816 in JavaCalls::call_virtual () from
/usr/java/j2sdk1.4.2_08/jre/lib/i386/client/libjvm.so
#32 0xb71fd38f in JavaCalls::call_virtual () from
/usr/java/j2sdk1.4.2_08/jre/lib/i386/client/libjvm.so
#33 0xb7257a95 in thread_entry () from
/usr/java/j2sdk1.4.2_08/jre/lib/i386/client/libjvm.so
#34 0xb72fd2ca in JavaThread::thread_main_inner () from
/usr/java/j2sdk1.4.2_08/jre/lib/i386/client/libjvm.so
#35 0xb72f8bc4 in JavaThread::run () from
/usr/java/j2sdk1.4.2_08/jre/lib/i386/client/libjvm.so
#36 0xb72b3e33 in _start () from
/usr/java/j2sdk1.4.2_08/jre/lib/i386/client/libjvm.so
#37 0xb75cade8 in start_thread () from /lib/tls/libpthread.so.0

Comments
WORK AROUND use the alt threadlib on linux by setting the flag LD_ASSUME_KERNEL=2.4.1
22-12-2008

EVALUATION It appears that the core we received from the _g crash is points to a known issue which has a quick solution. ... >> Linux defines NEED_DL_LOCK which causes a lock to >> be taken when we call dlopen. The problem that I'm seeing is that the >> call to sysThreadSelf always returns 0 because threads are not created >> with sysThreadAlloc and threadBootstrapMD is never called. >> sysThreadSelf needs tid_key to be created or -1 will be used. >> The result is that in debug mode I crash in the sysMonitorExit code below. >> The result in product mode is that we don't get the MP protection that >> we expect. ... >> Bob. >> >> >> void * >> sysLoadLibrary(const char *name, char *err_buf, int err_buflen) { >> void * result; >> >> #ifdef NEED_DL_LOCK >> sysMonitorEnter(sysThreadSelf(), &_dl_lock); >> result = dlopen(name, RTLD_NOW); >> sysMonitorExit(sysThreadSelf(), &_dl_lock); >> #else >> result = dlopen(name, RTLD_LAZY); >> #endif >> >> >> >> int >> sysMonitorExit(sys_thread_t *self, sys_mon_t *mid) >> { >> sysAssert(mid != SYS_MID_NULL); >> >> if (mid->monitor_owner == self) { >> sysAssert(mid->entry_count > 0); <<<<<<<<<<CRASH HERE >> if (--mid->entry_count == 0) { >> mid->monitor_owner = SYS_THREAD_NULL; >> if (!mid->contention_count || !profiler_on) { >> mutex_unlock(&mid->mutex); >> } else { >> mutex_unlock(&mid->mutex); >> VM_CALL(monitorContendedExit)(self, mid); >> } >> } >> return SYS_OK; >> } else { >> return SYS_ERR; >> } >> }
15-12-2005