Uploaded image for project: 'Undertow'
  1. Undertow
  2. UNDERTOW-1474

Undertow multi-part upload can potentially leak file descriptors

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 2.0.17.Final, 1.4.18.SP12
    • 2.0.16.Final
    • Core
    • None

    Description

      Multiple users have reported that WildFly (13.x and even latest released 15.0.0) version leaks file handles to files that look like:

      /opt/wildfly-15.0.0.Final/standalone/tmp/digital-archive.war/undertow449317228871190919upload (deleted)
      

      A brief look at the Undertow code and many different manual upload tests, shows that there is (at least one) code path that can lead to such leaks. A specific manual test does reproduce this leak in

      io.undertow.server.handlers.form.FormData.FileItem#write

      where if a call to Files.move(...) fails for whatever reason, a Files.copy is attempted and while doing so a

      InputStream

      is opened but never closed.

      The forum reference has more details but it hasn't yet been narrowed down to some reproducible example.

      Attachments

        Issue Links

          Activity

            People

              sdouglas1@redhat.com Stuart Douglas
              jaikiran Jaikiran Pai (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: