php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #78828 PHP 7.4 + UWSGI - crash
Submitted: 2019-11-18 07:48 UTC Modified: 2019-12-13 12:11 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: pawelrosada at gmail dot com Assigned: nikic (profile)
Status: Closed Package: Apache2 related
PHP Version: 7.4.0RC6 OS: ArchLinux
Private report: No CVE-ID: None
 [2019-11-18 07:48 UTC] pawelrosada at gmail dot com
Description:
------------
PHP Version: 7.4.0RC6
uWSGI Version: 2.0.18
HTTPD Version: Apache/2.4.39


PHP 7.4 when testing under UWSGI was crashed. The problem occurs after installing WordPress 5.3 - navigation on WordPress panel.


Enabled extensions:
extension=bcmath.so
extension=bz2.so
extension=calendar.so
extension=curl.so
extension=dba.so
extension=dom.so
extension=exif.so
extension=ftp.so
extension=gd.so
extension=gettext.so
extension=gmp.so
extension=iconv.so
extension=intl.so
extension=ldap.so
extension=mbstring.so
extension=mysqli.so
extension=odbc.so
extension=openssl.so
extension=pcntl.so
extension=pdo_dblib.so
extension=pdo_mysql.so
extension=pdo_odbc.so
extension=pdo_pgsql.so
extension=pdo_sqlite.so
extension=pgsql.so
extension=pspell.so
extension=readline.so
extension=shmop.so
extension=soap.so
extension=sockets.so
extension=sodium.so
extension=sqlite3.so
extension=sysvmsg.so
extension=sysvsem.so
extension=sysvshm.so
extension=tidy.so
extension=xmlreader.so
extension=xmlrpc.so
extension=xml.so
extension=xsl.so
extension=zip.so

Opcache:

opcache.enable = On
opcache.memory_consumption = 512M
opcache.max_accelerated_files = 1000000
opcache.blacklist_filename = /usr/local/etc/opcache.blacklist
opcache.enable_file_override = On
opcache.validate_permission = On
opcache.validate_root = On

opcache.enable_cli = Off


Actual result:
--------------
#0  0x00007f8fe07e9e96 in zend_mm_free_heap (ptr=0x30322e31312e3831, heap=0x7f8fd2c00040)
    at /data/work/php-src-php-7.4.0RC6/Zend/zend_alloc.c:1368
        chunk = 0x30322e3131200000
        page_num = 227
        info = <optimized out>
        page_offset = 931889
#1  0x00007f8fe07e9e96 in _efree (ptr=0x30322e31312e3831) at /data/work/php-src-php-7.4.0RC6/Zend/zend_alloc.c:2549
#2  0x00007f8fe0834724 in zend_file_handle_dtor (fh=fh@entry=0x7ffcf0aa63b0)
    at /data/work/php-src-php-7.4.0RC6/Zend/zend_stream.c:225
#3  0x00007f8fd2989602 in persistent_compile_file (file_handle=0x7ffcf0aa63b0, type=<optimized out>)
    at /data/work/php-src-php-7.4.0RC6/ext/opcache/ZendAccelerator.c:2183
        key_length = 29
        from_shared_memory = <optimized out>
        type = <optimized out>
        file_handle = 0x7ffcf0aa63b0
#4  0x00007f8fe0816dc2 in zend_execute_scripts (type=type@entry=8, retval=retval@entry=0x0, file_count=file_count@entry=3)
    at /data/work/php-src-php-7.4.0RC6/Zend/zend.c:1657
        files = {{gp_offset = 40, fp_offset = 0, overflow_arg_area = 0x7ffcf0aa40a0, reg_save_area = 0x7ffcf0aa4030}}
        i = 1
        file_handle = 0x7ffcf0aa63b0
        op_array = <optimized out>
