Uploaded image for project: 'Log4j 2'
  1. Log4j 2
  2. LOG4J2-2415

Lock contention in classloader because of missing org.slf4j.ext.EventData

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.11.0
    • 2.13.1
    • SLF4J Bridge
    • None

    Description

      Recently I found one of lock contention and performance problem in our application.
      As you can see it happens because we don't have org.slf4j.ext.EventData class in classpath, but slf4j bridge tries to load it on every Logger creation.

      Class java.lang.ClassLoader.loadClass(java.lang.String, boolean)
         Class sun.misc.Launcher$AppClassLoader.loadClass(java.lang.String, boolean)
            Class java.lang.ClassLoader.loadClass(java.lang.String)
               Class org.apache.logging.log4j.util.LoaderUtil.loadClass(java.lang.String)
                  EventDataConverter org.apache.logging.slf4j.Log4jLogger.createConverter()
                     void org.apache.logging.slf4j.Log4jLogger.<init>(org.apache.logging.log4j.spi.ExtendedLogger, java.lang.String)
                        Logger org.apache.logging.slf4j.Log4jLoggerFactory.newLogger(java.lang.String, org.apache.logging.log4j.spi.LoggerContext)
                           Object org.apache.logging.slf4j.Log4jLoggerFactory.newLogger(java.lang.String, org.apache.logging.log4j.spi.LoggerContext)
                              Object org.apache.logging.log4j.spi.AbstractLoggerAdapter.getLogger(java.lang.String)
                                 Logger org.apache.logging.slf4j.Log4jLoggerFactory.getLogger(java.lang.String)
                                    Logger org.slf4j.LoggerFactory.getLogger(java.lang.String)
                                       void com.devexperts.dxcore.api.AccountGroupsCacheImpl.<init>()
      

      Attachments

        1. LOG4J2-2415.patch
          1 kB
          Richard Berlin
        2. screenshot-1.png
          142 kB
          Andrey Turbanov

        Issue Links

          Activity

            People

              Unassigned Unassigned
              turbanoff Andrey Turbanov
              Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 50m
                  50m