drupal-php icon indicating copy to clipboard operation
drupal-php copied to clipboard

Error during ajax image upload (Child 103 exited on signal 11)

Open lukewhitmore opened this issue 4 years ago • 11 comments

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

lukewhitmore avatar May 24 '21 17:05 lukewhitmore

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.

lukewhitmore avatar May 25 '21 11:05 lukewhitmore

What's your drupal versoin?

csandanov avatar May 25 '21 11:05 csandanov

Hi @csandanov I'm testing this on Drupal 9.1.8 at the moment

lukewhitmore avatar May 25 '21 11:05 lukewhitmore

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.

csandanov avatar May 25 '21 11:05 csandanov

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.

lukewhitmore avatar May 25 '21 11:05 lukewhitmore

Hi @csandanov just tried this with a vanilla install.

The upload works with the 'throbber', but if I switch to progress meter, it fails.

image

(via http://example.local:8000/admin/structure/media/manage/image/form-display)

lukewhitmore avatar May 25 '21 11:05 lukewhitmore

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

csandanov avatar May 26 '21 01:05 csandanov

Ah .. that makes a lot of sense! What do you think the best solution is for wodby/drupal-php @csandanov ?

lukewhitmore avatar May 26 '21 09:05 lukewhitmore

Not use progress bar for now? Especially since it's not a default option

csandanov avatar May 26 '21 12:05 csandanov

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 ?

lukewhitmore avatar May 26 '21 12:05 lukewhitmore

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.

djun-kim avatar Jun 04 '21 21:06 djun-kim