Welcome! Log In Create A New Profile

Advanced

Unable to run php-fpm workers just SEGFAULT

Posted by steven.hartland 
steven.hartland
Unable to run php-fpm workers just SEGFAULT
September 11, 2009 01:30PM
After compiling up php-fpm on start all I get child works constantly
crashing.

php was compiled with:
../configure --with-layout=GNU --with-config-file-scan-dir=/usr/local/
etc/php --disable-all --enable-libxml --with-libxml-dir=/usr/local --
disable-reflection --program-prefix= --disable-cli --disable-path-info-
check --with-regex=php --disable-ipv6 --prefix=/usr/local --mandir=/
usr/local/man --infodir=/usr/local/info/ --build=amd64-portbld-
freebsd7.2

php-fpm was compiled with:
../configure --with-fpm-pid=/var/run/php-fpm.pid --with-fpm-log=/var/
log/php-fpm.log --with-fpm-conf=/usr/local/etc/php-fpm.conf --with-
php=/usr/ports/lang/php5/work/php-5.2.10/

system:
FreeBSD test 7.2-RELEASE-p3 FreeBSD 7.2-RELEASE-p3 #1: Fri Jul 31
11:54:25 BST 2009 root@test:/usr/obj/usr/src/sys/CUSTOM amd64

Sep 11 12:12:34.772674 [NOTICE] fpm_unix_init_main(), line 284:
getrlimit(nofile): max:230400, cur:230400
Sep 11 12:12:34.772773 [NOTICE] fpm_event_init_main(), line 88:
libevent: using kqueue
Sep 11 12:12:34.772851 [NOTICE] fpm_init(), line 50: fpm is running,
pid 67294
Sep 11 12:12:34.773195 [NOTICE] fpm_children_make(), line 352: child
67296 (pool default) started
Sep 11 12:12:34.773490 [NOTICE] fpm_children_make(), line 352: child
67297 (pool default) started
Sep 11 12:12:34.773984 [NOTICE] fpm_children_make(), line 352: child
67298 (pool default) started
Sep 11 12:12:34.774552 [NOTICE] fpm_children_make(), line 352: child
67299 (pool default) started
Sep 11 12:12:34.775305 [NOTICE] fpm_children_make(), line 352: child
67300 (pool default) started
Sep 11 12:12:34.775384 [NOTICE] fpm_event_loop(), line 107: libevent:
entering main loop
Sep 11 12:12:34.775495 [NOTICE] fpm_got_signal(), line 48: received
SIGCHLD
Sep 11 12:12:34.775708 [WARNING] fpm_children_bury(), line 215: child
67298 (pool default) exited on signal 11 SIGSEGV after 0.001896
seconds from start
Sep 11 12:12:34.776064 [NOTICE] fpm_children_make(), line 352: child
67301 (pool default) started
Sep 11 12:12:34.776258 [WARNING] fpm_children_bury(), line 215: child
67297 (pool default) exited on signal 11 SIGSEGV after 0.002820
seconds from start
Sep 11 12:12:34.776715 [NOTICE] fpm_children_make(), line 352: child
67302 (pool default) started
Sep 11 12:12:34.776783 [WARNING] fpm_children_bury(), line 215: child
67300 (pool default) exited on signal 11 SIGSEGV after 0.001535
seconds from start
Sep 11 12:12:34.777328 [NOTICE] fpm_children_make(), line 352: child
67303 (pool default) started
Sep 11 12:12:34.777390 [WARNING] fpm_children_bury(), line 215: child
67301 (pool default) exited on signal 11 SIGSEGV after 0.001394
seconds from start
Sep 11 12:12:34.777958 [NOTICE] fpm_children_make(), line 352: child
67304 (pool default) started
Sep 11 12:12:34.778030 [WARNING] fpm_children_bury(), line 215: child
67302 (pool default) exited on signal 11 SIGSEGV after 0.001369
seconds from start
Sep 11 12:12:34.778677 [NOTICE] fpm_children_make(), line 352: child
67305 (pool default) started
Sep 11 12:12:34.778745 [WARNING] fpm_children_bury(), line 215: child
67303 (pool default) exited on signal 11 SIGSEGV after 0.001484
seconds from start
Sep 11 12:12:34.779214 [NOTICE] fpm_children_make(), line 352: child
67306 (pool default) started
Sep 11 12:12:34.779285 [WARNING] fpm_children_bury(), line 215: child
67304 (pool default) exited on signal 11 SIGSEGV after 0.001439
seconds from start
Sep 11 12:12:34.779812 [NOTICE] fpm_children_make(), line 352: child
67307 (pool default) started
Sep 11 12:12:34.779882 [WARNING] fpm_children_bury(), line 215: child
67305 (pool default) exited on signal 11 SIGSEGV after 0.001260
seconds from start
Sep 11 12:12:34.780478 [NOTICE] fpm_children_make(), line 352: child
67308 (pool default) started
Sep 11 12:12:34.780552 [WARNING] fpm_children_bury(), line 215: child
67306 (pool default) exited on signal 11 SIGSEGV after 0.001400
seconds from start
Sep 11 12:12:34.781134 [NOTICE] fpm_children_make(), line 352: child
67309 (pool default) started
Sep 11 12:12:34.781211 [WARNING] fpm_children_bury(), line 215: child
67299 (pool default) exited on signal 11 SIGSEGV after 0.006880
seconds from start
Sep 11 12:12:34.781247 [WARNING] fpm_children_bury(), line 242: failed
processes threshold (10 in 60 sec) is reached, initiating reload
Sep 11 12:12:34.781274 [NOTICE] fpm_pctl(), line 256: switching to
'reloading' state
Sep 11 12:12:34.781477 [NOTICE] fpm_pctl_kill_all(), line 172: sending
signal 3 SIGQUIT to child 67309 (pool default)
Sep 11 12:12:34.781521 [NOTICE] fpm_pctl_kill_all(), line 172: sending
signal 3 SIGQUIT to child 67308 (pool default)
Sep 11 12:12:34.781534 [NOTICE] fpm_pctl_kill_all(), line 172: sending
signal 3 SIGQUIT to child 67307 (pool default)
Sep 11 12:12:34.781542 [NOTICE] fpm_pctl_kill_all(), line 172: sending
signal 3 SIGQUIT to child 67296 (pool default)
Sep 11 12:12:34.781549 [NOTICE] fpm_pctl_kill_all(), line 181: 4
children are still alive
....
dreamcat four
Re: Unable to run php-fpm workers just SEGFAULT
September 11, 2009 02:16PM
It may have been fixed now. Did you try the 0.6.3 version available here:
https://code.launchpad.net/php-fpm ?

