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 2014/01/11 15:29:47 UTC
[Bug 55987] New: Extras RollingFileAppender is hanging application
while rollover is running
https://issues.apache.org/bugzilla/show_bug.cgi?id=55987
Bug ID: 55987
Summary: Extras RollingFileAppender is hanging application
while rollover is running
Product: Log4j
Version: 1.2.17
Hardware: All
OS: All
Status: NEW
Severity: major
Priority: P2
Component: Appender
Assignee: log4j-dev@logging.apache.org
Reporter: temp@rafalsujak.com
org.apache.log4j.rolling.RollingFileAppender is hanging application while
rollover is running. This situation is noticable when the log file is very
large, e.g. application is freezing for about 5 minutes when the log file has
20GB data.
The problem is that the methods run() and close() in ActionBase
class(GZCompressAction and ZipComressAction inherit from it) are synchronized.
Rollover() in RollingFileAppender is executing for each append event and that
method checks if the action is still running. If yes, it calls close() on that
action but it will never happen because run and close are synchronized. So
application is freezing for time while the log file is rolling.
Here is a fragment from RollingFileAppender:
//
// block until complete
//
lastRolloverAsyncAction.close();
//
// or don't block and return to rollover later
//
//if (!lastRolloverAsyncAction.isComplete()) return false;
As we can see someone thought about it. If we comment close and uncomment
isComplete everything looks ok.
Might it make sense to change it in next version or whether this change will
cause other problems?
--
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