]> granicus.if.org Git - php/commitdiff
Fixes #72590: Opcache restart with kill_all_lockers does not work
authorKeyur <kgovande@etsy.com>
Wed, 13 Jul 2016 02:47:46 +0000 (02:47 +0000)
committerKeyur <kgovande@etsy.com>
Wed, 13 Jul 2016 03:01:26 +0000 (03:01 +0000)
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.

ext/opcache/ZendAccelerator.c

index 2cfe5390b393d55868e080b890a7fd59a0dac4d3..f756f37a4896de86f5e886a8414f24e3a1eaffd1 100644 (file)
@@ -625,7 +625,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;
                        }
@@ -638,7 +638,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 */
                }