logging-log4net-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dominik Psenner (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (LOG4NET-293) IIS hangs using log4net with Global.asax initialization in Application_Start event
Date Wed, 05 Jun 2013 10:25:20 GMT

     [ https://issues.apache.org/jira/browse/LOG4NET-293?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Dominik Psenner resolved LOG4NET-293.
-------------------------------------

    Resolution: Cannot Reproduce

The above stack trace indicates that the following was the last invoke done by log4net:

Trace.WriteLine(message);

That invoke is nothing wrong and actually expected. The real question is: why did the WINAPI
invoke to OutputDebugStringA raise an application exception? And the next good question is:
why does that application exception hang?

The issue is not reproducable and therefore I resolve it. Feel free to reopen the issue if
you can reproduce it, but first try if a plain call to Trace.WriteLine() from your web application
does also cause IIS to hang. In that case there's probably something fishy with your IIS.
                
> IIS hangs using log4net with Global.asax initialization in Application_Start event
> ----------------------------------------------------------------------------------
>
>                 Key: LOG4NET-293
>                 URL: https://issues.apache.org/jira/browse/LOG4NET-293
>             Project: Log4net
>          Issue Type: Bug
>          Components: Appenders
>    Affects Versions: 1.2.10
>         Environment: Windows 2003 32bit
> IIS7
> .net framework 2
>            Reporter: Nicola Achille
>            Priority: Critical
>              Labels: Globa.asax, IIS, IIS7, application_pool, hang, w3wp.exe
>             Fix For: 1.2 Maintenance Release
>
>
> Hi there!
> I have an issue regarding log4net.
> log4net hangs the application pool process. Analysing dump files created from w3wp.exe
we can notice a bad behavior when it trys to write a new log file as you can see below:
> 0196e700 758102b8 kernel32!RaiseException(unsigned long dwExceptionCode = 0x40010006,
unsigned long dwExceptionFlags = 0, unsigned long nNumberOfArguments = 2, unsigned long *
lpArguments = 0x0196e728)+0x58
> 0196e96c 757dbe85 kernel32!OutputDebugStringA(char * lpOutputString = 0x01e75930 "log4net:WARN
RollingFileAppender: Cannot RollFile [C:\sites\waterfall2\logs\logfile.xlog.16266995] ->
[C:\sites\waterfall2\logs\logfile.xlog.20110620.16266995]. Source does not exist..")+0x285
> 0196e98c 018c11f6 kernel32!OutputDebugStringW(wchar_t * lpOutputString = 0x062aab8c "log4net:WARN
RollingFileAppender: Cannot RollFile [C:\sites\waterfall2\logs\logfile.xlog.16266995] ->
[C:\sites\waterfall2\logs\logfile.xlog.20110620.16266995]. Source does not exist..")+0x41
> 0196e9a8 701e02f2 CLRStub[StubLinkStub]@18c11f6(<Win32 error 0n318>)
> 0196ea74 1b59aaa8 log4net!log4net.Util.LogLog.EmitErrorLine(<HRESULT 0x80004001>)+0x28
> 0196ea7c 1b59aa58 log4net!log4net.Util.LogLog.Warn(<HRESULT 0x80004001>)+0x30
> 0196eab8 1b59a78d log4net!log4net.Appender.RollingFileAppender.RollFile(<HRESULT 0x80004001>)+0x210
> 0196eae4 1b59a4d9 log4net!log4net.Appender.RollingFileAppender.RollOverTime(<HRESULT
0x80004001>)+0x1cd
> 0196eb24 1b599aa4 log4net!log4net.Appender.RollingFileAppender.RollOverIfDateBoundaryCrossing(<HRESULT
0x80004001>)+0x279
> 0196eb5c 1b59914a log4net!log4net.Appender.RollingFileAppender.ExistingInit(<HRESULT
0x80004001>)+0x34
> 0196eb8c 1b5943fe log4net!log4net.Appender.RollingFileAppender.ActivateOptions(<HRESULT
0x80004001>)+0x1ea
> 0196ebcc 1b59407d log4net!log4net.Repository.Hierarchy.XmlHierarchyConfigurator.ParseAppender(<HRESULT
0x80004001>)+0x346
> 0196ec04 1b59389a log4net!log4net.Repository.Hierarchy.XmlHierarchyConfigurator.FindAppenderByReference(<HRESULT
0x80004001>)+0x18d
> 0196ec38 1b5934fe log4net!log4net.Repository.Hierarchy.XmlHierarchyConfigurator.ParseChildrenOfLoggerElement(<HRESULT
0x80004001>)+0xca
> 0196ec6c 1b593312 log4net!log4net.Repository.Hierarchy.XmlHierarchyConfigurator.ParseRoot(<HRESULT
0x80004001>)+0x46
> 0196eca8 1b592f4a log4net!log4net.Repository.Hierarchy.XmlHierarchyConfigurator.Configure(<HRESULT
0x80004001>)+0x352
> 0196ecbc 1b592f06 log4net!log4net.Repository.Hierarchy.Hierarchy.XmlRepositoryConfigure(<HRESULT
0x80004001>)+0x2a
> 0196ecd4 1b592ee4 log4net!log4net.Repository.Hierarchy.Hierarchy.log4net.Repository.IXmlRepositoryConfigurator.Configure(<HRESULT
0x80004001>)+0x6
> 0196ecd4 1b592cd7 log4net!log4net.Config.XmlConfigurator.ConfigureFromXml(<HRESULT
0x80004001>)+0xf4
> 0196ed04 1b5907f8 log4net!log4net.Config.XmlConfigurator.Configure(<HRESULT 0x80004001>)+0xb7
> 0196ed0c 1b5905a5 log4net!log4net.Config.XmlConfigurator.Configure(<HRESULT 0x80004001>)+0x18
> 0196ed1c 71e41b4c App_global_asax_vd_tcznb!ASP.global_asax.Application_Start(<HRESULT
0x80004001>)+0x5d
> and here you can find the config file:
> 		<appender name="RollingFile" type="log4net.Appender.RollingFileAppender">
> 			<!--<file value="c:\temp\webFile.xlog" />-->
> 			<file value="logs\\logfile.xlog" />
> 			<staticLogFileName value="true" />
> 			<appendToFile value="true" />
> 			<rollingStyle value="Composite" />
> 			<datePattern value=".yyyyMMdd" />
> 			<maximumFileSize value="5Mb" />
> 			<maxSizeRollBackups value="-1" />
> 			<layout type="log4net.Layout.XmlLayout">
> 				<locationInfo value="true" />
> 			</layout>
> 		</appender>
> In my site log4net was initialized in the following mode during at the Application_Start
event in the Global.asax:
>     void Application_Start(object sender, EventArgs e) 
>     {
>         log4net.Config.XmlConfigurator.Configure();
>     }
> Is there a way to fix it?
> Thanks!

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message