Bug #81380 [NEW]: Crash in Apache 2 module with opcache and observers after Apache reload
| From: | f dot sowade at r9e dot de | Date: | Tue, 24 Aug 2021 14:42:03 +0000 |
| Subject: | Bug #81380 [NEW]: Crash in Apache 2 module with opcache and observers after Apache reload | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-236051@lists.php.net to get a copy of this message | ||
From: f dot sowade at r9e dot de
Operating system: Linux
PHP version: 8.0.9
Package: Apache2 related
Bug Type: Bug
Bug description:Crash in Apache 2 module with opcache and observers after Apache reload
Description:
------------
I built PHP 8.0.9 as an Apache 2 module with the opcache and with the
zend-test extensions:
./configure --disable-all --enable-zend-test --with-apxs2 --enable-zts
--enable-opcache
I then used the following php.ini which uses the zend-test extension to
register an observer:
zend_extension=opcache.so
zend_test.observer.enabled=1
And I used a test script which just calls phpinfo();
The script works as expected after starting Apache. But when reloading
Apache (systemctl reload apache2.service) I get a segmentation fault
when accessing the script. This is the corresponding line from Apache's
error.log:
[Tue Aug 24 16:31:24.739107 2021] [core:notice] [pid 258215:tid
140253313567808] AH00051: child pid 258527 exit signal Segmentation
fault (11), possible coredump in /etc/apache2
When restarting Apache (systemctl restart apache2.service) the script
works again as expected.
The problem also occurs with a custom PHP extension which uses the
observer API. But since I was able to reproduce it with the zend-test
extension, I thought that it was the easiest reproduction case.
The problem does not occur if I don't load the opcache extension.
Test script:
---------------
<?php
phpinfo();
--
Edit bug report at https://bugs.php.net/bug.php?id=81380&edit=1
--
Fix committed: https://bugs.php.net/fix.php?id=81380&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=81380&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=81380&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=81380&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=81380&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=81380&r=support
Expected behavior: https://bugs.php.net/fix.php?id=81380&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=81380&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=81380&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=81380&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=81380&r=phptooold
Daylight Savings: https://bugs.php.net/fix.php?id=81380&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=81380&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=81380&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=81380&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=81380&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=81380&r=mysqlcfg