You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by bu...@apache.org on 2008/09/17 16:54:10 UTC

DO NOT REPLY [Bug 45825] New: lack of synchronization in ThrowableInformation

https://issues.apache.org/bugzilla/show_bug.cgi?id=45825

           Summary: lack of synchronization in ThrowableInformation
           Product: Log4j
           Version: 1.2
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: major
          Priority: P2
         Component: Other
        AssignedTo: log4j-dev@logging.apache.org
        ReportedBy: borysb@gmail.com


Log4j version 1.2.15.
Method getThrowableStrRep in org.apache.log4j.spi.ThrowableInformation should
be synchronized in some way. The variable rep can be read by one thread (for
example AsynsAppender) in line 72, while another is in line 91
(lines.toArray(rep)). This may cause rep to contain some nulls. It leads to
NullPointerException at java.io.Writer.write(Writer.java:140). Stacktrace:

java.lang.NullPointerException   
 at java.io.Writer.write(Writer.java:140)   
 at org.apache.log4j.helpers.QuietWriter.write(QuietWriter.java:48)   
 at org.apache.log4j.WriterAppender.subAppend(WriterAppender.java:309)   
 at org.apache.log4j.WriterAppender.append(WriterAppender.java:160)   
 at org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:251)   
 at
org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:66) 
 at org.apache.log4j.Category.callAppenders(Category.java:206)   
 at org.apache.log4j.Category.forcedLog(Category.java:391)   
 at org.apache.log4j.Category.info(Category.java:683)


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


DO NOT REPLY [Bug 45825] lack of synchronization in ThrowableInformation

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=45825


Curt Arnold <ca...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |DUPLICATE




--- Comment #1 from Curt Arnold <ca...@apache.org>  2008-09-17 09:12:17 PST ---


*** This bug has been marked as a duplicate of bug 44032 ***


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org