Mantis Bugtracker
  

Viewing Issue Advanced Details Jump to Notes ] View Simple ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0006349 [Resin] minor always 05-27-20 12:49 06-11-20 13:57
Reporter stbu View Status public  
Assigned To ferg
Priority normal Resolution fixed Platform
Status closed   OS
Projection none   OS Version
ETA none Fixed in Version 4.0.65 Product Version 4.0.64
  Product Build
Summary 0006349: MultipartFormParser: Unable to upload file > 2147483647 Bytes
Description In com.caucho.server.http.MultipartFormParser line 107 "totalLength" is of type "int".
Later on this variable is increased in the while loop when writing the TempFile in WEB-INF/work/form while the upload is ongoing.

In line 123 the variable "fileLength" of type "long" is assigned tempFile.getLength();

Finally the else if condition (fileLength != totalLength) is true, because if the uploaded file size is larger than Integer.MAX_VALUE then this exception is thrown but 'possibly due to full disk' is definitely not the case.

[20-05-27 21:29:56.093] {resin-port-8080-39} /test/file-upload: multipart form upload failed (possibly due to full disk).
[20-05-27 21:29:57.206] {resin-port-8080-39} java.io.IOException: multipart form upload failed (possibly due to full disk).
   at com.caucho.server.http.MultipartFormParser.formError(MultipartFormParser.java:218)
   at com.caucho.server.http.MultipartFormParser.parsePostData(MultipartFormParser.java:145)
   at com.caucho.server.http.AbstractCauchoRequest.parsePostQueryImpl(AbstractCauchoRequest.java:474)
   at com.caucho.server.http.AbstractCauchoRequest.parseQueryImpl(AbstractCauchoRequest.java:307)
   at com.caucho.server.http.AbstractCauchoRequest.getParts(AbstractCauchoRequest.java:258)

Note: My upload-servlet is configured to allow much larger uploads and requests sizes:
    <multipart-config>
      <location>/</location>
      <max-file-size>10485760000B</max-file-size>
      <max-request-size>10485760000B</max-request-size>
    </multipart-config>

Steps To Reproduce
Additional Information To reproduce the issue I have created two files:

# Integer.MAX_VALUE
fallocate -l 2147483647 2147483647.txt

# Exceeding Integer.MAX_VALUE
fallocate -l 2147483648 2147483648.txt

I was able to upload 2147483647.txt, but it fails at 2147483648.txt

Attached Files

- Relationships

There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
05-27-20 12:49 stbu New Issue
05-27-20 12:49 stbu Issue Monitored: stbu
06-11-20 13:57 ferg Assigned To  => ferg
06-11-20 13:57 ferg Status new => closed
06-11-20 13:57 ferg Resolution open => fixed
06-11-20 13:57 ferg Fixed in Version  => 4.0.65


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
28 total queries executed.
25 unique queries executed.
Powered by Mantis Bugtracker