On Fri, Sep 11, 2009 at 12:16 PM, steven.hartland
<steven.hartland@multiplay.co.uk> wrote:
>
> After compiling up php-fpm on start all I get child works constantly
> crashing.

dreamcat4
dreamcat4@gmail.com
steven.hartland
Re: Unable to run php-fpm workers just SEGFAULT
September 13, 2009 04:06PM
No I hadn't but just gave it a go but couldn't get it to configure
first off:
../configure --with-fpm-pid=/var/run/php-fpm.pid --with-fpm-log=/var/
log/php-fpm.log --with-fpm-conf=/usr/local/etc/php-fpm.conf --with-
php=/usr/ports/lang/php5/work/php-5.2.10/
....
appending configuration tag "F77" to libtool
checking for php configuration... configure: error: Please specify
full path to php source dir: --with-php=DIR

Exactly the same command with 0.6.0 worked fine. After some digging
turns our the option is now --with-php-src=DIR but the error message
hadnt been updated. Once this was fixed it fired up first time, so
many thanks for that :)

That said, having to use statically compiled extensions is a real
PITA; especially on FreeBSD as it means everything has to be build
manually, which takes ages, as getting third party extensions to
compile is a real mission due to the fact configure really doesn't
like being rebuilt to add them in :(

So as a side track to the original thread, is there anyway to use
shared extensions with php-fpm?
dreamcat four
Re: Unable to run php-fpm workers just SEGFAULT
September 13, 2009 04:22PM
On Sun, Sep 13, 2009 at 9:05 PM, steven.hartland
<steven.hartland@multiplay.co.uk> wrote:
>
>
> No I hadn't but just gave it a go but couldn't get it to configure
> first off:
> ./configure --with-fpm-pid=/var/run/php-fpm.pid --with-fpm-log=/var/
> log/php-fpm.log --with-fpm-conf=/usr/local/etc/php-fpm.conf --with-
> php=/usr/ports/lang/php5/work/php-5.2.10/
> ...
> appending configuration tag "F77" to libtool
> checking for php configuration... configure: error: Please specify
> full path to php source dir: --with-php=DIR
>
> Exactly the same command with 0.6.0 worked fine. After some digging
> turns our the option is now --with-php-src=DIR but the error message
> hadnt been updated. Once this was fixed it fired up first time, so
> many thanks for that :)

