You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "Davyd McColl (Jira)" <ji...@apache.org> on 2021/12/16 08:09:00 UTC

[jira] [Resolved] (LOG4NET-671) LoggingEvent does not correctly dispose WindowsIdentity

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

Davyd McColl resolved LOG4NET-671.
----------------------------------
    Fix Version/s: 2.0.14
       Resolution: Fixed

PR is merged, should appear in 2.0.14 release

> LoggingEvent does not correctly dispose WindowsIdentity
> -------------------------------------------------------
>
>                 Key: LOG4NET-671
>                 URL: https://issues.apache.org/jira/browse/LOG4NET-671
>             Project: Log4net
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.0.10
>            Reporter: Jan Hindermann
>            Priority: Major
>             Fix For: 2.0.14
>
>         Attachments: Stacktrace.png, UndisposedHandles.png
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> LoggingEvent uses the [WindowsIdentity|https://docs.microsoft.com/en-us/dotnet/api/system.security.principal.windowsidentity?view=net-5.0] class to get the current user. After the required information is retrieved from the object, it is not disposed correctly, which means that it ends up in the finalizer queue (or rather, the handle objects that WindowsIdentity uses internally).
> During the runtime of a sufficiently large application, this can lead to the finalizer queue having to process several thousands of undisposed objects. As the CLR does not guarantee that the finalizer thread will run, the memory may fill up with leaked objects.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)