Return-Path: X-Original-To: apmail-logging-log4net-dev-archive@www.apache.org Delivered-To: apmail-logging-log4net-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 42CEB18D35 for ; Tue, 15 Mar 2016 07:49:34 +0000 (UTC) Received: (qmail 89776 invoked by uid 500); 15 Mar 2016 07:49:34 -0000 Delivered-To: apmail-logging-log4net-dev-archive@logging.apache.org Received: (qmail 89659 invoked by uid 500); 15 Mar 2016 07:49:34 -0000 Mailing-List: contact log4net-dev-help@logging.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: "Log4NET Dev" List-Id: Delivered-To: mailing list log4net-dev@logging.apache.org Received: (qmail 89479 invoked by uid 99); 15 Mar 2016 07:49:33 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Mar 2016 07:49:33 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 82E1D2C1F60 for ; Tue, 15 Mar 2016 07:49:33 +0000 (UTC) Date: Tue, 15 Mar 2016 07:49:33 +0000 (UTC) From: "Dominik Psenner (JIRA)" To: log4net-dev@logging.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Assigned] (LOG4NET-506) RollingFileAppender locking log folder in some cases MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/LOG4NET-506?page=3Dcom.atlassi= an.jira.plugin.system.issuetabpanels:all-tabpanel ] Dominik Psenner reassigned LOG4NET-506: --------------------------------------- Assignee: Dominik Psenner > RollingFileAppender locking log folder in some cases > ---------------------------------------------------- > > Key: LOG4NET-506 > URL: https://issues.apache.org/jira/browse/LOG4NET-506 > Project: Log4net > Issue Type: Bug > Components: Appenders > Affects Versions: 1.2.15 > Environment: Windows Server 2008 R2, Windows Server 2012 R2 > Reporter: Fr=C3=A9d=C3=A9ric Delaporte > Assignee: Dominik Psenner > Priority: Minor > Attachments: AppAlone_log4net.txt, AppConcurrently_log4net.txt > > > *Abstract:* > In some configuration cases, the rolling file appender may issue a mutex = lock on the folder name. If more than one processes try to do that with dif= ferent executing identity, only one will be able to log to its specific log= s file. The others will no more be able to do it. > *Repro:* > Many applications run on the same server. > All run under different windows identity. > All do log through {{RollingFileAppender}} to D:\Logs\ (value of {{file}}= configuration node) to their own file log (filename specific to each appli= cation through {{datePattern}} configuration node, like {{yyyy.MM.dd'-App1.= log'}}, {{yyyy.MM.dd'-App2.log'}}, ...). > They log through {{AdoNetAppender}} too. > Since having upgraded Log4Net from 1.2.13 to 1.2.15 on some applications,= they cease being able to all log to D:\Logs\. Only one of them still do lo= g, depending on which have started first. SQL logs still work. Non upgraded= applications are still able to log to D:\Logs\, whatever their start order= have been. > *Diagnosis info:* > Activating log4net debug trace on an application, and comparing failure c= ases to working cases, yields following diff: > {code:title=3Dfailing case debug trace} > log4net:ERROR Could not create Appender [RollingLogFileAppender] of type = [log4net.Appender.RollingFileAppender]. Reported error follows. > System.UnauthorizedAccessException: Access to path 'D__Logs_' denied. (Tr= anslated from french) > =C3=A0 System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullP= ath) > =C3=A0 System.Threading.Mutex.MutexTryCodeHelper.MutexTryCode(Object u= serData) > =C3=A0 System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithG= uaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData) > =C3=A0=C2=A0 System.Threading.Mutex.CreateMutexWithGuaranteedCleanup(B= oolean initiallyOwned, String name, Boolean& createdNew, SECURITY_ATTRIBUTE= S secAttrs) > =C3=A0=C2=A0 System.Threading.Mutex..ctor(Boolean initiallyOwned, Stri= ng name, Boolean& createdNew, MutexSecurity mutexSecurity) > =C3=A0=C2=A0 System.Threading.Mutex..ctor(Boolean initiallyOwned, Stri= ng name, Boolean& createdNew) > =C3=A0=C2=A0 log4net.Appender.RollingFileAppender.ActivateOptions() > =C3=A0=C2=A0 log4net.Repository.Hierarchy.XmlHierarchyConfigurator.Par= seAppender(XmlElement appenderElement) > log4net:ERROR Appender named [RollingLogFileAppender] not found. > {code} > {code:title=3Dworking case corresponding trace} > log4net: Searched for existing files in [D:\Logs] > log4net: curSizeRollBackups starts at [0] > log4net: Opening file for writing [D:\Logs\2016.02.26-App1.log] append [T= rue] > log4net: Created Appender [RollingLogFileAppender] > log4net: Adding appender named [RollingLogFileAppender] to logger [root]. > {code} > (All other trace lines are identical) > {code:xml|title=3DApplication appender configuration} > > > > > > > > > > > > > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)