JDK-6799458 : java -XX:HeapDumpPath= fubar produces segmentation fault
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 6u11
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: solaris_2.5.1
  • CPU: x86
  • Submitted: 2009-01-30
  • Updated: 2011-02-16
  • Resolved: 2009-02-02
Related Reports
Duplicate :  
Description
FULL PRODUCT VERSION :
java version "1.6.0_11"
Java(TM) SE Runtime Environment (build 1.6.0_11-b03)
Java HotSpot(TM) Client VM (build 11.0-b16, mixed mode, sharing)


ADDITIONAL OS VERSION INFORMATION :
Linux baez.mi.oa-brera.inaf.it 2.6.18-92.el5 #1 SMP Tue Apr 29 13:16:12 EDT 2008 i686 i686 i386 GNU/Linux


A DESCRIPTION OF THE PROBLEM :
The command

java -XX:HeapDumpPath=  fubar

(note the blank value for HeapDumpPath)

produces a segmentation fault immediately. It would be a lot better if the JVM issued an error message complaining about the missing value.

The segfault does *not* occur for JDK 1.6.0._07, which reports

Exception in thread "main" java.lang.NoClassDefFoundError: fubar

as it should. Even here, however, there is no complaint about the missing value for HeapDumpPath.


STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
java -XX:HeapDumpPath=  fubar

(or any class you prefer instead of the undefined "fubar")

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
"Error: missing value for argument XX:HeapDumpPath" or something similar.
ACTUAL -
Segmentation fault (core dumped)

ERROR MESSAGES/STACK TRACES THAT OCCUR :
Segmentation fault (core dumped)

REPRODUCIBILITY :
This bug can be reproduced always.

Release Regression From : 5.0u17
The above release value was the last known release where this 
bug was not reproducible. Since then there has been a regression.

Release Regression From : 5.0u17
The above release value was the last known release where this 
bug was not reproducible. Since then there has been a regression.

Comments
EVALUATION The fix for 6744783 was integrated in HSX-14-B06: % /java/re/jdk/1.7.0/promoted/all/b39/binaries/solaris-i586/bin/java -showversion -XX:HeapDumpPath= fubar java version "1.7.0-ea" Java(TM) SE Runtime Environment (build 1.7.0-ea-b39) Java HotSpot(TM) Server VM (build 14.0-b06, mixed mode) Error: Could not find main class fubar Exception in thread "main" java.lang.NoClassDefFoundError: fubar at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:193)Caused by: java.lang.ClassNotFoundException: fubar at java.net.URLClassLoader$1.run(URLClassLoader.java:220) at java.net.URLClassLoader$1.run(URLClassLoader.java:209) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:208) at java.lang.ClassLoader.loadClass(ClassLoader.java:325) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294) at java.lang.ClassLoader.loadClass(ClassLoader.java:270) at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:190) and here are the results for HSX-14-B05: % /java/re/jdk/1.7.0/promoted/all/b38/binaries/solaris-i586/bin/java -showversion -XX:HeapDumpPath= fubar Segmentation Fault (core dumped) While there are other changes between HSX-14-B05 and HSX-14-B06, I believe that the fix for 6744783 solved this problem. I'm planning to close this bug as a duplicate of 6744783 after I check with the submitter.
30-01-2009