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

Intermittent exception or error message due to race condition when deleting a Part

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 1.3.0.CR1, 1.2.13.Final
    • 1.1.8.Final, 1.2.12.Final
    • Servlet
    • None
    • Hide

      The problem was originally reported against Spring Boot. I've attached a reproduction that simplifies things so that only Undertow is involved. I've been calling it using curl:

      curl -i localhost:8081?sleep=false -X POST -F test=@foo.txt
      
      curl -i localhost:8081?sleep=true -X POST -F test=@foo.txt
      

      If you POST a file with sleep=false it will intermittently log the error described below. If you POST a file with sleep=true it should pretty reliably sysout that it couldn't delete the part.

      Show
      The problem was originally reported against Spring Boot . I've attached a reproduction that simplifies things so that only Undertow is involved. I've been calling it using curl: curl -i localhost:8081?sleep=false -X POST -F test=@foo.txt curl -i localhost:8081?sleep=true -X POST -F test=@foo.txt If you POST a file with sleep=false it will intermittently log the error described below. If you POST a file with sleep=true it should pretty reliably sysout that it couldn't delete the part.

    Description

      There appears to be a race condition when deleting a multipart Part. If a servlet deletes a Part after flushing the response then the delete may throw an IOException or the work dispatched by MultiPartParserDefinition.close may log an error when it attempts to delete the file. The error is:

      Sep 16, 2015 9:19:15 AM io.undertow.server.handlers.form.MultiPartParserDefinition$MultiPartUploadHandler$1 run
      ERROR: UT005005: Cannot remove uploaded file /var/folders/zq/v6xkr2696kv05jbf3bddt9680000gn/T/undertow5316399978274106320upload
      

      Attachments

        Activity

          People

            sdouglas1@redhat.com Stuart Douglas
            ankinson Andy Wilkinson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: