Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 349211 - dev-lang/php-5.3.4 was released with new, not working php-fpm init script.
Summary: dev-lang/php-5.3.4 was released with new, not working php-fpm init script.
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: PHP Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-20 16:40 UTC by Piotr Karbowski (RETIRED)
Modified: 2010-12-25 22:17 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Piotr Karbowski (RETIRED) gentoo-dev 2010-12-20 16:40:42 UTC
Latest php was released with new init script for php-fpm. Which propably wasnt *even* tested because it failing on start and hard to overlook it... 

Script waiting for pidfile however pidfile will be never created because there is no -m (--makepid) switch to start-stop-deamon in script. Also even with -m pidfile contain wrong pid, php-fpm master process is created after it with highter pid - In that case 'restart' will fail to stop php-fpm (because pid does not exist) and will start another php-fpm.

Anoter careless upgrade to php.

Reproducible: Always

Steps to Reproduce:
Comment 1 Ole Markus With (RETIRED) gentoo-dev 2010-12-21 10:26:54 UTC
(In reply to comment #0)
> Latest php was released with new init script for php-fpm. Which propably wasnt
> *even* tested because it failing on start and hard to overlook it... 
> 
> Script waiting for pidfile however pidfile will be never created because there
> is no -m (--makepid) switch to start-stop-deamon in script. Also even with -m
> pidfile contain wrong pid, php-fpm master process is created after it with
> highter pid - In that case 'restart' will fail to stop php-fpm (because pid
> does not exist) and will start another php-fpm.
> 

Please try to merge your fpm config with the one shipped with 5.3.4 (which should be in the tree now re bug 349179). let me know how that works.
Comment 2 Ivan Iraci 2010-12-21 10:29:23 UTC
(In reply to comment #0)

> Script waiting for pidfile however pidfile will be never created because there
> is no -m (--makepid) switch to start-stop-deamon in script. Also even with -m
> pidfile contain wrong pid, php-fpm master process is created after it with
> highter pid - In that case 'restart' will fail to stop php-fpm (because pid
> does not exist) and will start another php-fpm.

Another problem comes from the wrong usage of the PHPSLOT variable.
You can fix it by changing PHPSLOT declaration as follows:
PHPSLOT=$(basename $(eselect php show fpm))

Yes, a careless upgrade indeed.
Comment 3 Matti Bickel (RETIRED) gentoo-dev 2010-12-21 10:32:50 UTC
(In reply to comment #2)
> Another problem comes from the wrong usage of the PHPSLOT variable.
> You can fix it by changing PHPSLOT declaration as follows:
> PHPSLOT=$(basename $(eselect php show fpm))

How's that? eselect php show fpm gives "php5.3" for me.
What does it output for you?
Comment 4 Piotr Karbowski (RETIRED) gentoo-dev 2010-12-21 10:50:50 UTC
Ah, so now php-fpm init depends on pid variable from php-fpm.conf without any ewarn/einfo/notice about it. Such changes *should be* docummented in ebuild's postinst or something... http://bugs.gentoo.org/show_bug.cgi?id=343671#c8

Config is something very individual, uncommeting pid variable is something easy to overlook while dispatch-conf.
Comment 5 Uros 2010-12-21 12:26:38 UTC
Uncommenting "pid" global option in php-fpm.conf works for me. Thanks for info.