logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 33278] NPE thrown durring daily log file rollover
Date Sat, 02 Aug 2008 22:02:25 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=33278





--- Comment #4 from Thorbjørn Ravn Andersen <thorbjoern@gmail.com>  2008-08-02 15:02:25
PST ---
So what happens is that two threads try to log, get in the subappend() block
and one starts changing the file logged to, gets interrupted and the other one
gets control with the file system in an inconsistent state?

The solution to make subappender synchronized sounds reasonable and the
overhead should be negletible.

When looking at the code, I wonder if the information in the files without
synchronization occasionally gets jumbled.  There is no effort to ensure that
the whole log chunk is written in one piece.

I suggest that subAppend() is made syncrhonized in WriteAppender,
DailyRollingFileAppender and RollingFileAppender.

Comments?


-- 
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


Mime
View raw message