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

Remko Popma edited comment on LOG4J2-1324 at 3/23/16 8:12 AM:
--------------------------------------------------------------

Oh darn, I did not realize that FatalExceptionHandler rethrows the exception... 
Hm, perhaps we should install IgnoreExceptionHandler as the default instead in 
Log4j.

If my understanding is correct using SleepingWaitStrategy would not solve this 
issue since the problem is not that wake-ups are missed, but instead that an 
uncaught (well, caught and rethrown) exception killed the consumer thread.

[~RonG] You can work around this issue by installing the 
IgnoreExceptionHandler: set system property 
{{AsyncLoggerConfig.ExceptionHandler}} to value 
{{com.lmax.disruptor.IgnoreExceptionHandler}}. Any exception will then be 
caught and logged to the java.util.Logger framework at INFO level. I would be 
interested to know what exception that was: perhaps this is something that 
needs to be handled in the appender...


was (Author: [email protected]):
Oh darn, I did not realize that FatalExceptionHandler rethrows the exception... 
Hm, perhaps we should install IgnoreExceptionHandler as the default instead in 
Log4j.

I don't think that SleepingWaitStrategy would solve this issue since the 
problem is not that wake-ups are missed, but instead that an uncaught (well, 
caught and rethrown) exception killed the consumer thread.

[~RonG] You can work around this issue by installing the 
IgnoreExceptionHandler: set system property 
{{AsyncLoggerConfig.ExceptionHandler}} to value 
{{com.lmax.disruptor.IgnoreExceptionHandler}}.

> Async Logger - Consumer thread dying - new thread unable to start
> -----------------------------------------------------------------
>
>                 Key: LOG4J2-1324
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-1324
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.2
>         Environment: LOG4J CORE Release Version 2.2
> Disruptor Bundle-Version 3.3.2
> ORACLE jdk1.8.0_45
>  Linux 2.6.32-573.el6.x86_64, amd64
>            Reporter: Ron Gonzalez
>         Attachments: 2016-03-18_17-44-06.jpg, 2016-03-22_8-32-37.jpg, 
> BatchEventProcessor.png, log4j2_config.xml
>
>
> We are seeing a situation where the consumer thread
> "AsyncLoggerConfig-1" is apparently dying.
> We do see a new consumer thread trying to start up, but it is blocked
> waiting for a lock, so no logging is happening.
> Is this a defect in log4j?
> Is the original consumer thread dying due to perhaps an unhandled exception ?
> Is that original consumer thread not terminating gracefully and
> releasing the locked object so the new consumer thread can start?
> Please see attached screenshot.  Top of screen is normal
> asyncloggerconfig thread (consumer).
> Bottom is thread trace when logging stops, we no longer see an
> "asyncloggerconfig-1" thread, instead a new thread is trying to start
> but never does "asyncloggerconfig-2".



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to