Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6290872

Accepting 'space' as a file name in HeapDumpFile<file> option.

XMLWordPrintable

    • sparc
    • generic

      The new VM option for Out Of Memory Error 'HeapDumpFile' which helps name the heap dump file which is created with 'HeapDumpOnOutOfMemoryError' is accepting "space" as a file name.

      <output>

      bash-2.05$ which java
      /net/vmsqe.sfbay/export/nightly/tiger/JDK/service_hs_baseline/jdk1.6/solaris-sparc/bin/java
      bash-2.05$ java -XX:HeapDumpFile=" " -XX:OnOutOfMemoryError="" -Xmx6m -Xms6m -XX:+HeapDumpOnOutOfMemoryError InnerClassOOME
      VM option 'HeapDumpFile= '
      VM option 'OnOutOfMemoryError='
      VM option '+HeapDumpOnOutOfMemoryError'
      java.lang.OutOfMemoryError: Java heap space
      Dumping heap to ...
      Heap dump file created [6568350 bytes in 0.684 secs]
      #
      # java.lang.OutOfMemoryError: Java heap space
      # -XX:OnOutOfMemoryError=""
      The stack according to printStackTrace():
      java.lang.OutOfMemoryError: Java heap space
              at InnerClassOOME$InnerKlazz.<init>(InnerClassOOME.java:30)
              at InnerClassOOME.main(InnerClassOOME.java:20)

      bash-2.05$ ls -l
      total 38562
      -rw------- 1 bk150999 staff 6568176 Jun 24 00:58 ---> This is I am refering; file created with name space(" ")
      -rw------- 1 bk150999 staff 1005 Jun 24 01:01 hotspot.log
      -rw------- 1 bk150999 staff 137 May 27 10:13 InnerClassOOME.cfg
      -rw------- 1 bk150999 staff 620 Jun 24 00:45 InnerClassOOME.class
      -rw------- 1 bk150999 staff 1864 Jun 24 00:45 InnerClassOOME$InnerKlazz.class
      -rw------- 1 bk150999 staff 2235 Jun 9 01:02 InnerClassOOME.java
      -rw------- 1 bk150999 staff 734 May 27 08:23 InnerClassOOME.README
      -rw------- 1 bk150999 staff 6568176 Jun 24 01:01 java_pid22049.hprof
      -rw------- 1 bk150999 staff 6568176 Jun 24 00:47 my.hprof.file

      </output>
      ###@###.### 2005-06-27 04:10:52 GMT

      When -XX:HeapDumpFile is specified more than once then dump file created with new line character ("\n") seperating them.

      <Command>
      bash:$> java -XX:HeapDumpFile="file1.hprof.dump" -XX:+HeapDumpOnOutOfMemoryError -Xmx -Xms -XX:HeapDumpFile="file2.hprof.dump" InnerClassOOME
      VM option '+HeapDumpOnOutOfMemoryError'
      VM option 'HeapDumpFile=file1.hprof'
      VM option 'HeapDumpFile=file2.hprof'
      java.lang.OutOfMemoryError: Java heap space
      Dumping heap to file1.hprof
      file2.hprof ...
      Heap dump file created [6568557 bytes in 0.657 secs]
      The stack according to printStackTrace():
      java.lang.OutOfMemoryError: Java heap space
              at InnerClassOOME$InnerKlazz.<init>(InnerClassOOME.java:30)
              at InnerClassOOME.main(InnerClassOOME.java:20)
      </Command>

      Upon executing the above command dump file created as "file1.hprof \n file2.hprof" name.

      ###@###.### 2005-06-28 14:12:29 GMT

            Unassigned Unassigned
            bkondepusunw Bala Kondepudi (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: