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

Thorsten Schöning commented on LOGCXX-501:
------------------------------------------

I'm not aware of such an issue and suggest that you are trying to use a current 
master and try to reproduce the problem with that. In cases like yours I always 
use Process Monitor as well to have a look at who access which files of 
interest how, but this would need to run already and monitor the time at which 
the problem actually occurs. Else Process Monitor might be an alternative when 
you recognized the problem as well, because one can find for handles to open 
files in that easily and see which process keeps files open. Your description 
reads like someone simply deleted the files, but still holds some handles on 
its own open, so that you were able to still see, but not access the files 
anymore. This could be any other process in theory.

https://docs.microsoft.com/en-us/sysinternals/downloads/sysinternals-suite

Additionally, at least provide your exact configuration in use for further 
reference, so that we can see which triggering policy is used if at all etc. I 
found two headers named rollingfileappender and am somewhat confused currently 
which one actually is used in combination with which implementation when and 
who does actually delete files in the end. I guess its FixedWindowPolicy.

You could as well try to reduce the complexity of your setup by e.g. trying 
with only one old log file to kepp and very small log file sizes in general to 
see if rolling over and deleting old files works at all as expected.

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