[ 
https://issues.apache.org/jira/browse/LOG4J2-2388?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16551597#comment-16551597
 ] 

ASF GitHub Bot commented on LOG4J2-2388:
----------------------------------------

GitHub user failled opened a pull request:

    https://github.com/apache/logging-log4j2/pull/196

    Fix LOG4J2-2388 / Blocking thread when logging message in an interrup…

    …ted thread
    
    - Fix unfinite loop in 
org.apache.logging.log4j.flume.appender.FlumePersistentManager.send when the 
thread is interrupted (Note : The loop has been completely removed since it 
does not seems to serve any purpose)
    - Preserve Thread interruption status on InterruptedException
    - Add unit test for this case

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/failled/logging-log4j2 LOG4J2-2388

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/logging-log4j2/pull/196.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #196
    
----
commit c27a545e52cf68b5503801a50ec5efb13c460e3e
Author: failled <23032941+failled@...>
Date:   2018-07-21T09:26:57Z

    Fix LOG4J2-2388 / Blocking thread when logging message in an interrupted 
thread

----


> Thread undefinetly blocked when logging a message in an interrupted thread
> --------------------------------------------------------------------------
>
>                 Key: LOG4J2-2388
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-2388
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: Flume Appender
>            Reporter: Failled
>            Priority: Critical
>
> Logging a message to the Flume appender in an interrupted thread undefinetly 
> block the thread.
> The thread is blocked in an unfinite loop here :
> org.apache.logging.log4j.flume.appender.FlumePersistentManager.*send*(Event) 
> : 
>  
> {code:java}
> boolean interrupted = false;
> int ieCount = 0;
> do {
>     try {
>         future.get();
>     } catch (final InterruptedException ie) {
>         interrupted = true;
>         ++ieCount;
>     }
> } while (interrupted && ieCount <= 1);
> {code}
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to