I've asked mike to update the project home page to reflect these new
configure flags.
Until then they're in the file readme.markdown.

> That said, having to use statically compiled extensions is a real
> PITA; especially on FreeBSD as it means everything has to be build
> manually, which takes ages, as getting third party extensions to
> compile is a real mission due to the fact configure really doesn't
> like being rebuilt to add them in :(
>
> So as a side track to the original thread, is there anyway to use
> shared extensions with php-fpm?

AFAIK shared extensions should be possible. I tried this for 0.63 and
seemed to work on linux (after a couple of bug-fixes). It might be the
case that you hit problems we don't because you are building on
FreeBSD.

dreamcat4
dreamcat4@gmail.com
steven.hartland
Re: Unable to run php-fpm workers just SEGFAULT
September 13, 2009 04:30PM
On Sep 13, 9:19 pm, dreamcat four <dreamc...@gmail.com> wrote:
> AFAIK shared extensions should be possible. I tried this for 0.63 and
> seemed to work on linux (after a couple of bug-fixes). It might be the
> case that you hit problems we don't because you are building on
> FreeBSD.

Ooo if thats the case I'll give it another go with 0.6.3 and raise
issues if its still a problem, thanks for the quick reply.

If it does work, I'll look to create / update the FreeBSD port of php-
fpm as that will make it so much easier to manage this excellent app :)
dreamcat four
Re: Unable to run php-fpm workers just SEGFAULT
September 13, 2009 04:58PM
On Sun, Sep 13, 2009 at 9:29 PM, steven.hartland
<steven.hartland@multiplay.co.uk> wrote:
> Ooo if thats the case I'll give it another go with 0.6.3 and raise
> issues if its still a problem, thanks for the quick reply.

To be more accurate: We had to ensure a certain linker flag was passed to ld.
This is specified in the LDFLAGS variable in Makefile.am.

This flag is -export-dynamic. The flag needs to be working for your ld
program on BSD. Do a:
man -P cat ld | grep '\-export\-dynamic'

Without building with this dynamic linking feature then PHP can't
dynamically load modules.
The original build command is in sapi/cgi/config9.m4 shows that its
different for aix and darwin.
(sort-of implying that if your unix isn't AIX or darwin then its
supposed to work).

> If it does work, I'll look to create / update the FreeBSD port of php-
> fpm as that will make it so much easier to manage this excellent app :)

In the most recent 0.63 there's a line you can un-comment to work for PHP-5.3.1


dreamcat4
dreamcat4@gmail.com
steven.hartland
Re: Unable to run php-fpm workers just SEGFAULT
September 13, 2009 05:00PM
On Sep 13, 9:29 pm, "steven.hartland"
<steven.hartl...@multiplay.co.uk> wrote:
> Ooo if thats the case I'll give it another go with 0.6.3 and raise
> issues if its still a problem, thanks for the quick reply.

Confirmed 0.6.3 fixes all the errors I had on start-up when running
with a standard FreeBSD 7 ports build with shared extensions under php-
fpm 0.6.0, which is fantastic!
dreamcat four
Re: Unable to run php-fpm workers just SEGFAULT
September 13, 2009 05:08PM
On Sun, Sep 13, 2009 at 9:58 PM, steven.hartland
<steven.hartland@multiplay.co.uk> wrote:
> Confirmed 0.6.3 fixes all the errors I had on start-up when running
> with a standard FreeBSD 7 ports build with shared extensions under php-
> fpm 0.6.0, which is fantastic!

Good to know that it works on FreeBSD. Thank you for trying it out.
Best regards,

dreamcat4
dreamcat4@gmail.com
Re: Unable to run php-fpm workers just SEGFAULT
September 28, 2009 12:32AM
Steven, please update this page with any more specifics that would
help other people out.

Also anyone else with any specific tweaks for their distribution/OS
please feel free to share.

Thanks.

http://php-fpm.org/Operating_System_Specific_Notes

On Sun, Sep 13, 2009 at 2:06 PM, dreamcat four <dreamcat4@gmail.com> wrote:
>
> On Sun, Sep 13, 2009 at 9:58 PM, steven.hartland
> <steven.hartland@multiplay.co.uk> wrote:
>> Confirmed 0.6.3 fixes all the errors I had on start-up when running
>> with a standard FreeBSD 7 ports build with shared extensions under php-
>> fpm 0.6.0, which is fantastic!
>
> Good to know that it works on FreeBSD. Thank you for trying it out.
> Best regards,
>
> dreamcat4
> dreamcat4@gmail.com
>
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 171
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready