[logback-dev] [JIRA] Updates for LOGBACK-1548: Race condition in the AsyncAppenderBase#Worker thread during shutdown
QOS.CH (JIRA)
noreply-jira at qos.ch
Wed Jan 13 03:23:00 CET 2021
logback / LOGBACK-1548 [Open]
Race condition in the AsyncAppenderBase#Worker thread during shutdown
==============================
Here's what changed in this issue in the last few minutes.
This issue has been created
This issue is now assigned to you.
View or comment on issue using this link
https://jira.qos.ch/browse/LOGBACK-1548
==============================
Issue created
------------------------------
Dmitry Kaukov created this issue on 13/Jan/21 3:11 AM
Summary: Race condition in the AsyncAppenderBase#Worker thread during shutdown
Issue Type: Bug
Affects Versions: 1.2.3
Assignee: Logback dev list
Components: logback-core
Created: 13/Jan/21 3:11 AM
Labels: AsyncAppender
Priority: Major
Reporter: Dmitry Kaukov
Description:
The AsyncAppenderBase#Worker thread may not clear interrupt flag here: [https://github.com/qos-ch/logback/blob/master/logback-core/src/main/java/ch/qos/logback/core/AsyncAppenderBase.java#L289] (when it exits loop by parent.isStarted() condition). As a result, in our projects it fails to properly flush queue and properly stop appenders.
This is what we can see in the logs:
{code}
13:06:59,188 |-INFO in ch.qos.logback.classic.AsyncAppender[ASYNC-KAFKA] - Worker thread will flush remaining events before exiting.
13:06:59,189 |-ERROR in com.opentable.logging.KafkaAppender[KAFKA] - Appender [KAFKA] failed to append. org.apache.kafka.common.errors.InterruptException: java.lang.InterruptedException
at org.apache.kafka.common.errors.InterruptException: java.lang.InterruptedException
at at org.apache.kafka.clients.producer.KafkaProducer.doSend(KafkaProducer.java:967)
at at org.apache.kafka.clients.producer.KafkaProducer.send(KafkaProducer.java:865)
at at org.apache.kafka.clients.producer.KafkaProducer.send(KafkaProducer.java:752)
at at com.opentable.logging.KafkaAppender.append(KafkaAppender.java:82)
at at com.opentable.logging.KafkaAppender.append(KafkaAppender.java:32)
at at ch.qos.logback.core.UnsynchronizedAppenderBase.doAppend(UnsynchronizedAppenderBase.java:84)
at at ch.qos.logback.core.spi.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:51)
at at ch.qos.logback.core.AsyncAppenderBase$Worker.run(AsyncAppenderBase.java:299)
{code}
==============================
This message was sent by Atlassian Jira (v8.8.0#808000-sha1:e2c7e59)
More information about the logback-dev
mailing list