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

FileSystemResource file descriptor leak

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 7.9.0
    • 8.0.0-M8, 7.10.0
    • wicket
    • 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

        1. frquickstart.zip
          46 kB
          Boris Goldowsky

        Activity

          People

            svenmeier Sven Meier
            boris@alum.mit.edu Boris Goldowsky
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: