Issue: https://github.com/php/php-src/issues/8159
Comment Author: unix-world
@devnexen
I was trying any of the above scenarios.
int signal = SIGTERM; -> int signal = SIGKILL;
Then commenting out the } else if (errno != 0) { zend_accel_error(...) lines.
Still the same result, crashing on SIGHUP or SIGUSR1, both scenarios.
I was talking with an internal guy here that have some limited C skills and he told me that from
what he can see in the debug log the crashing issue comes from accel_startup or
start_accel_module methods, thus he presumes everything is fine when doing SIGTERM or
SIGHUP, but on SIGHUP actually apache is shuting down then restart all childs, thus he thinks is an
issue with restart after SIGHUP not with the closing process on SIGHUP.
``` excerpt from debug log
#1 0x00000cec80fed18e in start_accel_module () at ext/opcache/zend_accelerator_module.c:518
No locals.
#2 0x00000cec80fdf63f in accel_startup (extension=0xcec16ffe210) at
ext/opcache/ZendAccelerator.c:3114
No locals.
```
Thus I have noticed only one major difference in the logic between PHP 7.3.33 and 8.0.16:
In 7.3.33 the accel_activate method is called in ext/opcache/ZendAccelerator.c, line # 3156
https://github.com/php/php-src/blob/php-7.3.33/ext/opcache/ZendAccelerator.c#L3156
In 8.0.16 the accel_activate method is called in a completely different place:
ext/opcache/zend_accelerator_module.c, line # 507
https://github.com/php/php-src/blob/php-8.0.16/ext/opcache/zend_accelerator_module.c#L507
What is your opinion on this ? I am not aware too much of Zend internal code ...
Should I try to create a patch to call accel_activate in the same place as it was in PHP 7.3.33 ?
Does it make sense ?