Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible System.IndexOutOfRangeException in AppenderSkeleton.Finalize() #134

Closed
NicoCV opened this issue Mar 28, 2024 · 3 comments
Closed
Assignees
Milestone

Comments

@NicoCV
Copy link

NicoCV commented Mar 28, 2024

We're using Log4Net (2.0.15.0-.NET 4.5) in WCF services hosted in IIS. On our production environments from time to times we're experiencing crash of the application pool with following error:

Exception: System.IndexOutOfRangeException

Message: Index was outside the bounds of the array.

StackTrace: at System.Collections.ArrayList.Add(Object value)
at log4net.Util.LogReceivedEventHandler.Invoke(Object source, LogReceivedEventArgs e)
at log4net.Util.LogLog.OnLogReceived(Type source, String prefix, String message, Exception exception)
at log4net.Util.LogLog.Debug(Type source, String message)
at log4net.Appender.AppenderSkeleton.Finalize()

So it seems the LogLog.Debug statement in the finalize method can fail in some circumstances...

@FreeAndNil
Copy link
Contributor

@NicoCV can you test the code change from #135?

@NicoCV
Copy link
Author

NicoCV commented Mar 28, 2024

@FreeAndNil : First of all thanks for the really quick reaction and action! Unfortunatly it won't be possible for us to really test this. We've only seen this on production, and have not been able to simulate this on a non-production environment.

And we don't want to put an 'unofficial' version of the library on production.

@FreeAndNil
Copy link
Contributor

@NicoCV I understand.
The official release for this issue will be 3.0.0 expected in 2 months.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants