drupal-php
drupal-php copied to clipboard
Error during ajax image upload (Child 103 exited on signal 11)
Using PHP_TAG=7.4-dev-4.24.9
While trying to upload an image via http://example.docker.test:8000/media/add/image we end up getting a segfault.
Tried the same using PHP_TAG=7.4-dev-4.17.0 and we have no problem.
php_1 | 192.168.48.9 - 24/May/2021:17:44:23 +0000 "GET /index.php" 200 nginx_1 | 192.168.48.6 - - [24/May/2021:17:44:23 +0000] "GET /file/progress/1538241916?_format=json HTTP/1.1" 200 76 "http://example.docker.test:8000/media/add/image" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:88.0) Gecko/20100101 Firefox/88.0" php_1 | [24-May-2021 17:44:23] WARNING: [pool www] child 103 exited on signal 11 (SIGSEGV - core dumped) after 18.804057 seconds from start
Further to this, I can confirm that the error only occurs when the progress meter is used for the file upload form widget.
If 'throbber' is selected, the upload is fine.
What's your drupal versoin?
Hi @csandanov I'm testing this on Drupal 9.1.8 at the moment
Could you provide steps to reproduce it from the scratch? I'm testing with vanilla Drupal 9 from the latest clean docker4drupal setup (master branch) using DRUPAL_TAG=9-7.4-4.28.14. I install drupal, enable media module, go to media/add/image and upload an image without any issues.
PHP_TAG=7.4-4.19.0 works fine.
It seems the update for uploadprogress from 1.0.3.1 to 1.1.3 might be causing problems.
Hi @csandanov just tried this with a vanilla install.
The upload works with the 'throbber', but if I switch to progress meter, it fails.

(via http://example.local:8000/admin/structure/media/manage/image/form-display)
Since the recent update uploadprogress says:
It requires the use of the Apache httpd web server with mod_php. Other web servers and PHP-FPM are not yet supported.
there's a PR to address segmentation fault https://github.com/php/pecl-php-uploadprogress/pull/9
Ah .. that makes a lot of sense! What do you think the best solution is for wodby/drupal-php @csandanov ?
Not use progress bar for now? Especially since it's not a default option
That's not an option in this case unfortunately.
Is there a way use a recent tag, but pin the version of uploadprogress to 1.0.3.1 ?
FYI I'm experiencing this issue also, but with wodby/nginx:1.18-5.14.1, and Drupal 8.9.16. Thanks everyone for your work on this. Fingers crossed that the upstream uploadprogress patch gets applied - it's quite daunting to think about changing the form display settings for hundreds of sites.