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

XWikiAttachmentContent on-disk file cache leak open file descriptors

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 4.4
    • Fix Version/s: 4.4.1
    • Component/s: Old Core
    • Labels:
      None
    • Difficulty:
      Unknown
    • Documentation:
      n/a
    • Documentation in Release Notes:
      n/a
    • Similar issues:

      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

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

                Dates

                • Created:
                  Updated:
                  Resolved: