]> git.pld-linux.org Git - packages/php.git/commitdiff
Rel 2; Don't get stuck if no permission to kill process (via opcache). auto/th/php82-8.2.17-2
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Wed, 20 Mar 2024 11:02:40 +0000 (12:02 +0100)
committerArkadiusz Miśkiewicz <arekm@maven.pl>
Wed, 20 Mar 2024 11:02:40 +0000 (12:02 +0100)
opcache-nokill-perm.patch [new file with mode: 0644]
php.spec

diff --git a/opcache-nokill-perm.patch b/opcache-nokill-perm.patch
new file mode 100644 (file)
index 0000000..0130461
--- /dev/null
@@ -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 = true;
+                                       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 = true;
++                                      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 = true;
+                                       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 = true;
++                                      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));
+                               }
index 3f35aee5b8e0f7b4e0dc3b2f21b64f78d5d7ca4e..071b032d43f65489401ecaa5d5ea1c8613adb56e 100644 (file)
--- a/php.spec
+++ b/php.spec
 %define                ver_suffix      82
 %define                php_suffix      %{!?with_default_php:%{ver_suffix}}
 %define                subver          %{nil}
-%define                rel             1
+%define                rel             2
 Summary:       PHP: Hypertext Preprocessor
 Summary(fr.UTF-8):     Le langage de script embarque-HTML PHP
 Summary(pl.UTF-8):     Język skryptowy PHP
@@ -179,6 +179,8 @@ Patch3:             %{orgname}-link-libs.patch
 Patch4:                intl-stdc++.patch
 # https://bugs.php.net/bug.php?id=79589
 Patch5:                openssl.patch
+# https://github.com/php/php-src/issues/9910
+Patch6:                opcache-nokill-perm.patch
 Patch7:                %{orgname}-sapi-ini-file.patch
 Patch10:       %{orgname}-ini.patch
 Patch11:       embed.patch
@@ -1876,7 +1878,7 @@ cp -p php.ini-production php.ini
 %patch3 -p1
 %patch4 -p1
 #%patch5 -p1 resolved upstream?
-
+%patch6 -p1
 %patch7 -p1 -b .sapi-ini-file
 %patch10 -p1 -b .ini
 %patch14 -p1
This page took 0.400511 seconds and 4 git commands to generate.