#5  0x00007f8fe07a7b91 in php_execute_script (primary_file=0x7ffcf0aa63b0) at /data/work/php-src-php-7.4.0RC6/main/main.c:2619
        realfile = "\000\000\000\000\217\177\000\000 \\\252\360\374\177\000\000 ", '\000' <repeats 11 times>, "\217\177\000\000\220\252U\340\000\000\000\000\003\000\000\000\000\000\000\000\300[\252\360\374\177", '\000' <repeats 26 times>, "\020\\\252\360\374\177\000\000\300S\252\360\374\177", '\000' <repeats 26 times>, "\001", '\000' <repeats 27 times>, "\001", '\000' <repeats 31 times>, "\001", '\000' <repeats 115 times>...
        __orig_bailout = 0x0
        __bailout =
                {{__jmpbuf = {0, -289820728603681065, 140255951263735, 0, 0, 0, -289820727632699689, -352274501766848809}, __mask_was_saved = 0, __saved_mask = {__val = {22021792, 140724346184512, 140255923404572, 140255923197552, 22021872, 24646535, 290012539620875776, 140724346180352, 0, 22021760, 140255923202413, 0, 0, 140255923749248, 140255923749264, 140255923749200}}}}
        prepend_file_p = <optimized out>
        append_file_p = 0x0
        prepend_file =
---Type <return> to continue, or q <return> to quit---
          {handle = {fp = 0x0, stream = {handle = 0x0, isatty = 1149427200, reader = 0x0, fsizer = 0x7ffcf0aa5300, closer = 0x7ffcf0aa74d0}}, filename = 0x1500680 "xM\322]", opened_path = 0x15006f0, type = (unknown: 22021792), free_filename = 0 '\000', buf = 0x7ffcf0aa6340 "\367\027'\342\217\177", len = 140255923177622}
        append_file =
          {handle = {fp = 0x7ffcf0aa62ff, stream = {handle = 0x7ffcf0aa62ff, isatty = -257273059, reader = 0x3000000030, fsizer = 0x7ffcf0aa5220, closer = 0x7ffcf0aa5160}}, filename = 0x40654de4482de00 <error: Cannot access memory at address 0x40654de4482de00>, opened_path = 0x7f8fe34775b0 <flush_cleanup>, type = (unknown: 1149427200), free_filename = 222 '\336', buf = 0x0, len = 140724346184512}
        old_cwd = 0x7ffcf0aa40a0 "(unreachable)/"
        retval = 0
#6  0x00007f8fe22711a3 in uwsgi_php_request () at /usr/lib/uwsgi/php74_plugin.so
#7  0x000000000041af85 in wsgi_req_recv ()
#8  0x0000000000468e59 in simple_loop_run ()
#9  0x0000000000468c6e in simple_loop ()
#10 0x000000000046d818 in uwsgi_ignition ()
#11 0x0000000000472632 in uwsgi_worker_run ()
#12 0x0000000000472b30 in uwsgi_init_worker_mount_apps ()
#13 0x000000000041a58e in  ()

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2019-11-18 08:04 UTC] pawelrosada at gmail dot com
-: pawel dot rosada at home dot net dot pl +: pawelrosada at gmail dot com
 [2019-11-18 08:04 UTC] pawelrosada at gmail dot com
php.ini:
expose_php = Off
 [2019-12-13 10:30 UTC] nikic@php.net
-Status: Open +Status: Feedback
 [2019-12-13 10:30 UTC] nikic@php.net
Where can I find the source code of however uwsgi interfaces with php? The file_handle structure changes in PHP 7.4, and most likely uwsgi is no longer initializing it correctly.
 [2019-12-13 12:03 UTC] pawelrosada at gmail dot com
This commit resolving it: https://github.com/unbit/uwsgi/issues/2096
 [2019-12-13 12:11 UTC] nikic@php.net
-Status: Feedback +Status: Closed -Assigned To: +Assigned To: nikic
 [2019-12-13 12:11 UTC] nikic@php.net
Thanks for the reference!
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 07:01:27 2024 UTC