Bug #72590 [Com]: Opcache restart with kill_all_lockers does not work as expected
| From: | jpauli@php.net | Date: | Mon, 05 Sep 2016 15:06:04 +0000 |
| Subject: | Bug #72590 [Com]: Opcache restart with kill_all_lockers does not work as expected | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-203807@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=72590&edit=1
ID: 72590
Comment by: jpauli@php.net
Reported by: keyur@php.net
Summary: Opcache restart with kill_all_lockers does not work
as expected
Status: Closed
Type: Bug
Package: opcache
Operating System: Linux
PHP Version: 7.0.8
Assigned To: keyur
Block user comment: N
Private report: N
New Comment:
Backported to PHP-5.6 today
Previous Comments:
------------------------------------------------------------------------
[2016-07-13 03:13:46] keyur@php.net
The fix for this bug has been committed.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
For Windows:
http://windows.php.net/snapshots/
Thank you for the report, and for helping us make PHP better.
------------------------------------------------------------------------
[2016-07-13 02:38:14] keyur@php.net
Description:
------------
Suppose one of the Apache child is blocked by a malloc deadlock while holding a read lock on
Opcache. After some time Opcache gets full and is scheduled to be restarted.
Because of the child holding the lock, we eventually end up calling kill_all_lockers.
This line https://github.com/php/php-src/blob/PHP-7.0.0/ext/opcache/ZendAccelerator.c#L600
calls zend_accel_error with ACCEL_LOG_ERROR.
ACCEL_LOG_ERROR is special and causes a zend_bailout, so the code never gets to call kill() in line
601. Combined with the reset of force_restart_time in line 597, the child is never terminated and
Opcache never restarts.
The fix would be to change the log level to ACCEL_LOG_WARNING
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=72590&edit=1