You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@logging.apache.org by Vikas Mangla <Vi...@amdocs.com> on 2018/01/17 11:26:38 UTC

RE: Moving from Log4j 1.2 to Log4j 2.0 to handle concurrency/deadlocks/blocked threads issues.


From: Vikas Mangla
Sent: Wednesday, January 17, 2018 4:55 PM
To: 'log4j-dev@logging.apache.org' <lo...@logging.apache.org>
Subject: Moving from Log4j 1.2 to Log4j 2.0 to handle concurrency/deadlocks/blocked threads issues.

Hi Team,

The request here is to understand if moving from Log4j 1.2 to Log4j 2.0 version handles the concurrency/deadlocks/blocked threads we have on the appender.

Our application is using Log4j 1.2 version and at time, we have to deal with quite a such situations where under high concurrent loads, we have threads getting blocked on below:

"[STUCK] ExecuteThread: '225' for queue: 'weblogic.kernel.Default (self-tuning)'" daemon prio=10 tid=0x00002b65d850c800 nid=0x768b waiting for monitor entry [0x00002b65f46c4000]
   java.lang.Thread.State: BLOCKED (on object monitor)
        at org.apache.log4j.Category.callAppenders(Category.java:201)
        - waiting to lock <0x0000000700c46318> (a org.apache.log4j.Logger)
        at org.apache.log4j.Category.forcedLog(Category.java:388)
        at org.apache.log4j.Category.log(Category.java:835)
        at com.comverse.api.framework.log.LogUtil.writeLog(LogUtil.java:653)
        at com.comverse.api.framework.log.LogUtil.log(LogUtil.java:469)
        at com.comverse.api.framework.log.LogUtil.defensiveLog(LogUtil.java:865)




Appreciate your suggestion to move to Log4j 2.


Thanks,
Vikas Mangla
This message and the information contained herein is proprietary and confidential and subject to the Amdocs policy statement,

you may review at https://www.amdocs.com/about/email-disclaimer <https://www.amdocs.com/about/email-disclaimer>

Re: Moving from Log4j 1.2 to Log4j 2.0 to handle concurrency/deadlocks/blocked threads issues.

Posted by Apache <ra...@dslextreme.com>.
Log4j 2 does not lock when calling appenders so you will not have the deadlock you show. 

Ralph

> On Jan 17, 2018, at 4:28 AM, Vikas Mangla <Vi...@amdocs.com> wrote:
> 
>  
>  
> Just to update, the kind of deadlocks we observe in the application as attached.
>  
>  
>  
> From: Vikas Mangla 
> Sent: Wednesday, January 17, 2018 4:55 PM
> To: 'log4j-dev@logging.apache.org' <lo...@logging.apache.org>
> Subject: Moving from Log4j 1.2 to Log4j 2.0 to handle concurrency/deadlocks/blocked threads issues.
>  
> Hi Team,
>  
> The request here is to understand if moving from Log4j 1.2 to Log4j 2.0 version handles the concurrency/deadlocks/blocked threads we have on the appender.
>  
> Our application is using Log4j 1.2 version and at time, we have to deal with quite a such situations where under high concurrent loads, we have threads getting blocked on below:
>  
> "[STUCK] ExecuteThread: '225' for queue: 'weblogic.kernel.Default (self-tuning)'" daemon prio=10 tid=0x00002b65d850c800 nid=0x768b waiting for monitor entry [0x00002b65f46c4000]
>    java.lang.Thread.State: BLOCKED (on object monitor)
>         at org.apache.log4j.Category.callAppenders(Category.java:201)
>         - waiting to lock <0x0000000700c46318> (a org.apache.log4j.Logger)
>         at org.apache.log4j.Category.forcedLog(Category.java:388)
>         at org.apache.log4j.Category.log(Category.java:835)
>         at com.comverse.api.framework.log.LogUtil.writeLog(LogUtil.java:653)
>         at com.comverse.api.framework.log.LogUtil.log(LogUtil.java:469)
>         at com.comverse.api.framework.log.LogUtil.defensiveLog(LogUtil.java:865)
>  
>  
>  
>  
> Appreciate your suggestion to move to Log4j 2.
>  
>  
> Thanks,
> Vikas Mangla
> This message and the information contained herein is proprietary and confidential and subject to the Amdocs policy statement,
> you may review at https://www.amdocs.com/about/email-disclaimer
> <mime-attachment>

RE: Moving from Log4j 1.2 to Log4j 2.0 to handle concurrency/deadlocks/blocked threads issues.

Posted by Vikas Mangla <Vi...@amdocs.com>.

Just to update, the kind of deadlocks we observe in the application as attached.



From: Vikas Mangla
Sent: Wednesday, January 17, 2018 4:55 PM
To: 'log4j-dev@logging.apache.org' <lo...@logging.apache.org>>
Subject: Moving from Log4j 1.2 to Log4j 2.0 to handle concurrency/deadlocks/blocked threads issues.

Hi Team,

The request here is to understand if moving from Log4j 1.2 to Log4j 2.0 version handles the concurrency/deadlocks/blocked threads we have on the appender.

Our application is using Log4j 1.2 version and at time, we have to deal with quite a such situations where under high concurrent loads, we have threads getting blocked on below:

"[STUCK] ExecuteThread: '225' for queue: 'weblogic.kernel.Default (self-tuning)'" daemon prio=10 tid=0x00002b65d850c800 nid=0x768b waiting for monitor entry [0x00002b65f46c4000]
   java.lang.Thread.State: BLOCKED (on object monitor)
        at org.apache.log4j.Category.callAppenders(Category.java:201)
        - waiting to lock <0x0000000700c46318> (a org.apache.log4j.Logger)
        at org.apache.log4j.Category.forcedLog(Category.java:388)
        at org.apache.log4j.Category.log(Category.java:835)
        at com.comverse.api.framework.log.LogUtil.writeLog(LogUtil.java:653)
        at com.comverse.api.framework.log.LogUtil.log(LogUtil.java:469)
        at com.comverse.api.framework.log.LogUtil.defensiveLog(LogUtil.java:865)




Appreciate your suggestion to move to Log4j 2.


Thanks,
Vikas Mangla
This message and the information contained herein is proprietary and confidential and subject to the Amdocs policy statement,

you may review at https://www.amdocs.com/about/email-disclaimer <https://www.amdocs.com/about/email-disclaimer>