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

Implement ExitOnOutOfMemory and CrashOnOutOfMemory in HotSpot

    Details

    • Subcomponent:
    • Resolved In Build:
      b99

      Backports

        Description

        Right now, we have a flag "OnOutOfMemoryError=..." You can do a lot of things with it, for example -XX:OnOutOfMemoryError='kill -9 %p' to generate a core file on OOM.

        However, exiting and generating core files are two common cases that you may want to use when debugging. Instead of relying on command line tools (which is also harder on Windows), I suggest we implement two special cases. These were present in JRockit, so I suggest we use the same syntax (see http://docs.oracle.com/cd/E15289_01/doc.40/e15062/optionxx.htm )

        There two options in JRockit were:

        ExitOnOutOfMemory
        When you enable this option, the JVM exits on the first occurrence of an out-of-memory error. It can be used if you prefer restarting an instance of the JVM rather than handling out of memory errors.

        CrashOnOutOfMemoryError
        If this option is enabled, when an out-of-memory error occurs, the JVM crashes and produces text and binary crash files.

          Issue Links

            Activity

            Hide
            hgupdate HG Updates added a comment -
            URL: http://hg.openjdk.java.net/jdk9/hs-rt/hotspot/rev/cbc2d5fbdae1
            User: kevinw
            Date: 2015-12-09 14:56:32 +0000
            Show
            hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk9/hs-rt/hotspot/rev/cbc2d5fbdae1 User: kevinw Date: 2015-12-09 14:56:32 +0000
            Hide
            hgupdate HG Updates added a comment -
            URL: http://hg.openjdk.java.net/jdk9/jdk9/hotspot/rev/cbc2d5fbdae1
            User: lana
            Date: 2015-12-23 23:04:20 +0000
            Show
            hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk9/jdk9/hotspot/rev/cbc2d5fbdae1 User: lana Date: 2015-12-23 23:04:20 +0000

              People

              • Assignee:
                csahu Cheleswer Sahu (Inactive)
                Reporter:
                mcastegr Mattis Castegren (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: