logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominik Psenner <dpsen...@gmail.com>
Subject Re: Rolling File Operation : Failing with Source does not exist
Date Thu, 09 Mar 2017 09:27:39 GMT

Apologies, I've completely lost track of your question.

The preserveLogFileNameExtension := true should not cause any race 
condition, because the mutex lock introduced in 1.2.15 completely 
surrounds the method RollingFileAppender.AdjustFileBeforeAppend(). 
Further, given that it is a Mutex, it synchronizes both Threads and 
Processes that run on the same operating system. However, I've no idea 
whether preserveLogFileNameExtension := True breaks the detection of 
existing rolled files and maybe that is the actual source of your issue.

Please note that Stefan Bodewig and I agree that the existing 
RollingFileAppender implementation is broken in too many ways to fix it. 
Patching it further could finally break the few things it does well and 
therefore we avoid to patch it any further. We have plans to rewrite the 
RollingFileAppender from scratch [1] and the work I've done so far dates 
back to the late 2011 [2]. This is the thing we would like to tackle as 
soon as possible. The problem is that we lack the manpower to complete 
the job anytime soon. If you or your team would like to pick up the work 
and finish it, we would gladly assist you with all that we can do.


[1] https://issues.apache.org/jira/browse/LOG4NET-367

On 2017-03-08 14:43, Kinnar wrote:
> Hi Dominink,
> We had asked this query originally with regards to race condition observed
> in multi threaded windows service and you had provided solution to it as
> follows :
> "
> Hi again,
> based on the information that you have multiple processes running, I think
> that two processes decided to roll files at the same time. This probably has
> caused a race condition and that again caused the show to stop.
> The good news is that this scenario has been adressed in the latest log4net
> release (1.2.15) and for you this means that you could try to update log4net
> and see if the issue does no longer occur. Let us know what you try and what
> the outcome was.
> Cheers,
> Dominik
> "
> As per your response above, the solution which you had suggested will going
> to work only when there is a  race condition among multiple processes and
> not among multiple threads of the same process ? Please confirm.
> With addition to above confirmation, we are still looking for your reply on
> following :
> "whether setting "preserveLogFileNameExtension" configuration to True may
> lead log4net to race condition. "
> Let us know your feedback on this as soon as possible as we want to decide
> our further direction depending on this.
> Regards,
> Kinnar
> --
> View this message in context: http://apache-logging.6191.n7.nabble.com/Rolling-File-Operation-Failing-with-Source-does-not-exist-tp62802p74840.html
> Sent from the Log4net - Users mailing list archive at Nabble.com.

View raw message