Skip to content
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

PHP7 - YAF - Kills PHP-FPM child #167

Closed
ghost opened this issue Jun 10, 2015 · 8 comments
Closed

PHP7 - YAF - Kills PHP-FPM child #167

ghost opened this issue Jun 10, 2015 · 8 comments

Comments

@ghost
Copy link

ghost commented Jun 10, 2015

I have compiled php7 with nginx and php-yaf. I have gotten php-fpm version 7.0 running fine with nginx and loaded the extension for yaf. This is on the PHP7 Yaf branch which i have compiled as the normal branch is not able to compile/make.

When I load a page for the first time, it works fine. But when I refresh the page the PHP-FPM child gets killed and a new child is started again. Then if I refresh again with the new child started, the page load.

When not using the yaf framework, the child process is not killed as when using yaf.

So each child is only able to execute yaf scripts once and then crashes on next attempt with SIGSEGV.

[10-Jun-2015 11:27:48.404841] DEBUG: pid 94870, fpm_got_signal(), line 76: received SIGCHLD
[10-Jun-2015 11:27:48.404908] WARNING: pid 94870, fpm_children_bury(), line 252: [pool www] child 99115 exited on signal 11 (SIGSEGV) after 5995.967273 seconds from start
[10-Jun-2015 11:27:48.405502] NOTICE: pid 94870, fpm_children_make(), line 421: [pool www] child 99296 started
[10-Jun-2015 11:27:48.405611] DEBUG: pid 94870, fpm_event_loop(), line 419: event module triggered 1 events
[10-Jun-2015 11:27:48.972714] DEBUG: pid 94870, fpm_pctl_perform_idle_server_maintenance(), line 379: [pool www] currently 100 active children, 0 spare children, 100 running children. Spawning rate 1
[10-Jun-2015 11:27:49.568180] DEBUG: pid 94870, fpm_got_signal(), line 76: received SIGCHLD
[10-Jun-2015 11:27:49.568237] WARNING: pid 94870, fpm_children_bury(), line 252: [pool www] child 99296 exited on signal 11 (SIGSEGV) after 1.162750 seconds from start
[10-Jun-2015 11:27:49.568708] NOTICE: pid 94870, fpm_children_make(), line 421: [pool www] child 99297 started
[10-Jun-2015 11:27:49.568772] DEBUG: pid 94870, fpm_event_loop(), line 419: event module triggered 1 events
[10-Jun-2015 11:27:49.999098] DEBUG: pid 94870, fpm_pctl_perform_idle_server_maintenance(), line 379: [pool www] currently 100 active children, 0 spare children, 100 running children. Spawning rate 1
[10-Jun-2015 11:27:50.154533] DEBUG: pid 94870, fpm_got_signal(), line 76: received SIGCHLD
[10-Jun-2015 11:27:50.154594] WARNING: pid 94870, fpm_children_bury(), line 252: [pool www] child 99297 exited on signal 11 (SIGSEGV) after 0.585902 seconds from start
[10-Jun-2015 11:27:50.155244] NOTICE: pid 94870, fpm_children_make(), line 421: [pool www] child 99298 started
[10-Jun-2015 11:27:50.155309] DEBUG: pid 94870, fpm_event_loop(), line 419: event module triggered 1 events
[10-Jun-2015 11:27:50.612003] DEBUG: pid 94870, fpm_got_signal(), line 76: received SIGCHLD
[10-Jun-2015 11:27:50.612055] WARNING: pid 94870, fpm_children_bury(), line 252: [pool www] child 99298 exited on signal 11 (SIGSEGV) after 0.456827 seconds from start
[10-Jun-2015 11:27:50.612518] NOTICE: pid 94870, fpm_children_make(), line 421: [pool www] child 99299 started
[10-Jun-2015 11:27:50.612587] DEBUG: pid 94870, fpm_event_loop(), line 419: event module triggered 1 events
[10-Jun-2015 11:27:50.990034] DEBUG: pid 94870, fpm_got_signal(), line 76: received SIGCHLD
[10-Jun-2015 11:27:50.990091] WARNING: pid 94870, fpm_children_bury(), line 252: [pool www] child 99299 exited on signal 11 (SIGSEGV) after 0.377589 seconds from start
[10-Jun-2015 11:27:50.990568] NOTICE: pid 94870, fpm_children_make(), line 421: [pool www] child 99300 started
[10-Jun-2015 11:27:50.990632] DEBUG: pid 94870, fpm_event_loop(), line 419: event module triggered 1 events
[10-Jun-2015 11:27:51.000273] DEBUG: pid 94870, fpm_pctl_perform_idle_server_maintenance(), line 379: [pool www] currently 100 active children, 0 spare children, 100 running children. Spawning rate 1
[10-Jun-2015 11:27:51.345247] DEBUG: pid 94870, fpm_got_signal(), line 76: received SIGCHLD
[10-Jun-2015 11:27:51.345300] WARNING: pid 94870, fpm_children_bury(), line 252: [pool www] child 99300 exited on signal 11 (SIGSEGV) after 0.354747 seconds from start
[10-Jun-2015 11:27:51.345797] NOTICE: pid 94870, fpm_children_make(), line 421: [pool www] child 99301 started
[10-Jun-2015 11:27:51.345863] DEBUG: pid 94870, fpm_event_loop(), line 419: event module triggered 1 events
[10-Jun-2015 11:27:51.682866] DEBUG: pid 94870, fpm_got_signal(), line 76: received SIGCHLD
[10-Jun-2015 11:27:51.682924] WARNING: pid 94870, fpm_children_bury(), line 252: [pool www] child 99301 exited on signal 11 (SIGSEGV) after 0.337142 seconds from start
[10-Jun-2015 11:27:51.683382] NOTICE: pid 94870, fpm_children_make(), line 421: [pool www] child 99302 started
[10-Jun-2015 11:27:51.683450] DEBUG: pid 94870, fpm_event_loop(), line 419: event module triggered 1 events

I have tried to compile PHP with --enable-debug but I am not sure how to perform the debugging to find out what is happening.

@laruence
Copy link
Owner

are you able to get a backtrace of the segfault coredump?

@laruence
Copy link
Owner

or, do you have a test script to reproduce the problem?

@ghost
Copy link
Author

ghost commented Jun 10, 2015

Can you provide me details on how to get the backtrace?

It is for anything - even using the code generator does the same.

This is on FreeBSD.

@ghost
Copy link
Author

ghost commented Jun 10, 2015

I have compiled PHP with the following:

./configure --enable-fpm --with-pdo-mysql --with-pear --with-openssl --with-curl --with-mcrypt --with-zlib --enable-zip --with-png-dir --with-jpeg-dir --with-config-file-path=/usr/local/php --enable-debug --enable-maintainer-zts --enable-cgi --enable-cli

FreeBSD devwebserver 10.1-RELEASE FreeBSD 10.1-RELEASE #0 r274401: Tue Nov 11 21:02:49 UTC 2014 root@releng1.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64

I am trying to get a coredump but currently having issues setting freebsd to do this as the coredump directory stays empty.

@laruence
Copy link
Owner

@laruence
Copy link
Owner

@ivissie I found a segfault, but it turns out it is a bug of PHP7 , I fixed it in : php/php-src@7f60923

could you please try with it?

@ghost
Copy link
Author

ghost commented Jun 11, 2015

laruence, I have no idea how you have managed to find this but it works like a charm! Thank you very much!

@laruence
Copy link
Owner

@ivissie maybe because I am maintainer of both them :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant