[logback-dev] [JIRA] (LOGBACK-1358) why AsyncAppender worker thread don't catch the error and Exception

QOS.CH (JIRA) noreply-jira at qos.ch
Mon Dec 4 13:12:00 CET 2017

xiezhaoodong created LOGBACK-1358:

             Summary: why AsyncAppender worker thread don't catch the error and Exception
                 Key: LOGBACK-1358
                 URL: https://jira.qos.ch/browse/LOGBACK-1358
             Project: logback
          Issue Type: Bug
          Components: logback-core
    Affects Versions: 1.2.3
         Environment: linux X86_64


            Reporter: xiezhaoodong
            Assignee: Logback dev list
         Attachments: image-2017-12-04-20-09-02-754.png, image-2017-12-04-20-11-40-721.png

class Worker extends Thread {

    public void run() {
        AsyncAppenderBase<E> parent = AsyncAppenderBase.this;
        AppenderAttachableImpl<E> aai = parent.aai;

        while (parent.isStarted()) {
            try {
                E e = parent.blockingQueue.take();
            } catch (InterruptedException ie) {

        addInfo("Worker thread will flush remaining events before exiting. ");

        for (E e : parent.blockingQueue) {


There is a worker object in the object AsyncAppenderBase。


if run() method don't catch the exception and error,when OutOfMemory occurs。this thread will dead

like this:


OOM make the appender-worker  dead

when the blockingQueue(use ArrayBlockingQueue) is full,the "put" thead will hang forever!!!!


First of all, thank you for answering my doubts




This message was sent by Atlassian JIRA

More information about the logback-dev mailing list