nginx-upload-module icon indicating copy to clipboard operation
nginx-upload-module copied to clipboard

Upload failing with http2

Open vlastikcz opened this issue 5 years ago • 3 comments

Tested environment:

  • CentOS 7
  • Nginx 1.15.9, 1.17.8, 1.18.0
  • upload module 2.3.0, master

Steps:

  • enable ssl and http2 for the upload location
  • try to upload file (with POST and resumable, or with multipart and resumable off)

Result:

  • when resumable on: nginx worker segfault (kernel: nginx[1252]: segfault at 8 ip 000055b16d47b0b5 sp 00007ffe4c711150 error 4 in nginx[55b16d39f000+111000])
  • when resumable off: error *217 premature end of body while sending to client
  • some uploads are usually successful, some fail (I did not see any pattern there)

This is mainly for future reference, as I didn't tried to replicate this issue on a fresh environment or anything, but i think it may be useful for someone with similar issues.

The workaround is easy: disable http2 in nginx config.

vlastikcz avatar May 18 '20 21:05 vlastikcz

Could you follow the instructions for enabling core dumps and then upload the core dump somewhere I can access (e.g. dropbox)? Or, at least, paste the backtrace from the core dump file (instructions here)

We currently use this module with http2 in production, and there are currently passing unit tests for http2 support, so there is some other variable involved that's triggering your issue.

fdintino avatar Jun 01 '20 21:06 fdintino

I had the same issue in production with both SSL and HTTP2 enabled. I disabled HTTP2 and the problem is gone for a few days. I think you should either fix or mention this incompatibility in the docs for future reference.

masoud-msk avatar Oct 12 '20 11:10 masoud-msk

@masoud-msk As I stated in the previous comment, the issue isn't solely with http2. We use this module with http2 and we don't experience this segmentation fault. So there is some other variable that causes this bug, and until I know what that is I can't fix it. If you could take some time to share a core dump (instructions above in https://github.com/fdintino/nginx-upload-module/issues/132#issuecomment-637099536 ) I'd be able to identify and fix whatever the problem is.

fdintino avatar Oct 13 '20 23:10 fdintino