Log4j 2
  1. Log4j 2
  2. LOG4J2-322

Endless loop in ThrowableProxy.getCurrentStack

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 2.0-beta8
    • Fix Version/s: 2.0-beta9
    • Component/s: None
    • Labels:
      None
    • Environment:

      java version "1.7.0_25"
      OpenJDK Runtime Environment (IcedTea 2.3.10) (7u25-2.3.10-1ubuntu0.13.04.2)
      OpenJDK 64-Bit Server VM (build 23.7-b01, mixed mode)

      Description

      It seems that the getCallerClass method does not skip the frames correctly on OpenJDK, the ThrowableProxy falls into an endless loop which eventually lead to an OutOfMemoryError as it puts the same class into the stack over and over.

        Issue Links

          Activity

          Hide
          Nick Williams added a comment -

          Excellent! Good to hear.

          Show
          Nick Williams added a comment - Excellent! Good to hear.
          Hide
          Xavier Cho added a comment -

          Sorry for the late response. Just tested the trunk version and it works perfectly now. Thanks!

          Show
          Xavier Cho added a comment - Sorry for the late response. Just tested the trunk version and it works perfectly now. Thanks!
          Hide
          Nick Williams added a comment -

          This has been fixed with trunk. Could you download the latest from source control, compile it, and give it a try to see if it solves the problem for you? I'd really hate to release these changes to find out you still have the problem.

          Also, note that the changes I made are generally just a workaround for Oracle/OpenJDK 7u25. The getCallerClass behavior is supposed to be restored in 7u40, which comes out sometime mid-late September. In Java 8 it has been removed completely, but that was already compensated for.

          Show
          Nick Williams added a comment - This has been fixed with trunk. Could you download the latest from source control, compile it, and give it a try to see if it solves the problem for you? I'd really hate to release these changes to find out you still have the problem. Also, note that the changes I made are generally just a workaround for Oracle/OpenJDK 7u25. The getCallerClass behavior is supposed to be restored in 7u40, which comes out sometime mid-late September. In Java 8 it has been removed completely, but that was already compensated for.
          Hide
          Nick Williams added a comment - - edited

          Reflection#getCallerClass(int) changed as of Java 1.7.0_25 and Java 1.8. We are currently working on a fix and replacement. See http://mail.openjdk.java.net/pipermail/core-libs-dev/2013-July/019334.html, http://log4j.markmail.org/thread/uoowctmmm7mo4fkw, and http://log4j.markmail.org/thread/txcb456wupe35l6u.

          Show
          Nick Williams added a comment - - edited Reflection#getCallerClass(int) changed as of Java 1.7.0_25 and Java 1.8. We are currently working on a fix and replacement. See http://mail.openjdk.java.net/pipermail/core-libs-dev/2013-July/019334.html , http://log4j.markmail.org/thread/uoowctmmm7mo4fkw , and http://log4j.markmail.org/thread/txcb456wupe35l6u .

            People

            • Assignee:
              Nick Williams
              Reporter:
              Xavier Cho
            • Votes:
              3 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development