Bug #75882 [NEW]: a simple way for segfaults in threadsafe php just with configuration
From: hajo dot locke at gmx dot de
Operating system: Ubuntu 16.04
PHP version: 7.2.1
Package: Apache2 related
Bug Type: Bug
Bug description:a simple way for segfaults in threadsafe php just with configuration
Description:
------------
This is a easy way to have massive segfaults in threadsafe php, just
without code, only configuration is needed.
- compile a minimal threadsafe libphp7.so and enable thread safety
./configure --disable-all --enable-static --prefix=/usr
--with-apxs2=/usr/bin/apxs2 --enable-maintainer-zts
- just load this libphp7.so into apache2. no further configuration
needed.
LoadModule php7_module /usr/lib/apache2/modules/libphp7.so
- activate a threadsafe mpm in apache like mpm_worker/mpm_event
a2enmod mpm_event
- add a php_value directive in VHost-Config for this particular VHost
along with a php_value directive in .htaccess in docroot of this VHost.
It is not needed to request a php-file, just requesting a small static
file is enough. The smaller the requested file and higher requests per
second the higher is count of segfaults. you can do some mass-requests
with ab from apache2-utils or h2load.
Test script:
---------------
none
Expected result:
----------------
i expect to have no segfaults and every single request should be served
fine.
Actual result:
--------------
You will see massive segfaults and failed requests. threadsafe php is
currently not able to edit environment of each request safely.
--
Edit bug report at https://bugs.php.net/bug.php?id=75882&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=75882&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=75882&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=75882&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=75882&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=75882&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=75882&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=75882&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=75882&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=75882&r=support
Expected behavior: https://bugs.php.net/fix.php?id=75882&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=75882&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=75882&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=75882&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=75882&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=75882&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=75882&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=75882&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=75882&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=75882&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=75882&r=mysqlcfg
Thread (9 messages)
- hajo dot locke at gmx dot de