Welcome! Log In Create A New Profile

Advanced

Strange PHP FPM startup problem / php5-fpm hangs

Posted by Jonas Genannt 
Jonas Genannt
Strange PHP FPM startup problem / php5-fpm hangs
August 21, 2012 04:40AM
Hi!

I have an strange php fpm startup problem. I'm using PHP 5.3.14 on
Debian Squeeze and all is fine.

I have now updated to 5.3.16. With 5.3.16 the init script hangs.

I start PHP5 FPM via:

/usr/sbin/php5-fpm --fpm-config /etc/php5/fpm/php-fpm.conf

All pools are started and working, but the php5-fpm does not detach:

/usr/sbin/php5-fpm --fpm-config /etc/php5/fpm/php-fpm.conf

and here it hangs. ctrl +c does not work.

strace tells me:
Process 15949 attached - interrupt to quit
futex(0x7fb923e8ce40, FUTEX_WAIT_PRIVATE, 2, NULL

I have also tested 5.3.15 but it has got the same problem like
5.3.16.

Switching back to 5.3.14 and the php5-fpm detach correctly.

So my configuration works great on .14 but not on .15 and above.

Does anybody know that's going wrong here?

Thanks,
Jonas
Aleksandar Lazic
Re: Strange PHP FPM startup problem / php5-fpm hangs
August 21, 2012 10:32AM
Hi,

same problem here.


../configure --prefix=/<prefix>/ --enable-fpm --enable-bcmath --with-bz2
--enable-calendar --with-curl --enable-dba --enable-exif --enable-ftp
--enable-gd-native-ttf --with-jpeg-dir --with-png-dir --with-t1lib
--with-freetype-dir --with-gettext --enable-mbstring --with-mcrypt
--with-mhash --with-mysql=mysqlnd --with-mysqli=mysqlnd
--with-pdo-mysql=mysqlnd --enable-mysqlnd --with-openssl
--with-pcre-regex --with-pspell --enable-shmop --enable-soap
--enable-sockets --enable-sysvmsg --enable-wddx --with-xsl --enable-zip
--with-zlib --with-tcadb --with-openssl-dir --with-gd

###
bin/php -v
PHP 5.4.5 (cli) (built: Aug 8 2012 01:03:00)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies
###

root@Ubuntu-1204-precise-64-minimal ~ # strace -fveall -p 2590 -p 2589
Process 2590 attached - interrupt to quit
Process 2589 attached - interrupt to quit
[pid 2589] wait4(-1, <unfinished ...>
[pid 2590] futex(0x7fc2a4d73720, FUTEX_WAIT_PRIVATE, 2, NULL
###

BR
Aleks

Am 21-08-2012 10:13, schrieb Jonas Genannt:
> Hi!
>
> I have an strange php fpm startup problem. I'm using PHP 5.3.14 on
> Debian Squeeze and all is fine.
>
> I have now updated to 5.3.16. With 5.3.16 the init script hangs.
>
> I start PHP5 FPM via:
>
> /usr/sbin/php5-fpm --fpm-config /etc/php5/fpm/php-fpm.conf
>
> All pools are started and working, but the php5-fpm does not detach:
>
> /usr/sbin/php5-fpm --fpm-config /etc/php5/fpm/php-fpm.conf
>
> and here it hangs. ctrl +c does not work.
>
> strace tells me:
> Process 15949 attached - interrupt to quit
> futex(0x7fb923e8ce40, FUTEX_WAIT_PRIVATE, 2, NULL
>
> I have also tested 5.3.15 but it has got the same problem like
> 5.3.16.
>
> Switching back to 5.3.14 and the php5-fpm detach correctly.
>
> So my configuration works great on .14 but not on .15 and above.
>
> Does anybody know that's going wrong here?
>
> Thanks,
> Jonas
Same problems here too,

The master process and poll are launched and working.
It's seams that process /usr/sbin/php5-fpm --fpm-config
/etc/php5/fpm/php-fpm.conf don't quit.
If I kill -9 this process, fpm seems to work.

I have seen this trouble in 5.3.16 so i'll try the 5.4.6.1.
All packet come from dotdeb

Infos :

#php -v
> PHP 5.4.6-1~dotdeb.0 (cli) (built: Aug 18 2012 09:56:44)
> Copyright (c) 1997-2012 The PHP Group
> Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies
>


> # /etc/init.d/php5-fpm restart
> Restarting PHP5 FastCGI Process Manager: php5-fpmKilled
> root@wapin:~/trunk/runkit# /etc/init.d/php5-fpm start
> Terminated
> root@wapin:~/trunk/runkit# strace /etc/init.d/php5-fpm start
> execve("/etc/init.d/php5-fpm", ["/etc/init.d/php5-fpm", "start"], [/* 18
> vars */]) = 0
> brk(0) = 0xa47000
> access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or
> directory)
> mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
> 0x7f699e371000
> access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or
> directory)
> open("/etc/ld.so.cache", O_RDONLY) = 3
> fstat(3, {st_mode=S_IFREG|0644, st_size=56798, ...}) = 0
> mmap(NULL, 56798, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f699e363000
> close(3) = 0
> access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or
> directory)
> open("/lib/libc.so.6", O_RDONLY) = 3
> read(3,
> "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\240\355\1\0\0\0\0\0"...,
> 832) = 832
> fstat(3, {st_mode=S_IFREG|0755, st_size=1437064, ...}) = 0
> mmap(NULL, 3545160, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0)
> = 0x7f699ddf4000
> mprotect(0x7f699df4d000, 2093056, PROT_NONE) = 0
> mmap(0x7f699e14c000, 20480, PROT_READ|PROT_WRITE,
> MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x158000) = 0x7f699e14c000
> mmap(0x7f699e151000, 18504, PROT_READ|PROT_WRITE,
> MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f699e151000
> close(3) = 0
> mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
> 0x7f699e362000
> mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
> 0x7f699e361000
> mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
> 0x7f699e360000
> arch_prctl(ARCH_SET_FS, 0x7f699e361700) = 0
> mprotect(0x7f699e14c000, 16384, PROT_READ) = 0
> mprotect(0x7f699e373000, 4096, PROT_READ) = 0
> munmap(0x7f699e363000, 56798) = 0
> getpid() = 12006
> rt_sigaction(SIGCHLD, {SIG_DFL, [CHLD], SA_RESTORER|SA_RESTART,
> 0x7f699de26230}, {SIG_DFL, [], 0}, 8) = 0
> geteuid() = 0
> brk(0) = 0xa47000
> brk(0xa68000) = 0xa68000
> getppid() = 12005
> stat("/root/trunk/runkit", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
> stat(".", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
> open("/etc/init.d/php5-fpm", O_RDONLY) = 3
> fcntl(3, F_DUPFD, 10) = 10
> close(3) = 0
> fcntl(10, F_SETFD, FD_CLOEXEC) = 0
> rt_sigaction(SIGINT, NULL, {SIG_DFL, [], 0}, 8) = 0
> rt_sigaction(SIGINT, {0x40f540, ~[RTMIN RT_1], SA_RESTORER,
> 0x7f699de26230}, NULL, 8) = 0
> rt_sigaction(SIGQUIT, NULL, {SIG_DFL, [], 0}, 8) = 0
> rt_sigaction(SIGQUIT, {SIG_DFL, ~[RTMIN RT_1], SA_RESTORER,
> 0x7f699de26230}, NULL, 8) = 0
> rt_sigaction(SIGTERM, NULL, {SIG_DFL, [], 0}, 8) = 0
> rt_sigaction(SIGTERM, {SIG_DFL, ~[RTMIN RT_1], SA_RESTORER,
> 0x7f699de26230}, NULL, 8) = 0
> read(10, "#!/bin/sh\n### BEGIN INIT INFO\n# "..., 8192) = 4697
> stat("/usr/sbin/php5-fpm", {st_mode=S_IFREG|0755, st_size=8453376, ...}) =
> 0
> geteuid() = 0
> stat("/etc/default/php5-fpm", 0x7fffd498e940) = -1 ENOENT (No such file or
> directory)
> open("/lib/init/vars.sh", O_RDONLY) = 3
> fcntl(3, F_DUPFD, 10) = 11
> close(3) = 0
> fcntl(11, F_SETFD, FD_CLOEXEC) = 0
> read(11, "#\n# Set rcS vars\n#\n\n# Source con"..., 8192) = 865
> stat("/etc/default/rcS", {st_mode=S_IFREG|0644, st_size=282, ...}) = 0
> open("/etc/default/rcS", O_RDONLY) = 3
> fcntl(3, F_DUPFD, 10) = 12
> close(3) = 0
> fcntl(12, F_SETFD, FD_CLOEXEC) = 0
> read(12, "#\n# /etc/default/rcS\n#\n# Default"..., 8192) = 282
> read(12, "", 8192) = 0
> close(12) = 0
> stat("/proc/cmdline", {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
> geteuid() = 0
> pipe([3, 4]) = 0
> clone(child_stack=0,
> flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
> child_tidptr=0x7f699e3619d0) = 12007
> close(4) = 0
> read(3, "BOOT_IMAGE=/vmlinuz-2.6.32-5-amd"..., 128) = 96
> --- SIGCHLD (Child exited) @ 0 (0) ---
> read(3, "", 128) = 0
> close(3) = 0
> wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 12007
> read(11, "", 8192) = 0
> close(11) = 0
> open("/lib/lsb/init-functions", O_RDONLY) = 3
> fcntl(3, F_DUPFD, 10) = 11
> close(3) = 0
> fcntl(11, F_SETFD, FD_CLOEXEC) = 0
> read(11, "# /lib/lsb/init-functions for De"..., 8192) = 8192
> read(11, "_message (int exitstatus)\nlog_en"..., 8192) = 1592
> stat("/etc/lsb-base-logging.sh", 0x7fffd498e5f0) = -1 ENOENT (No such file
> or directory)
> read(11, "", 8192) = 0
> close(11) = 0
> pipe([3, 4]) = 0
> clone(child_stack=0,
> flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
> child_tidptr=0x7f699e3619d0) = 12008
> close(4) = 0
> read(3, "", 128) = 0
> --- SIGCHLD (Child exited) @ 0 (0) ---
> close(3) = 0
> wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 1}], 0, NULL) = 12008
> open("/dev/null", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 3
> fcntl(1, F_DUPFD, 10) = 11
> close(1) = 0
> fcntl(11, F_SETFD, FD_CLOEXEC) = 0
> dup2(3, 1) = 1
> close(3) = 0
> stat("/sbin/start-stop-daemon", {st_mode=S_IFREG|0755, st_size=28584,
> ...}) = 0
> clone(child_stack=0,
> flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
> child_tidptr=0x7f699e3619d0) = 12011
> wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 12011
> --- SIGCHLD (Child exited) @ 0 (0) ---
> dup2(11, 1) = 1
> close(11) = 0
> open("/dev/null", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 3
> fcntl(2, F_DUPFD, 10) = 11
> close(2) = 0
> fcntl(11, F_SETFD, FD_CLOEXEC) = 0
> dup2(3, 2) = 2
> close(3) = 0
> clone(child_stack=0,
> flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
> child_tidptr=0x7f699e3619d0) = 12012
> wait4(-1,
>

Thanks

Ludo

On Tuesday, August 21, 2012 4:30:11 PM UTC+2, Aleksandar Lazic wrote:
>
> Hi,
>
> same problem here.
>
>
> ./configure --prefix=/<prefix>/ --enable-fpm --enable-bcmath --with-bz2
> --enable-calendar --with-curl --enable-dba --enable-exif --enable-ftp
> --enable-gd-native-ttf --with-jpeg-dir --with-png-dir --with-t1lib
> --with-freetype-dir --with-gettext --enable-mbstring --with-mcrypt
> --with-mhash --with-mysql=mysqlnd --with-mysqli=mysqlnd
> --with-pdo-mysql=mysqlnd --enable-mysqlnd --with-openssl
> --with-pcre-regex --with-pspell --enable-shmop --enable-soap
> --enable-sockets --enable-sysvmsg --enable-wddx --with-xsl --enable-zip
> --with-zlib --with-tcadb --with-openssl-dir --with-gd
>
> ###
> bin/php -v
> PHP 5.4.5 (cli) (built: Aug 8 2012 01:03:00)
> Copyright (c) 1997-2012 The PHP Group
> Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies
> ###
>
> root@Ubuntu-1204-precise-64-minimal ~ # strace -fveall -p 2590 -p 2589
> Process 2590 attached - interrupt to quit
> Process 2589 attached - interrupt to quit
> [pid 2589] wait4(-1, <unfinished ...>
> [pid 2590] futex(0x7fc2a4d73720, FUTEX_WAIT_PRIVATE, 2, NULL
> ###
>
> BR
> Aleks
>
> Am 21-08-2012 10:13, schrieb Jonas Genannt:
> > Hi!
> >
> > I have an strange php fpm startup problem. I'm using PHP 5.3.14 on
> > Debian Squeeze and all is fine.
> >
> > I have now updated to 5.3.16. With 5.3.16 the init script hangs.
> >
> > I start PHP5 FPM via:
> >
> > /usr/sbin/php5-fpm --fpm-config /etc/php5/fpm/php-fpm.conf
> >
> > All pools are started and working, but the php5-fpm does not detach:
> >
> > /usr/sbin/php5-fpm --fpm-config /etc/php5/fpm/php-fpm.conf
> >
> > and here it hangs. ctrl +c does not work.
> >
> > strace tells me:
> > Process 15949 attached - interrupt to quit
> > futex(0x7fb923e8ce40, FUTEX_WAIT_PRIVATE, 2, NULL
> >
> > I have also tested 5.3.15 but it has got the same problem like
> > 5.3.16.
> >
> > Switching back to 5.3.14 and the php5-fpm detach correctly.
> >
> > So my configuration works great on .14 but not on .15 and above.
> >
> > Does anybody know that's going wrong here?
> >
> > Thanks,
> > Jonas
>
>
Jonas Genannt
Re: Strange PHP FPM startup problem / php5-fpm hangs
August 27, 2012 03:56PM
Hi!

2012/8/21 Jonas Genannt <jonas.genannt@googlemail.com>
> and here it hangs. ctrl +c does not work.
>
> strace tells me:
> Process 15949 attached - interrupt to quit
> futex(0x7fb923e8ce40, FUTEX_WAIT_PRIVATE, 2, NULL
>
> I have also tested 5.3.15 but it has got the same problem like
> 5.3.16.

I have opened an bug on php: https://bugs.php.net/bug.php?id=62954

Please add comments to bug if the bug affects also you :)

Thanks,
Jonas
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 272
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