Skip to content

Multipart File upload: Sometimes receiving empty files! [SPR-15955] #20507

Closed
@spring-projects-issues

Description

@spring-projects-issues

Alexander Wilhelmer opened SPR-15955 and commented

On my example repo in branch "zero-bytes-files" i was able to reproduce a bug something to do with multipart file upload and the resulting transferTo method. I'm transferring files into temp files and i'm checking against zero byte files, so no data seems to be revceived on the netty server or its a bug in the synchronoss parser,

This test seems to be unfair, because it is starting 20 concurrent threads against the endpoint, but i was able to reproduce this bug on another setting, only with one thread and 100 iterations you are able to reproduce it. But you must host the first endpoint on a remote server. Some files will reproduce it more frequently, some files never. The concurrent threads force the test to reproduce it on localhost. You have to run the test min. five times, search for the first exception.

Tested with M3 (RC3) and SNAPSHOT(RC4) version from spring bootstrap, mainly on windows.

Exception:

2017-09-12 20:01:58.410 ERROR 10032 --- [ctor-http-nio-1] c.e.demo.controller.FileController       : Error!

java.lang.RuntimeException: Zero byte file!

I'm working on a temporary remote test to show the not-threaded reproduction.


Affects: 5.0 RC3, 5.0 RC4

Reference URL: https://github.com/awilhelmer/spring5-multipart-demo/tree/zero-bytes-files

Issue Links:

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)in: webIssues in web modules (web, webmvc, webflux, websocket)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions