Skip to content

Commit 0045d16

Browse files
keyurdgJulien Pauli
authored and
Julien Pauli
committed
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.
1 parent b92cb6b commit 0045d16

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ext/opcache/ZendAccelerator.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -602,7 +602,7 @@ static inline void kill_all_lockers(struct flock *mem_usage_check)
602602
ZCSG(force_restart_time) = 0;
603603
while (mem_usage_check->l_pid > 0) {
604604
while (tries--) {
605-
zend_accel_error(ACCEL_LOG_ERROR, "Killed locker %d", mem_usage_check->l_pid);
605+
zend_accel_error(ACCEL_LOG_WARNING, "Killed locker %d", mem_usage_check->l_pid);
606606
if (kill(mem_usage_check->l_pid, SIGKILL)) {
607607
break;
608608
}
@@ -615,7 +615,7 @@ static inline void kill_all_lockers(struct flock *mem_usage_check)
615615
usleep(10000);
616616
}
617617
if (!tries) {
618-
zend_accel_error(ACCEL_LOG_ERROR, "Can't kill %d after 20 tries!", mem_usage_check->l_pid);
618+
zend_accel_error(ACCEL_LOG_WARNING, "Can't kill %d after 10 tries!", mem_usage_check->l_pid);
619619
ZCSG(force_restart_time) = time(NULL); /* restore forced restart request */
620620
}
621621

0 commit comments

Comments
 (0)