JDK-4902977 : CHROOT JDK 1.4.2-b28
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 1.4.2
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: linux
  • CPU: x86
  • Submitted: 2003-08-07
  • Updated: 2012-10-08
  • Resolved: 2003-11-15
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
1.4.2_04 04Fixed
Related Reports
Duplicate :  
Duplicate :  
Description

Name: rmT116609			Date: 08/07/2003


FULL PRODUCT VERSION :
java -version :
java version "1.4.2"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28)
Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode)

FULL OS VERSION :
RedHat 9 :
Linux exploite.cete33.equipement.gouv.fr 2.4.20-18.9 #1 Thu May 29 06:54:41 EDT 2003 i686 athlon i386 GNU/Linux

A DESCRIPTION OF THE PROBLEM :
When i want to chroot a java command i've got an error.

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
You must install a chroot environment in order to reproduce this bug :
copy /usr/java/j2sdk1.4.2 to /opt/chroot/www
use ldd on java and libjvm.so and copy required librairies to /opt/chroot/www
...

Type this command and you should have the above error :
/usr/sbin/chroot /opt/chroot/www/ /opt/Java142/bin/java

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Usage: java [-options] class [args...]
           (to execute a class)
   or  java -jar [-options] jarfile [args...]
           (to execute a jar file)jo1869


where options include:
    -client       to select the "client" VM
    -server       to select the "server" VM
    -hotspot      is a synonym for the "client" VM  [deprecated]
                  The default VM is client.

    -cp -classpath <directories and zip/jar files separated by :>
                  set search path for application classes and resources
    -D<name>=<value>
                  set a system property
    -verbose[:class|gc|jni]
                  enable verbose output
    -version      print product version and exit
    -showversion  print product version and continue
    -? -help      print this help message
    -X            print help on non-standard options
    -ea[:<packagename>...|:<classname>]
    -enableassertions[:<packagename>...|:<classname>]
                  enable assertions
    -da[:<packagename>...|:<classname>]
    -disableassertions[:<packagename>...|:<classname>]
                  disable assertions
    -esa | -enablesystemassertions
                  enable system assertions
    -dsa | -disablesystemassertions
                  disable system assertions
ACTUAL -
#
# HotSpot Virtual Machine Error, Internal Error
# Please report this error at
# http://java.sun.com/cgi-bin/bugreport.cgi
#
# Java VM: Java HotSpot(TM) Client VM (1.4.2-b28 mixed mode)
#
# Error ID: 4F533F4C494E55580E43505001C9
#

Heap at VM Abort:
Heap


****************
Another exception has been detected while we were handling last error.
Dumping information about last error:
ERROR REPORT FILE = (N/A)
PC                = 0x4043aa88
SIGNAL            = 11
FUNCTION NAME     = (N/A)
OFFSET            = 0xFFFFFFFF
LIBRARY NAME      = (N/A)
Please check ERROR REPORT FILE for further information, if there is any.
Good bye.

ERROR MESSAGES/STACK TRACES THAT OCCUR :
#
# HotSpot Virtual Machine Error, Internal Error
# Please report this error at
# http://java.sun.com/cgi-bin/bugreport.cgi
#
# Java VM: Java HotSpot(TM) Client VM (1.4.2-b28 mixed mode)
#
# Error ID: 4F533F4C494E55580E43505001C9
#

Heap at VM Abort:
Heap


****************
Another exception has been detected while we were handling last error.
Dumping information about last error:
ERROR REPORT FILE = (N/A)
PC                = 0x4043aa88
SIGNAL            = 11
FUNCTION NAME     = (N/A)
OFFSET            = 0xFFFFFFFF
LIBRARY NAME      = (N/A)
Please check ERROR REPORT FILE for further information, if there is any.
Good bye.

REPRODUCIBILITY :
This bug can be reproduced always.
(Incident Review ID: 189493) 
======================================================================

Name: jl125535			Date: 09/09/2003


One such Linux emulator that can display this behavior is the VASH shell utility for the VA Cluster Manager (http://sourceforge.net/projects/vacm).

It would be nice if there were a more precise error message.
(Review ID: 200431)
======================================================================

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: 1.4.2_04 FIXED IN: 1.4.2_04 INTEGRATED IN: 1.4.2_04
14-06-2004

EVALUATION chroot program doesn't have /proc, JVM died on assertion because it expects to find /proc/self/stat. This could also happen when JVM is running inside Linux emulator on BSD. This problem is already fixed in 1.5. Please see suggested fix for 1.4.2. ###@###.### 2003-08-27 This should be back ported...Already addressed in 1.5.0 JDK, Could JPSE team push this one to next update release. Re-assigning to JPSE team for pickup. ###@###.### 2003-09-19
19-09-2003

SUGGESTED FIX change line 457 in os_linux.cpp to: - if (fp == NULL) fatal("Can not open /proc/self/stat"); + if (fp) { add the following change around line 510: if (i != 28 - 2) { assert(false, "Bad conversion from /proc/self/stat"); // product mode - assume we are the initial thread and rlim is alloc'ed // within the 1st page of the stack. Good luck in the embedded case. warning("Can't detect initial thread stack location"); + stack_start = (uintptr_t) &rlim; + } + } else { + // For some reason we can't open /proc/self/stat (for example, running on + // FreeBSD with a Linux emulator), this should work for most cases, so + // don't abort: + warning("Can't detect initial thread stack location"); stack_start = (uintptr_t) &rlim; } ###@###.### 2003-08-27
27-08-2003