[ 
https://issues.apache.org/jira/browse/LOGCXX-501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16717657#comment-16717657
 ] 

Harshad Savant commented on LOGCXX-501:
---------------------------------------

Thanks for the quick feedback. I saw the file lockup again today and I checked 
the file handle using Process Monitor. I found that our application was holding 
the handle. So It doesn't look like any other process is deleting the log files.

Interestingly, while the log file was in a locked state, I modified the log4cxx 
config xml and log file was recreated and I could access it for sometime, 
before it got locked again. 

We use xml::DOMConfigurator::configureAndWatch( "configure.log4cxx.xml", 5000); 
I have also attached a stripped down version of the config xml here. We use a 
{{SizeBasedTriggeringPolicy.}}

Unfortunately, currently I'm limited by the number of systems I can test this 
on. But I'll check the latest stable release and let you know if we can 
reproduce it. Since it happens very rarely, it will be a while before we can 
confirm that the new version does not exhibit the problem.

> Sometimes the log files get locked and then deleted after application restart
> -----------------------------------------------------------------------------
>
>                 Key: LOGCXX-501
>                 URL: https://issues.apache.org/jira/browse/LOGCXX-501
>             Project: Log4cxx
>          Issue Type: Bug
>    Affects Versions: 0.10.0
>            Reporter: Harshad Savant
>            Priority: Blocker
>         Attachments: configure.log4cxx.xml
>
>
> We are using log4cxx version 0.10.0 in one of our projects which runs on 
> windows 7 & 10.
> We have several different log files and use a RollingFileAppender to back-up 
> files based on size. 
> We found that on some rare occasions, suddenly all the log files created by 
> log4cxx get locked and can not be opened by any external editors like notepad 
> or notepad++. You can't copy the files or delete them and windows gives an 
> access denied error.
> Once we restart our application all the log files are deleted and the logger 
> starts with a new set of log files.
> At times this behavior is repeatable for multiple application restarts, but 
> at other occasions, a single application reboot solves the problem. The last 
> time we saw this problem, it was repeatable until we tried to enable the 
> log4cxx debug logging through the config xml and redirecting the stderr 
> output to a file. After that it wasn't reproducible anymore. 
>  
> Since this happens very rarely, its difficult for us to reproduce the error, 
> but when it happens it wipes out all the historical logs hence imperative 
> that we fix it.
> I want to know if this is a known issue and if there are any known conditions 
> which can cause this problem. Any hints on how to reproduce the issue would 
> be of great help. Let me know if you guys need any more info/details.
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to