New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IllegalStateException handling multi-part form files #1758
Comments
After investigation the issue is not related to delete files using the reproducer with delete files as true or false renders the same behaviour. Also from the stack trace it shows that the exception is being bubbled up from the core. |
Hello, Thank you in advance I hope you would find the solution. |
Hi Sometimes I have the same issue when uploading files. Usually it happens in tests and i don't know how to reproduce it. But succeed to catch it once. May be this will help to investigate this issue: This is a call-stack that I see when everything is OK |
I've done a fix for Vert.x core here #1770 that fixes the reproducer provided by @woollybah |
I'm closing this issue, please confirm with fix #1770 , if there is still an issue, reopen this one. |
marked as invalid as fixed in another issue |
@woollybah commented on Tue Oct 18 2016
We have a client that posts a multi-part form containing 3 file attachments to our Linux vert.x 3.3.3 HTTPServer.
The client uses keep-alive to perform a sequence of uploads over a single connection.
In the vast majority of uploads, everything performs as expected.
However, occasionally we get an IllegalStateException within the internal code that handles the form file attachments :
This failure occurs before our routing context handler is called, and therefore we appear unable to catch the exception and handle it better (like failing the context, for instance). Instead, the request hangs until the idleTimeout kicks in, and the request fails.
Looking in the "file-uploads" folder, the three files are present, and appear to be complete. And obviously, the files remain there (i.e. not cleaned up) as the process managing them has failed.
The error itself implies that an AsyncFile is being closed twice!
The issue only appears with one particular client of ours. All our other clients have not exhibited this behaviour.
Is there any way for us to catch and handle exceptions from there?
@woollybah commented on Thu Oct 20 2016
Here's a reproducer : https://github.com/woollybah/multipart-upload-reproducer
Running the test generates the exception consistently here. Out in the wilderness, the exception occurs fairly frequently (several times a day), which is somewhat of an issue for us.
The text was updated successfully, but these errors were encountered: