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

(thread) uncaught exception handler can be silenced by OutOfMemoryError

    Details

    • Type: Bug
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 5.0, 7, 9
    • Fix Version/s: tbd_minor
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • Understanding:
      Fix Understood
    • CPU:
      generic
    • OS:
      generic

      Description

      The attached program MemoryEater1 triggers multiple OutOfMemoryErrors and
      eventually exits due to OOME. However, no message about the exception is
      printed. The only indication an exception occurred is the non-zero exit
      status.

      $ $JAVA_HOME/bin/java -client -showversion -Xmx128m MemoryEater1
      java version "1.6.0-ea"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.6.0-ea-b58)
      Java HotSpot(TM) Client VM (build 1.6.0-ea-b58, mixed mode)
      $ echo $?
      1

      jdk1.5.0 behaves similarly.

      The 1.4.2 jdk at least printed a message indicating an exception
      occurred, although the message was incomplete (the type of the
      exception and newline were missing):

      $ $JAVA_HOME/bin/java -client -showversion -Xmx128m MemoryEater1
      java version "1.4.2_07"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_07-b05)
      Java HotSpot(TM) Client VM (build 1.4.2_07-b05, mixed mode)

      Exception in thread "main"$
      $ echo $?
      1

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                jcoomes John Coomes
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Imported:
                  Indexed: