Uploaded image for project: 'Log4net'
  1. Log4net
  2. LOG4NET-671

LoggingEvent does not correctly dispose WindowsIdentity

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.0.10
    • 2.0.14
    • Core
    • None

    Description

      LoggingEvent uses the WindowsIdentity 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.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            jhindermann Jan Hindermann
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 10m
                10m

                Slack

                  Issue deployment