Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-6115

Transferable.transferTo can cause infinite loop or stack overflow

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.1
    • 3.0.3, 2.7.14, 3.1
    • None
    • None
    • Unknown

    Description

      When calling transferTo and the renameTo method returns false, the current alternative in the code is very likely to throw a StackOverflowError or cause the JVM to run out of file handles.

      Example stack trace:

      17:12:40,776 ERROR [com.redhat.gss.mtom.HashServer] (http-/127.0.0.1:8080-1) : java.io.IOException: Cached file was deleted, java.io.FileNotFoundException: /tmp/cxf-tmp-747794/cos2503467255223534504tmp (Too many open files)
      	at org.apache.cxf.io.CachedOutputStream.getInputStream(CachedOutputStream.java:546) [cxf-api-2.7.12.SP1-redhat-1.jar:2.7.12.SP1-redhat-1]
      	at org.apache.cxf.io.CachedOutputStream$TransferableFileInputStream.transferTo(CachedOutputStream.java:683) [cxf-api-2.7.12.SP1-redhat-1.jar:2.7.12.SP1-redhat-1]
      	at org.apache.cxf.helpers.IOUtils.transferTo(IOUtils.java:212) [cxf-api-2.7.12.SP1-redhat-1.jar:2.7.12.SP1-redhat-1]
      	at org.apache.cxf.io.CachedOutputStream$TransferableFileInputStream.transferTo(CachedOutputStream.java:683) [cxf-api-2.7.12.SP1-redhat-1.jar:2.7.12.SP1-redhat-1]
      	at org.apache.cxf.helpers.IOUtils.transferTo(IOUtils.java:212) [cxf-api-2.7.12.SP1-redhat-1.jar:2.7.12.SP1-redhat-1]
      	at org.apache.cxf.io.CachedOutputStream$TransferableFileInputStream.transferTo(CachedOutputStream.java:683) [cxf-api-2.7.12.SP1-redhat-1.jar:2.7.12.SP1-redhat-1]
      

      Attachments

        Issue Links

          Activity

            People

              sergey_beryozkin Sergey Beryozkin
              klape Kyle Lape
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: