Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-8681

XWikiAttachmentContent on-disk file cache leak open file descriptors

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Blocker
    • 4.4.1
    • 4.4
    • Old Core
    • None
    • Unknown
    • n/a
    • n/a

    Description

      Steps to notice the descriptor increase:

      1) Start an wiki instance with some document containing more than one attachements
      2) On a terminal, monitor opened attachement-cache files with the following command line

      while :; do F=`lsof | grep attachment-cache | wc -l`; if [[ "$F" != "$OF" ]]; then echo `date` $F; OF=$F; fi; sleep 1; done
      

      3) Look at the attachments of a document with more than one attachment, and open one of them
      4) notice an increase of the opened descriptor by the number of attachment in the document, followed by a decrease of only one.

      I suspect the getNewFileItem() function called by the no-args constructor to be opening output streams that only get closed if some date goes in, which is not true, since setting the attachment content seems to create another FileItem.

      It does not seems to affect server using FS attachments.

      Attachments

        Issue Links

          Activity

            People

              calebjamesdelisle CalebJamesDeLisle
              softec Denis Gervalle
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: