Bug 54009

Summary: Thread is getting Blocked
Product: Log4j - Now in Jira Reporter: Chhabi <chhabilata>
Component: OtherAssignee: log4j-dev <log4j-dev>
Status: NEW ---    
Severity: critical    
Priority: P2    
Version: 1.2   
Target Milestone: ---   
Hardware: HP   
OS: AIX   

Description Chhabi 2012-10-16 01:32:32 UTC
Getting below stack trace in thread dump... Please help to provide the solution.


- waiting on <0x3757d3bb> (a org.apache.log4j.spi.RootLogger)
org.apache.log4j.Category.callAppenders(Category.java:47)
org.apache.log4j.Category.forcedLog(Category.java:121)
org.apache.log4j.Category.log(Category.java:349)


It is coming very frequently. We are using log4j 1.2.14

We are using DailyRollingFileAppender and SNMPTrapAppender ...

Please let me the root cause and resolution for the same.
Comment 1 Jacob Kjome 2012-10-16 04:31:49 UTC
There are known threading issues in Log4j-1.2.x.  That said, you aren't using the latest version.  That would be the first step.  If you continue to experience issues with Log4j-1.2.17, then post back here.

You might also want to look at the latest beta of Log4j2 [1], which was built, in part, to correct some of Log4j-1.2.x's fundamental threading issues that just can't be fixed in the 1.2.x codebase without modifying 1.2.x's architecture.


[1] http://logging.apache.org/log4j/2.x/
Comment 2 Chhabi 2012-10-16 10:33:51 UTC
Thanks Jacob. We are using Jboss EAP 5.1.1 and java version "1.6.0_27".
Will be it be a any issue while using Log4j-1.2.17?

Regards
Chhabi



(In reply to comment #1)
> There are known threading issues in Log4j-1.2.x.  That said, you aren't
> using the latest version.  That would be the first step.  If you continue to
> experience issues with Log4j-1.2.17, then post back here.

You might also
> want to look at the latest beta of Log4j2 [1], which was built, in part, to
> correct some of Log4j-1.2.x's fundamental threading issues that just can't
> be fixed in the 1.2.x codebase without modifying 1.2.x's architecture.


[1]
> http://logging.apache.org/log4j/2.x/
Comment 3 Gary Gregory 2012-10-16 11:06:33 UTC
What happens if you use the current version 1.2.17?
Comment 4 Chhabi 2012-10-17 12:05:55 UTC
My concern is in our product environment we are using Jboss EAP 5.1.1. IN Jboss EAP 5.1 ,log4j 1.2.14 comes  as default. So we are using that jar. 

If we move from log4j 1.2.14 to 1.2.17, what are the changes we require. Is our logger object blocked issue will resolve by using 1.2.17?



(In reply to comment #3)
> What happens if you use the current version 1.2.17?
Comment 5 grobmeier 2012-10-17 16:14:01 UTC
1.2.17 should be pretty much compatible to 1.2.14. For a full change report see:
http://logging.apache.org/log4j/1.2/changes-report.html