Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-6471

FileSystemResource file descriptor leak

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

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 7.9.0
    • Fix Version/s: 8.0.0-M8, 7.10.0
    • Component/s: wicket
    • Labels:
      None

      Description

      FileSystemResource does not appear to close the InputStream that it creates.

      I believe it should call setClose(true) on the PartWriterCallback.

      To verify the problem, see the attached quick start. Change the filename in HomePage.java to point to some valid image file on your system. After viewing the home page in a browser, check for files that the jetty process has open, eg:

      lsof -p PID | grep logo
      

      If you load the home page a few more times, using Shift-reload to avoid simply loading from cache, you can see many file descriptors pointing to the image file are kept open:

      java    87278 borisgoldowsky  txt      REG                1,4     12244 103583676 /Users/borisgoldowsky/idea/frquickstart/src/main/webapp/logo.png
      java    87278 borisgoldowsky  175r     REG                1,4     12244 103583676 /Users/borisgoldowsky/idea/frquickstart/src/main/webapp/logo.png
      java    87278 borisgoldowsky  180r     REG                1,4     12244 103583676 /Users/borisgoldowsky/idea/frquickstart/src/main/webapp/logo.png
      java    87278 borisgoldowsky  181r     REG                1,4     12244 103583676 /Users/borisgoldowsky/idea/frquickstart/src/main/webapp/logo.png
      

        Attachments

          Activity

            People

            • Assignee:
              svenmeier Sven Meier
              Reporter:
              boris@alum.mit.edu Boris Goldowsky

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment