JDK-4447270 : Linux: Java 1.3.1 RC1 hang on Redhat 7.1 FCS
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 1.3.1
  • Priority: P2
  • Status: Closed
  • Resolution: Duplicate
  • OS: linux
  • CPU: generic
  • Submitted: 2001-04-19
  • Updated: 2001-04-19
  • Resolved: 2001-04-19
Related Reports
Duplicate :  
Relates :  
Description
"java -version" hang on Redhat 7.1 FCS

hui.huang@Eng 2001-04-19

Comments
WORK AROUND setenv LD_ASSUME_KERNEL 2.2.5 ---------------------------------------
11-06-2004

EVALUATION In Redhat 7.1 FCS, it comes with two different set of libraries, for i386 and i686 Linux respectively. By default, the i686 version of pthread library is loaded with libjvm.so. Inside JVM, we detect pthread_getattr_np by dlopen("libpthread.so", RTLD_LAZY) and then dlsym("pthread_getattr_np"). Unfortunately, libpthread.so is a symbolic link in /usr/lib and points to the i386 version of pthread library. This dlopen() caused two different libpthread image being loaded at the same time. The result is glibc hang in pthread_create(). The problem of this dlopen() is already addressed in 4445172. For those who can't wait until RC2, because the cause of this hang is /usr/lib/libpthread.so does not necessarily point to the library that is really loaded by ld with libjvm.so, here are two possible workarounds: 1. "setenv LD_ASSUME_KERNEL 2.2.5" before running Java. This will cause /lib/libpthread.so.0 being loaded with Java. And we are OK as long as /usr/lib/libpthread.so is symbolic link to /lib/libpthread.so.0 2. If 1. is not the solution for those who want to use i686 libraries, they can do the other way round. That is, change /lib/libpthread.so to point to /lib/i686/libpthread.so.0: su root cd /usr/lib mv libpthread.so libpthread.so.orig ln -s /lib/i686/libpthread.so.0 libpthread.so Try either 1. or 2., java from RC1 will run OK. hui.huang@Eng 2001-04-19 ======================================== Please use this workaround: 1. su root 2. ln -sf /lib/i686/libpthread.so.0 /lib/i686/libpthread.so 3. /sbin/ldconfig hui.huang@Eng 2001-04-19
19-04-2001