JDK-6182602 : -Xshare:on causes error during initialization of VM
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 5.0
  • Priority: P3
  • Status: Closed
  • Resolution: Not an Issue
  • OS: linux
  • CPU: x86
  • Submitted: 2004-10-21
  • Updated: 2010-08-19
  • Resolved: 2005-09-15
Description
FULL PRODUCT VERSION :
java version "1.5.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)
Java HotSpot(TM) Client VM (build 1.5.0-b64, mixed mode)


ADDITIONAL OS VERSION INFORMATION :
Linux demolidor 2.6.9-mh1 #1 Wed Oct 20 18:47:23 BRST 2004 i686 unknown unknown GNU/Linux

EXTRA RELEVANT SYSTEM CONFIGURATION :
kernel 2.6.9 with bluetooth patch from holtmann.org/linux/kernel/patch-2.6.9-mh1.gz

A DESCRIPTION OF THE PROBLEM :
When executing J2SE 5 under linux kernel 2.6.9 with bluetooth patch applied,
with option -Xshare:on, results in the following error:

I don't think bluetooth patch has something related to the bug, because the I apply the patch since 2.4.x linux kernel series. And I tested J2SE 1.5 since the beta releases, and this problems didn't happend.

An error has occured while processing the shared archive file.
Unable to reserve shared region.
Error occurred during initialization of VM
Unable to use shared archive.

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
just use a kernel 2.6.9 and J2SE 5, then execute any java program with -Xshare:on option.

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
just run the JVM 5
ACTUAL -
run the application without jvm problems

ERROR MESSAGES/STACK TRACES THAT OCCUR :
An error has occured while processing the shared archive file.
Unable to reserve shared region.
Error occurred during initialization of VM
Unable to use shared archive.


REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
public class Hello {

    public static void main(String []s) {
        System.out.println("J2SE 5 and Linux kernel 2.6.9");
    }
}

---------- END SOURCE ----------

CUSTOMER SUBMITTED WORKAROUND :
put the -Xshare option off. Like -Xshare:off
###@###.### 10/21/04 16:37 GMT

Comments
EVALUATION For more info on class data sharing and its uses please see: http://java.sun.com/j2se/1.5.0/docs/guide/vm/class-data-sharing.html
19-09-2005

EVALUATION This is not a bug. -Xshare:on may cause any number of failures due to the inability to use the shared archive file. This is documented behavior.
15-09-2005

EVALUATION Appears this issue is addressed by running -Xshare:dump.. Will be closing this as not a bug soon.
15-09-2005

EVALUATION Did you run -Xshare:dump after installing the new kernel? The difference in mmap layout could make it impossible to install shared archive at its preferred location. If that's the case, use -Xshare:dump to regenerate shared archive after system upgrade. ###@###.### 10/22/04 17:51 GMT
22-10-2004