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

while shutdown IBM liberty with dubbo and log4j2(Async); log4j2 cause OOME

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 2.9.1
    • Fix Version/s: None
    • Component/s: Appenders, Configurators
    • Labels:
      None
    • Environment:

      SUSE Linux Enterprise Server 11 PS4;
      CPU 4core 64-bit;
      IBM liberty-16.0.0.3
      IBM J9VM JRE 1.8.0

      Description

      I set properties Log4jContextSelector=org.apache.logging.log4j.core.async.AsyncLoggerContextSelector to make all logging async; it works quite well while my app is up which is running on liberty.

      when I try to shut it down with liberty's stop command. Log4j cannot stop normally, it looks like that its AsyncLoggerDisruptor.stop(at line 152) method want to load class DiscardingAsyncQueueFullPolicy, but the ClassLoader cannot be found, so system begin to throws NPE; at the same time log4j cannot write any more message, as it cannot get logger any more as system is shutting down. so log4j began to thow exception eventually it cause OOME.

      I guess it's async logger issue. so I remove the Log4jContextSelector properties and try. it works. I will try sync logger and async appender later.

        Attachments

        1. IMG_0291.HEIC
          1.49 MB
          henrydlwang
        2. IMG_0290.HEIC
          1005 kB
          henrydlwang
        3. IMG_0288.HEIC
          1.51 MB
          henrydlwang

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              henrydlwang henrydlwang
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: