com php-src: Fixes #72590: Opcache restart with kill_all_lo ckers does not work: ext/opcache/ZendAccelerator.c
| From: | JulienPauli | Date: | Mon, 05 Sep 2016 14:59:28 +0000 |
| Subject: | com php-src: Fixes #72590: Opcache restart with kill_all_lo ckers does not work: ext/opcache/ZendAccelerator.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-94327@lists.php.net to get a copy of this message | ||
Commit: 0045d168639f0b4563b49ae34792dabb268101d9
Author: Keyur <kgovande@etsy.com> Wed, 13 Jul 2016 02:47:46 +0000
Committer: Julien Pauli <jpauli@php.net> Mon, 5 Sep 2016 16:59:28 +0200
Parents: b92cb6b2380d12f1f4d7db7c7721bc646f753056
Branches: PHP-5.6 PHP-7.0 PHP-7.1 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=0045d168639f0b4563b49ae34792dabb268101d9
Log:
Fixes #72590: Opcache restart with kill_all_lockers does not work
ACCEL_LOG_ERROR is special and causes a zend_bailout() and the code
never gets to call kill() in the next line after the logging. Change
the log level to WARNING.
Bugs:
https://bugs.php.net/72590
Changed paths:
M ext/opcache/ZendAccelerator.c
Diff:
diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c
index 418b4a3..985a4ef 100644
--- a/ext/opcache/ZendAccelerator.c
+++ b/ext/opcache/ZendAccelerator.c
@@ -602,7 +602,7 @@ static inline void kill_all_lockers(struct flock *mem_usage_check)
ZCSG(force_restart_time) = 0;
while (mem_usage_check->l_pid > 0) {
while (tries--) {
- zend_accel_error(ACCEL_LOG_ERROR, "Killed locker %d", mem_usage_check->l_pid);
+ zend_accel_error(ACCEL_LOG_WARNING, "Killed locker %d", mem_usage_check->l_pid);
if (kill(mem_usage_check->l_pid, SIGKILL)) {
break;
}
@@ -615,7 +615,7 @@ static inline void kill_all_lockers(struct flock *mem_usage_check)
usleep(10000);
}
if (!tries) {
- zend_accel_error(ACCEL_LOG_ERROR, "Can't kill %d after 20 tries!",
mem_usage_check->l_pid);
+ zend_accel_error(ACCEL_LOG_WARNING, "Can't kill %d after 10 tries!",
mem_usage_check->l_pid);
ZCSG(force_restart_time) = time(NULL); /* restore forced restart request */
}