linux jdk 1.4.2_12 may fail with Linux procfs mounted

Marcin Cieslak saper at SYSTEM.PL
Sun Sep 17 13:34:57 PDT 2006


I have just installed Linux JDK 1.4.2_12 to check for various incompatibities
(http://people.freebsd.org/~tjr/linux32.html) I noticed that according to 
comment to http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4881146:


In the short term, developers using this product [Rational ClearCase] can easily 
develop their own interposer library that will cause readlink of /proc/self/exe 
to fail. The java launcher does not require /proc to be present and will 
fallback to another mechanism when /proc is not present (chroot environments for 
example).


And running without /proc has been fixed according to 
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4881146.

java without /proc just issues warning message:

% /usr/local/linux-sun-jdk1.4.2/bin/java -jar 
/usr/local/linux-sun-jdk1.4.2/demo/jfc/Java2D/Java2Demo.jar
Java HotSpot(TM) Client VM warning: Can't detect initial thread stack location
<application runs happily>

but when /compat/linux/proc is mounted fails reading some values from 
/proc/self/stat on my machine:

% /usr/local/linux-sun-jdk1.4.2/bin/java -jar 
/usr/local/linux-sun-jdk1.4.2/demo/jfc/Java2D/Java2Demo.jar
Fatal: Stack size too small. Use 'java -Xss' to increase default stack size.

The fix should be relatively easy, probably implementing some more entries in 
the linprocfs_doprocstat() function.

Just in case somebody hits this problem...

-- 
               << Marcin Cieslak // saper at system.pl >>


More information about the freebsd-emulation mailing list