From: jonas at brachium-system dot net
Operating system: Linux
PHP version: 5.3Git-2012-08-27 (Git)
Package: FPM related
Bug Type: Bug
Bug description:startup problems fpm / php-fpm
Description:
------------
PHP 5.3.14 with FPM on Debian Squeze works without any problems.
The PHP Version 5.3.15 / 5.3.16 and current Git branch PHP 5.3 is
affected.
/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
If I switch the configuration option "daemonize" to "no" php-fpm starts up
normal and can be aborted with ctrl+c.
If I copy sapi/fpm from 5.3.14 to the current php-src from git and compile
it again my configuration and php-fpm works and starts normal.
If I remove the USR1/USR2 handling from sapi/fpm/fpm/fpm_unix.c ( see patch
) php-fpm starts normal and detach correctly.
I think (See:
http://groups.google.com/group/highload-php-en/browse_thread/thread/fa6b16d533411f42)
PHP 5.4 branch is also affected.
PHP-FPM Configration:
---------------------
[global]
pid = /var/run/php5-fpm.pid
error_log = /var/log/php5-fpm.log
daemonize = yes
[cust-websrv]
listen = /tmp/cust-webserv.socket
user = www-data
group = www-data
pm = dynamic
pm.max_children = 130
pm.start_servers = 15
pm.min_spare_servers = 5
pm.max_spare_servers = 15
pm.max_requests = 500
chdir = /
env[APPLICATION_ENV] = prod
[is-tracking]
listen = /tmp/is-tracking.socket
user = www-data
group = www-data
pm = dynamic
pm.max_children = 130
pm.start_servers = 15
pm.min_spare_servers = 5
pm.max_spare_servers = 15
pm.max_requests = 5000
chdir = /
env[APPLICATION_ENV] = prod
[limesurvey]
listen = /tmp/limesurvey.socket
user = www-data
group = www-data
pm = dynamic
pm.max_children = 40
pm.start_servers = 5
pm.min_spare_servers = 4
pm.max_spare_servers = 5
pm.max_requests = 500
chdir = /
env[APPLICATION_ENV] = prod
Actual result:
--------------
strace, with the problem:
open("/var/log/php5-fpm.log", O_WRONLY|O_CREAT|O_APPEND, 0600) = 3
fcntl(3, F_GETFD) = 0
fcntl(3, F_SETFD, FD_CLOEXEC) = 0
stat("/", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat("/", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat("/", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
geteuid()
rt_sigaction(SIGUSR1, {0x858300, ~[RTMIN RT_1], SA_RESTORER,
0x7fb98d4b5230}, {0x84ad50, [], SA_RESTORER, 0x7fb98d4b5230}, 8) = 0
rt_sigaction(SIGUSR2, {0x8582f0, ~[RTMIN RT_1], SA_RESTORER,
0x7fb98d4b5230}, {SIG_DFL, [], 0}, 8) = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD,
child_tidptr=0x7fb990b0da10) = 4037
--- SIGUSR1 (User defined signal 1) @ 0 (0) ---
futex(0x7fb98d7e0e40, FUTEX_WAIT_PRIVATE, 2, NULL
--
Edit bug report at https://bugs.php.net/bug.php?id=62954&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=62954&r=trysnapshot54
Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=62954&r=trysnapshot53
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=62954&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=62954&r=fixed
Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=62954&r=needdocs
Fixed in release: https://bugs.php.net/fix.php?id=62954&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=62954&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=62954&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=62954&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=62954&r=support
Expected behavior: https://bugs.php.net/fix.php?id=62954&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=62954&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=62954&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=62954&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=62954&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=62954&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=62954&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=62954&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=62954&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=62954&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=62954&r=mysqlcfg