[packages/php/PHP_8_0] Rel 5; Don't get stuck if no permission to kill process (via opcache).
arekm
arekm at pld-linux.org
Wed Mar 20 13:26:49 CET 2024
commit 7ffee883753fea717fe2a4b57a6ecf3df5580d93
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Wed Mar 20 12:32:09 2024 +0100
Rel 5; Don't get stuck if no permission to kill process (via opcache).
opcache-nokill-perm.patch | 24 ++++++++++++++++++++++++
php.spec | 4 +++-
2 files changed, 27 insertions(+), 1 deletion(-)
---
diff --git a/php.spec b/php.spec
index df2849b..90dc8fc 100644
--- a/php.spec
+++ b/php.spec
@@ -148,7 +148,7 @@ Summary(ru.UTF-8): PHP - язык препроцессирования HTML-фа
Summary(uk.UTF-8): PHP - мова препроцесування HTML-файлів, виконувана на сервері
Name: %{orgname}%{php_suffix}
Version: 8.0.28
-Release: 4
+Release: 5
Epoch: 4
# All files licensed under PHP version 3.01, except
# Zend is licensed under Zend
@@ -173,6 +173,7 @@ Patch1: %{orgname}-pldlogo.patch
Patch2: %{orgname}-mail.patch
Patch3: %{orgname}-link-libs.patch
Patch4: intl-stdc++.patch
+Patch5: opcache-nokill-perm.patch
Patch7: %{orgname}-sapi-ini-file.patch
Patch9: libtool-tag.patch
Patch10: %{orgname}-ini.patch
@@ -1869,6 +1870,7 @@ cp -p php.ini-production php.ini
#%patch2 -p1 -b .mail
%patch3 -p1
%patch4 -p1
+%patch5 -p1
%patch7 -p1 -b .sapi-ini-file
%patch9 -p1
diff --git a/opcache-nokill-perm.patch b/opcache-nokill-perm.patch
new file mode 100644
index 0000000..a3458c7
--- /dev/null
+++ b/opcache-nokill-perm.patch
@@ -0,0 +1,24 @@
+--- php-8.2.17/ext/opcache/ZendAccelerator.c~ 2024-03-12 15:26:30.000000000 +0100
++++ php-8.2.17/ext/opcache/ZendAccelerator.c 2024-03-20 11:45:08.979946189 +0100
+@@ -852,6 +852,10 @@ static inline void kill_all_lockers(stru
+ /* Process died before the signal was sent */
+ success = 1;
+ zend_accel_error(ACCEL_LOG_WARNING, "Process %d died before SIGKILL was sent", mem_usage_check->l_pid);
++ } else if (errno == EPERM) {
++ /* We have no permission to kill the other process, so no point in trying */
++ success = 1;
++ zend_accel_error(ACCEL_LOG_WARNING, "No permission to kill locker %d: %s. Assuming success.", mem_usage_check->l_pid, strerror(errno));
+ } else if (errno != 0) {
+ zend_accel_error(ACCEL_LOG_WARNING, "Failed to send SIGKILL to locker %d: %s", mem_usage_check->l_pid, strerror(errno));
+ }
+@@ -864,6 +868,10 @@ static inline void kill_all_lockers(stru
+ /* successfully killed locker, process no longer exists */
+ success = 1;
+ zend_accel_error(ACCEL_LOG_WARNING, "Killed locker %d", mem_usage_check->l_pid);
++ } else if (errno == EPERM) {
++ /* We have no permission to kill the other process, so no point in trying */
++ success = 1;
++ zend_accel_error(ACCEL_LOG_WARNING, "No permission to kill locker %d again: %s. Assuming success.", mem_usage_check->l_pid, strerror(errno));
+ } else if (errno != 0) {
+ zend_accel_error(ACCEL_LOG_WARNING, "Failed to check locker %d: %s", mem_usage_check->l_pid, strerror(errno));
+ }
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/php.git/commitdiff/7ffee883753fea717fe2a4b57a6ecf3df5580d93
More information about the pld-cvs-commit
mailing list