FS#64696 - [uwsgi-plugin-php] Segfault with php 7.4.0-2

Attached to Project: Community Packages
Opened by Florian (nougad) - Saturday, 30 November 2019, 20:03 GMT
Last edited by Sven-Hendrik Haase (Svenstaro) - Thursday, 12 December 2019, 09:05 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Pierre Schmitz (Pierre)
Sven-Hendrik Haase (Svenstaro)
Felix Yan (felixonmars)
Architecture x86_64
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description: The plugin segfaults with latest php 7.4.0-2: https://www.archlinux.org/packages/extra/x86_64/php/


Additional info:
* package version(s):
* php 7.4.0-2
* uwsgi 2.0.18-4
* uwsgi-plugin-php 2.0.18-4
* config and/or log files etc:

Nov 30 20:59:54 nextcloud01 uwsgi[59900]: Respawned uWSGI worker 2 (new pid: 60175)
Nov 30 20:59:55 nextcloud01 uwsgi[59900]: spawned 2 offload threads for uWSGI worker 2
Nov 30 20:59:59 nextcloud01 uwsgi[59900]: !!! uWSGI process 60175 got Segmentation Fault !!!
Nov 30 20:59:59 nextcloud01 uwsgi[59900]: *** backtrace of 60175 ***
Nov 30 20:59:59 nextcloud01 uwsgi[59900]: uWSGI worker 2(uwsgi_backtrace+0x2c) [0x55a9502deb4c]
Nov 30 20:59:59 nextcloud01 uwsgi[59900]: uWSGI worker 2(uwsgi_segfault+0x25) [0x55a9502def65]
Nov 30 20:59:59 nextcloud01 uwsgi[59900]: /usr/lib/libc.so.6(+0x3bfb0) [0x7f54ab09dfb0]
Nov 30 20:59:59 nextcloud01 uwsgi[59900]: /usr/lib/libc.so.6(+0x9e79a) [0x7f54ab10079a]
Nov 30 20:59:59 nextcloud01 uwsgi[59900]: /usr/lib/libphp7.so(virtual_chdir_file+0x32) [0x7f54a8706b22]
Nov 30 20:59:59 nextcloud01 uwsgi[59900]: /usr/lib/libphp7.so(php_execute_script+0xd6) [0x7f54a8678e56]
Nov 30 20:59:59 nextcloud01 uwsgi[59900]: /usr/lib/uwsgi/php_plugin.so(uwsgi_php_request+0xbf4) [0x7f54a8fdb1a4]
Nov 30 20:59:59 nextcloud01 uwsgi[59900]: uWSGI worker 2(wsgi_req_recv+0xaf) [0x55a95028da8f]
Nov 30 20:59:59 nextcloud01 uwsgi[59900]: uWSGI worker 2(simple_loop_run+0xc7) [0x55a9502da717]
Nov 30 20:59:59 nextcloud01 uwsgi[59900]: uWSGI worker 2(simple_loop+0x10) [0x55a9502da4f0]
Nov 30 20:59:59 nextcloud01 uwsgi[59900]: uWSGI worker 2(uwsgi_ignition+0x2a7) [0x55a9502df2c7]
Nov 30 20:59:59 nextcloud01 uwsgi[59900]: uWSGI worker 2(uwsgi_worker_run+0x27a) [0x55a9502e3b9a]
Nov 30 20:59:59 nextcloud01 uwsgi[59900]: uWSGI worker 2(uwsgi_run+0x470) [0x55a9502e4140]
Nov 30 20:59:59 nextcloud01 uwsgi[59900]: uWSGI worker 2(+0x3108e) [0x55a95028d08e]
Nov 30 20:59:59 nextcloud01 uwsgi[59900]: /usr/lib/libc.so.6(__libc_start_main+0xf3) [0x7f54ab089153]
Nov 30 20:59:59 nextcloud01 uwsgi[59900]: uWSGI worker 2(_start+0x2e) [0x55a95028d0be]
Nov 30 20:59:59 nextcloud01 uwsgi[59900]: *** end of backtrace ***
Nov 30 21:00:00 nextcloud01 uwsgi[59900]: DAMN ! worker 2 (pid: 60175) died :( trying respawn ...


* link to upstream bug report, if any

Steps to reproduce:
This task depends upon

Closed by  Sven-Hendrik Haase (Svenstaro)
Thursday, 12 December 2019, 09:05 GMT
Reason for closing:  Fixed
Comment by loqs (loqs) - Sunday, 01 December 2019, 02:11 GMT
@nougad if you rebuild uwsgi against php 7.4 is the issue still present?
Comment by Pierre Schmitz (Pierre) - Sunday, 01 December 2019, 11:53 GMT
Sorry, this package was missing from the todo list. I have pushed version 2.0.18-5 to the repos. Does this fix your problem?
Comment by Florian (nougad) - Sunday, 01 December 2019, 12:54 GMT
I updated to 2.0.18-5 but I still get segfaults:

$ pacman -Ss uwsgi | grep installed
community/uwsgi 2.0.18-5 [installed]
community/uwsgi-plugin-php 2.0.18-5 [installed]
$ pacman -Ss php | grep installed
extra/composer 1.9.1-1 [installed]
extra/php 7.4.0-2 [installed]
extra/php-embed 7.4.0-2 [installed]
extra/php-gd 7.4.0-2 [installed]
extra/php-intl 7.4.0-2 [installed]
extra/php-pgsql 7.4.0-2 [installed]
extra/php-pspell 7.4.0-2 [installed]
community/roundcubemail 1.4.1-1 [installed]
community/uwsgi-plugin-php 2.0.18-5 [installed]


Dec 01 13:53:00 roundcube01 uwsgi[9296]: !!! uWSGI process 9325 got Segmentation Fault !!!
Dec 01 13:53:00 roundcube01 uwsgi[9296]: *** backtrace of 9325 ***
Dec 01 13:53:00 roundcube01 uwsgi[9296]: uWSGI worker 1(uwsgi_backtrace+0x2c) [0x55fd6ea09b4c]
Dec 01 13:53:00 roundcube01 uwsgi[9296]: uWSGI worker 1(uwsgi_segfault+0x25) [0x55fd6ea09f65]
Dec 01 13:53:00 roundcube01 uwsgi[9296]: /usr/lib/libc.so.6(+0x3bfb0) [0x7f4968cd1fb0]
Dec 01 13:53:00 roundcube01 uwsgi[9296]: /usr/lib/libphp7.so(lex_scan+0x12b) [0x7f49662d4e2b]
Dec 01 13:53:00 roundcube01 uwsgi[9296]: /usr/lib/libphp7.so(+0x364b0b) [0x7f49662ecb0b]
Dec 01 13:53:00 roundcube01 uwsgi[9296]: /usr/lib/libphp7.so(zendparse+0x5bb) [0x7f49662d01bb]
Dec 01 13:53:00 roundcube01 uwsgi[9296]: /usr/lib/libphp7.so(+0x34ab5c) [0x7f49662d2b5c]
Dec 01 13:53:00 roundcube01 uwsgi[9296]: /usr/lib/libphp7.so(compile_file+0x92) [0x7f49662d42f2]
Dec 01 13:53:00 roundcube01 uwsgi[9296]: /usr/lib/libphp7.so(+0x228bbc) [0x7f49661b0bbc]
Dec 01 13:53:00 roundcube01 uwsgi[9296]: /usr/lib/libphp7.so(zend_execute_scripts+0x8c) [0x7f496630ce2c]
Dec 01 13:53:00 roundcube01 uwsgi[9296]: /usr/lib/libphp7.so(php_execute_script+0x281) [0x7f49662ad001]
Dec 01 13:53:00 roundcube01 uwsgi[9296]: /usr/lib/uwsgi/php_plugin.so(uwsgi_php_request+0xbf4) [0x7f4966c0f194]
Dec 01 13:53:00 roundcube01 uwsgi[9296]: uWSGI worker 1(wsgi_req_recv+0xaf) [0x55fd6e9b8a8f]
Dec 01 13:53:00 roundcube01 uwsgi[9296]: uWSGI worker 1(simple_loop_run+0xc7) [0x55fd6ea05717]
Dec 01 13:53:00 roundcube01 uwsgi[9296]: uWSGI worker 1(simple_loop+0x10) [0x55fd6ea054f0]
Dec 01 13:53:00 roundcube01 uwsgi[9296]: uWSGI worker 1(uwsgi_ignition+0x2a7) [0x55fd6ea0a2c7]
Dec 01 13:53:00 roundcube01 uwsgi[9296]: uWSGI worker 1(uwsgi_worker_run+0x27a) [0x55fd6ea0eb9a]
Dec 01 13:53:00 roundcube01 uwsgi[9296]: uWSGI worker 1(uwsgi_run+0x470) [0x55fd6ea0f140]
Dec 01 13:53:00 roundcube01 uwsgi[9296]: uWSGI worker 1(+0x3108e) [0x55fd6e9b808e]
Dec 01 13:53:00 roundcube01 uwsgi[9296]: /usr/lib/libc.so.6(__libc_start_main+0xf3) [0x7f4968cbd153]
Dec 01 13:53:00 roundcube01 uwsgi[9296]: uWSGI worker 1(_start+0x2e) [0x55fd6e9b80be]
Dec 01 13:53:00 roundcube01 uwsgi[9296]: *** end of backtrace ***
Dec 01 13:53:01 roundcube01 uwsgi[9296]: DAMN ! worker 1 (pid: 9325) died :( trying respawn ...
Dec 01 13:53:01 roundcube01 uwsgi[9296]: Respawned uWSGI worker 1 (new pid: 9327)
Comment by Florian (nougad) - Sunday, 01 December 2019, 12:59 GMT
maybe related upstream issue? https://github.com/unbit/uwsgi/issues/2096

For me it does not make a change if I enable/disable opcache (of course the stacktrace is different) but both segfault.

segfault with opcache =1 (above was the =0 version)

Dec 01 13:57:31 roundcube01 uwsgi[9362]: Respawned uWSGI worker 2 (new pid: 9371)
Dec 01 13:57:40 roundcube01 uwsgi[9362]: !!! uWSGI process 9371 got Segmentation Fault !!!
Dec 01 13:57:40 roundcube01 uwsgi[9362]: *** backtrace of 9371 ***
Dec 01 13:57:40 roundcube01 uwsgi[9362]: uWSGI worker 2(uwsgi_backtrace+0x2c) [0x55ee09606b4c]
Dec 01 13:57:40 roundcube01 uwsgi[9362]: uWSGI worker 2(uwsgi_segfault+0x25) [0x55ee09606f65]
Dec 01 13:57:40 roundcube01 uwsgi[9362]: /usr/lib/libc.so.6(+0x3bfb0) [0x7fafc6cb9fb0]
Dec 01 13:57:40 roundcube01 uwsgi[9362]: /usr/lib/libphp7.so(_efree+0x31) [0x7fafc42d0091]
Dec 01 13:57:40 roundcube01 uwsgi[9362]: /usr/lib/libphp7.so(zend_file_handle_dtor+0x55) [0x7fafc4310745]
Dec 01 13:57:40 roundcube01 uwsgi[9362]: /usr/lib/php/modules/opcache.so(+0x16ef1) [0x7fafc3a56ef1]
Dec 01 13:57:40 roundcube01 uwsgi[9362]: /usr/lib/libphp7.so(zend_execute_scripts+0x8c) [0x7fafc42f4e2c]
Dec 01 13:57:40 roundcube01 uwsgi[9362]: /usr/lib/libphp7.so(php_execute_script+0x281) [0x7fafc4295001]
Dec 01 13:57:40 roundcube01 uwsgi[9362]: /usr/lib/uwsgi/php_plugin.so(uwsgi_php_request+0xbf4) [0x7fafc4bf7194]
Dec 01 13:57:40 roundcube01 uwsgi[9362]: uWSGI worker 2(wsgi_req_recv+0xaf) [0x55ee095b5a8f]
Dec 01 13:57:40 roundcube01 uwsgi[9362]: uWSGI worker 2(simple_loop_run+0xc7) [0x55ee09602717]
Dec 01 13:57:40 roundcube01 uwsgi[9362]: uWSGI worker 2(simple_loop+0x10) [0x55ee096024f0]
Dec 01 13:57:40 roundcube01 uwsgi[9362]: uWSGI worker 2(uwsgi_ignition+0x2a7) [0x55ee096072c7]
Dec 01 13:57:40 roundcube01 uwsgi[9362]: uWSGI worker 2(uwsgi_worker_run+0x27a) [0x55ee0960bb9a]
Dec 01 13:57:40 roundcube01 uwsgi[9362]: uWSGI worker 2(uwsgi_run+0x470) [0x55ee0960c140]
Dec 01 13:57:40 roundcube01 uwsgi[9362]: uWSGI worker 2(+0x3108e) [0x55ee095b508e]
Dec 01 13:57:40 roundcube01 uwsgi[9362]: /usr/lib/libc.so.6(__libc_start_main+0xf3) [0x7fafc6ca5153]
Dec 01 13:57:40 roundcube01 uwsgi[9362]: uWSGI worker 2(_start+0x2e) [0x55ee095b50be]
Dec 01 13:57:40 roundcube01 uwsgi[9362]: *** end of backtrace ***
Dec 01 13:57:41 roundcube01 uwsgi[9362]: DAMN ! worker 2 (pid: 9371) died :( trying respawn ...
Comment by Pierre Schmitz (Pierre) - Sunday, 01 December 2019, 13:06 GMT
I fear this is probably an upstream issue then. Uwsgi only tests against PHP 7.2.
Comment by Florian (nougad) - Sunday, 01 December 2019, 13:07 GMT Comment by Christoph (cobzcs) - Tuesday, 10 December 2019, 11:19 GMT Comment by Sven-Hendrik Haase (Svenstaro) - Thursday, 12 December 2019, 05:37 GMT
Try rel -6.
Comment by Florian (nougad) - Thursday, 12 December 2019, 08:01 GMT
-6 works for me. Thank you!
Comment by Christoph (cobzcs) - Thursday, 12 December 2019, 08:35 GMT
It's also working for me. Thanks.

Loading...