-
Notifications
You must be signed in to change notification settings - Fork 337
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Segmentation Fault Occur when Apache-Worker restart #338
Comments
sapi_apache2. |
It is OK with PHP-FPM , CGI and apache2-prefork. |
Apache2 SAPI is known to cause those kinds of issues with other low level projects as well. I'm only using PHP-FPM SAPI, thus, have no issues of a kind. |
Seems to be a PHP bug: #include <sapi/embed/php_embed.h>
int main(int argc, char** argv)
{
PHP_EMBED_START_BLOCK(0, 0)
PHP_EMBED_END_BLOCK();
PHP_EMBED_START_BLOCK(0, 0)
PHP_EMBED_END_BLOCK();
return 0;
}
I suspect that this sequence: php_request_shutdown((void *) 0);
php_module_shutdown();
sapi_shutdown();
tsrm_shutdown(); does not clear everything properly and PHP dies on |
Segmentation Fault Occur in Apache-Worker restart
Repro Steps
apache error log
gdb
Program received signal SIGSEGV, Segmentation fault.
0x00007f778666535b in sapi_register_post_entry (post_entry=post_entry@entry=0x7f7786fd4b40 <php_post_entries>)
at /share/sources/php/php-7.0.14/main/SAPI.c:952
952 if (SG(sapi_started) && EG(current_execute_data)) {
backtrace
#0 0x00007f778666535b in sapi_register_post_entry (post_entry=post_entry@entry=0x7f7786fd4b40 <php_post_entries>)
at /share/sources/php/php-7.0.14/main/SAPI.c:952
#1 0x00007f7786665452 in sapi_register_post_entries (post_entries=post_entries@entry=0x7f7786fd4b40 <php_post_entries>)
at /share/sources/php/php-7.0.14/main/SAPI.c:941
#2 0x00007f7786668680 in php_setup_sapi_content_types () at /share/sources/php/php-7.0.14/main/php_content_types.c:64
#3 0x00007f7786656f6c in ts_allocate_id (rsrc_id=rsrc_id@entry=0x7f7786ff76c8 <sapi_globals_id>, size=size@entry=560,
ctor=ctor@entry=0x7f7786662ea0 <sapi_globals_ctor>, dtor=dtor@entry=0x7f7786662e80 <sapi_globals_dtor>)
at /share/sources/php/php-7.0.14/TSRM/TSRM.c:259
#4 0x00007f778666325c in sapi_startup (sf=sf@entry=0x7f7786fde4a0 <apache2_sapi_module>)
at /share/sources/php/php-7.0.14/main/SAPI.c:84
#5 0x00007f778676d3cc in php_apache_server_startup (pconf=0x18dd138, plog=, ptemp=,
s=) at /share/sources/php/php-7.0.14/sapi/apache2handler/sapi_apache2.c:463
#6 0x000000000044ccb3 in ap_run_post_config (pconf=pconf@entry=0x18dd138, plog=0x190a378, ptemp=0x1908348, s=0x190ec88)
at config.c:103
#7 0x000000000042ba05 in main (argc=3, argv=0x7ffd9875e6d8) at main.c:765
The text was updated successfully, but these errors were encountered: